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/s_a_n/lun_map_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapCollectionGetReader is a Reader for the LunMapCollectionGet structure.
type LunMapCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunMapCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapCollectionGetDefault(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
}
}
// NewLunMapCollectionGetOK creates a LunMapCollectionGetOK with default headers values
func NewLunMapCollectionGetOK() *LunMapCollectionGetOK {
return &LunMapCollectionGetOK{}
}
/*
LunMapCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type LunMapCollectionGetOK struct {
Payload *models.LunMapResponse
}
// IsSuccess returns true when this lun map collection get o k response has a 2xx status code
func (o *LunMapCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map collection get o k response has a 3xx status code
func (o *LunMapCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map collection get o k response has a 4xx status code
func (o *LunMapCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map collection get o k response has a 5xx status code
func (o *LunMapCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun map collection get o k response a status code equal to that given
func (o *LunMapCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunMapCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps][%d] lunMapCollectionGetOK %+v", 200, o.Payload)
}
func (o *LunMapCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps][%d] lunMapCollectionGetOK %+v", 200, o.Payload)
}
func (o *LunMapCollectionGetOK) GetPayload() *models.LunMapResponse {
return o.Payload
}
func (o *LunMapCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LunMapResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunMapCollectionGetDefault creates a LunMapCollectionGetDefault with default headers values
func NewLunMapCollectionGetDefault(code int) *LunMapCollectionGetDefault {
return &LunMapCollectionGetDefault{
_statusCode: code,
}
}
/*
LunMapCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type LunMapCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map collection get default response
func (o *LunMapCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map collection get default response has a 2xx status code
func (o *LunMapCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map collection get default response has a 3xx status code
func (o *LunMapCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map collection get default response has a 4xx status code
func (o *LunMapCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map collection get default response has a 5xx status code
func (o *LunMapCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map collection get default response a status code equal to that given
func (o *LunMapCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps][%d] lun_map_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps][%d] lun_map_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapCollectionGetDefault) 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/s_a_n/igroup_initiator_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupInitiatorDeleteParams creates a new IgroupInitiatorDeleteParams 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 NewIgroupInitiatorDeleteParams() *IgroupInitiatorDeleteParams {
return &IgroupInitiatorDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupInitiatorDeleteParamsWithTimeout creates a new IgroupInitiatorDeleteParams object
// with the ability to set a timeout on a request.
func NewIgroupInitiatorDeleteParamsWithTimeout(timeout time.Duration) *IgroupInitiatorDeleteParams {
return &IgroupInitiatorDeleteParams{
timeout: timeout,
}
}
// NewIgroupInitiatorDeleteParamsWithContext creates a new IgroupInitiatorDeleteParams object
// with the ability to set a context for a request.
func NewIgroupInitiatorDeleteParamsWithContext(ctx context.Context) *IgroupInitiatorDeleteParams {
return &IgroupInitiatorDeleteParams{
Context: ctx,
}
}
// NewIgroupInitiatorDeleteParamsWithHTTPClient creates a new IgroupInitiatorDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupInitiatorDeleteParamsWithHTTPClient(client *http.Client) *IgroupInitiatorDeleteParams {
return &IgroupInitiatorDeleteParams{
HTTPClient: client,
}
}
/*
IgroupInitiatorDeleteParams contains all the parameters to send to the API endpoint
for the igroup initiator delete operation.
Typically these are written to a http.Request.
*/
type IgroupInitiatorDeleteParams struct {
/* AllowDeleteWhileMapped.
Allows the deletion of an initiator from of a mapped initiator group.<br/>
Deleting an initiator from a mapped initiator group makes the LUNs to which the initiator group is mapped no longer available to the initiator. This might cause a disruption in the availability of data.<br/>
<b>This parameter should be used with caution.</b>
*/
AllowDeleteWhileMapped *bool
/* IgroupUUID.
The unique identifier of the initiator group.
*/
IgroupUUID string
/* Name.
The name of the initiator to delete.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup initiator delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorDeleteParams) WithDefaults() *IgroupInitiatorDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup initiator delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorDeleteParams) SetDefaults() {
var (
allowDeleteWhileMappedDefault = bool(false)
)
val := IgroupInitiatorDeleteParams{
AllowDeleteWhileMapped: &allowDeleteWhileMappedDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithTimeout(timeout time.Duration) *IgroupInitiatorDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithContext(ctx context.Context) *IgroupInitiatorDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithHTTPClient(client *http.Client) *IgroupInitiatorDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAllowDeleteWhileMapped adds the allowDeleteWhileMapped to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithAllowDeleteWhileMapped(allowDeleteWhileMapped *bool) *IgroupInitiatorDeleteParams {
o.SetAllowDeleteWhileMapped(allowDeleteWhileMapped)
return o
}
// SetAllowDeleteWhileMapped adds the allowDeleteWhileMapped to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetAllowDeleteWhileMapped(allowDeleteWhileMapped *bool) {
o.AllowDeleteWhileMapped = allowDeleteWhileMapped
}
// WithIgroupUUID adds the igroupUUID to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithIgroupUUID(igroupUUID string) *IgroupInitiatorDeleteParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithName adds the name to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) WithName(name string) *IgroupInitiatorDeleteParams {
o.SetName(name)
return o
}
// SetName adds the name to the igroup initiator delete params
func (o *IgroupInitiatorDeleteParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupInitiatorDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AllowDeleteWhileMapped != nil {
// query param allow_delete_while_mapped
var qrAllowDeleteWhileMapped bool
if o.AllowDeleteWhileMapped != nil {
qrAllowDeleteWhileMapped = *o.AllowDeleteWhileMapped
}
qAllowDeleteWhileMapped := swag.FormatBool(qrAllowDeleteWhileMapped)
if qAllowDeleteWhileMapped != "" {
if err := r.SetQueryParam("allow_delete_while_mapped", qAllowDeleteWhileMapped); err != nil {
return err
}
}
}
// path param igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
// path param name
if err := r.SetPathParam("name", o.Name); 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/s_a_n/lun_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunDeleteReader is a Reader for the LunDelete structure.
type LunDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunDeleteDefault(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
}
}
// NewLunDeleteOK creates a LunDeleteOK with default headers values
func NewLunDeleteOK() *LunDeleteOK {
return &LunDeleteOK{}
}
/*
LunDeleteOK describes a response with status code 200, with default header values.
OK
*/
type LunDeleteOK struct {
}
// IsSuccess returns true when this lun delete o k response has a 2xx status code
func (o *LunDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun delete o k response has a 3xx status code
func (o *LunDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun delete o k response has a 4xx status code
func (o *LunDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun delete o k response has a 5xx status code
func (o *LunDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun delete o k response a status code equal to that given
func (o *LunDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *LunDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /storage/luns/{uuid}][%d] lunDeleteOK ", 200)
}
func (o *LunDeleteOK) String() string {
return fmt.Sprintf("[DELETE /storage/luns/{uuid}][%d] lunDeleteOK ", 200)
}
func (o *LunDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewLunDeleteDefault creates a LunDeleteDefault with default headers values
func NewLunDeleteDefault(code int) *LunDeleteDefault {
return &LunDeleteDefault{
_statusCode: code,
}
}
/*
LunDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254197 | The LUN is mapped and cannot be deleted without specifying the `allow_delete_while_mapped` query parameter. |
| 5374705 | Deleting the LUN is not allowed because it is part of an application. |
| 5374865 | The LUN's aggregate is offline. The aggregate must be online to modify or remove the LUN. |
| 5374866 | The LUN's volume is offline. The volume must be online to modify or remove the LUN. |
| 5374875 | The specified LUN was not found. |
| 5374876 | The specified LUN was not found. |
*/
type LunDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun delete default response
func (o *LunDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun delete default response has a 2xx status code
func (o *LunDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun delete default response has a 3xx status code
func (o *LunDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun delete default response has a 4xx status code
func (o *LunDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun delete default response has a 5xx status code
func (o *LunDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun delete default response a status code equal to that given
func (o *LunDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /storage/luns/{uuid}][%d] lun_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /storage/luns/{uuid}][%d] lun_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunDeleteDefault) 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/s_a_n/lun_map_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunMapCollectionGetParams creates a new LunMapCollectionGetParams 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 NewLunMapCollectionGetParams() *LunMapCollectionGetParams {
return &LunMapCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapCollectionGetParamsWithTimeout creates a new LunMapCollectionGetParams object
// with the ability to set a timeout on a request.
func NewLunMapCollectionGetParamsWithTimeout(timeout time.Duration) *LunMapCollectionGetParams {
return &LunMapCollectionGetParams{
timeout: timeout,
}
}
// NewLunMapCollectionGetParamsWithContext creates a new LunMapCollectionGetParams object
// with the ability to set a context for a request.
func NewLunMapCollectionGetParamsWithContext(ctx context.Context) *LunMapCollectionGetParams {
return &LunMapCollectionGetParams{
Context: ctx,
}
}
// NewLunMapCollectionGetParamsWithHTTPClient creates a new LunMapCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapCollectionGetParamsWithHTTPClient(client *http.Client) *LunMapCollectionGetParams {
return &LunMapCollectionGetParams{
HTTPClient: client,
}
}
/*
LunMapCollectionGetParams contains all the parameters to send to the API endpoint
for the lun map collection get operation.
Typically these are written to a http.Request.
*/
type LunMapCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupInitiators.
Filter by igroup.initiators
*/
IgroupInitiators *string
/* IgroupName.
Filter by igroup.name
*/
IgroupName *string
/* IgroupOsType.
Filter by igroup.os_type
*/
IgroupOsType *string
/* IgroupProtocol.
Filter by igroup.protocol
*/
IgroupProtocol *string
/* IgroupUUID.
Filter by igroup.uuid
*/
IgroupUUID *string
/* LogicalUnitNumber.
Filter by logical_unit_number
*/
LogicalUnitNumber *int64
/* LunName.
Filter by lun.name
*/
LunName *string
/* LunNodeName.
Filter by lun.node.name
*/
LunNodeName *string
/* LunNodeUUID.
Filter by lun.node.uuid
*/
LunNodeUUID *string
/* LunUUID.
Filter by lun.uuid
*/
LunUUID *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
/* ReportingNodesName.
Filter by reporting_nodes.name
*/
ReportingNodesName *string
/* ReportingNodesUUID.
Filter by reporting_nodes.uuid
*/
ReportingNodesUUID *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 lun map collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapCollectionGetParams) WithDefaults() *LunMapCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := LunMapCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun map collection get params
func (o *LunMapCollectionGetParams) WithTimeout(timeout time.Duration) *LunMapCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map collection get params
func (o *LunMapCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map collection get params
func (o *LunMapCollectionGetParams) WithContext(ctx context.Context) *LunMapCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map collection get params
func (o *LunMapCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map collection get params
func (o *LunMapCollectionGetParams) WithHTTPClient(client *http.Client) *LunMapCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map collection get params
func (o *LunMapCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the lun map collection get params
func (o *LunMapCollectionGetParams) WithFields(fields []string) *LunMapCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun map collection get params
func (o *LunMapCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupInitiators adds the igroupInitiators to the lun map collection get params
func (o *LunMapCollectionGetParams) WithIgroupInitiators(igroupInitiators *string) *LunMapCollectionGetParams {
o.SetIgroupInitiators(igroupInitiators)
return o
}
// SetIgroupInitiators adds the igroupInitiators to the lun map collection get params
func (o *LunMapCollectionGetParams) SetIgroupInitiators(igroupInitiators *string) {
o.IgroupInitiators = igroupInitiators
}
// WithIgroupName adds the igroupName to the lun map collection get params
func (o *LunMapCollectionGetParams) WithIgroupName(igroupName *string) *LunMapCollectionGetParams {
o.SetIgroupName(igroupName)
return o
}
// SetIgroupName adds the igroupName to the lun map collection get params
func (o *LunMapCollectionGetParams) SetIgroupName(igroupName *string) {
o.IgroupName = igroupName
}
// WithIgroupOsType adds the igroupOsType to the lun map collection get params
func (o *LunMapCollectionGetParams) WithIgroupOsType(igroupOsType *string) *LunMapCollectionGetParams {
o.SetIgroupOsType(igroupOsType)
return o
}
// SetIgroupOsType adds the igroupOsType to the lun map collection get params
func (o *LunMapCollectionGetParams) SetIgroupOsType(igroupOsType *string) {
o.IgroupOsType = igroupOsType
}
// WithIgroupProtocol adds the igroupProtocol to the lun map collection get params
func (o *LunMapCollectionGetParams) WithIgroupProtocol(igroupProtocol *string) *LunMapCollectionGetParams {
o.SetIgroupProtocol(igroupProtocol)
return o
}
// SetIgroupProtocol adds the igroupProtocol to the lun map collection get params
func (o *LunMapCollectionGetParams) SetIgroupProtocol(igroupProtocol *string) {
o.IgroupProtocol = igroupProtocol
}
// WithIgroupUUID adds the igroupUUID to the lun map collection get params
func (o *LunMapCollectionGetParams) WithIgroupUUID(igroupUUID *string) *LunMapCollectionGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map collection get params
func (o *LunMapCollectionGetParams) SetIgroupUUID(igroupUUID *string) {
o.IgroupUUID = igroupUUID
}
// WithLogicalUnitNumber adds the logicalUnitNumber to the lun map collection get params
func (o *LunMapCollectionGetParams) WithLogicalUnitNumber(logicalUnitNumber *int64) *LunMapCollectionGetParams {
o.SetLogicalUnitNumber(logicalUnitNumber)
return o
}
// SetLogicalUnitNumber adds the logicalUnitNumber to the lun map collection get params
func (o *LunMapCollectionGetParams) SetLogicalUnitNumber(logicalUnitNumber *int64) {
o.LogicalUnitNumber = logicalUnitNumber
}
// WithLunName adds the lunName to the lun map collection get params
func (o *LunMapCollectionGetParams) WithLunName(lunName *string) *LunMapCollectionGetParams {
o.SetLunName(lunName)
return o
}
// SetLunName adds the lunName to the lun map collection get params
func (o *LunMapCollectionGetParams) SetLunName(lunName *string) {
o.LunName = lunName
}
// WithLunNodeName adds the lunNodeName to the lun map collection get params
func (o *LunMapCollectionGetParams) WithLunNodeName(lunNodeName *string) *LunMapCollectionGetParams {
o.SetLunNodeName(lunNodeName)
return o
}
// SetLunNodeName adds the lunNodeName to the lun map collection get params
func (o *LunMapCollectionGetParams) SetLunNodeName(lunNodeName *string) {
o.LunNodeName = lunNodeName
}
// WithLunNodeUUID adds the lunNodeUUID to the lun map collection get params
func (o *LunMapCollectionGetParams) WithLunNodeUUID(lunNodeUUID *string) *LunMapCollectionGetParams {
o.SetLunNodeUUID(lunNodeUUID)
return o
}
// SetLunNodeUUID adds the lunNodeUuid to the lun map collection get params
func (o *LunMapCollectionGetParams) SetLunNodeUUID(lunNodeUUID *string) {
o.LunNodeUUID = lunNodeUUID
}
// WithLunUUID adds the lunUUID to the lun map collection get params
func (o *LunMapCollectionGetParams) WithLunUUID(lunUUID *string) *LunMapCollectionGetParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map collection get params
func (o *LunMapCollectionGetParams) SetLunUUID(lunUUID *string) {
o.LunUUID = lunUUID
}
// WithMaxRecords adds the maxRecords to the lun map collection get params
func (o *LunMapCollectionGetParams) WithMaxRecords(maxRecords *int64) *LunMapCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the lun map collection get params
func (o *LunMapCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the lun map collection get params
func (o *LunMapCollectionGetParams) WithOrderBy(orderBy []string) *LunMapCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the lun map collection get params
func (o *LunMapCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReportingNodesName adds the reportingNodesName to the lun map collection get params
func (o *LunMapCollectionGetParams) WithReportingNodesName(reportingNodesName *string) *LunMapCollectionGetParams {
o.SetReportingNodesName(reportingNodesName)
return o
}
// SetReportingNodesName adds the reportingNodesName to the lun map collection get params
func (o *LunMapCollectionGetParams) SetReportingNodesName(reportingNodesName *string) {
o.ReportingNodesName = reportingNodesName
}
// WithReportingNodesUUID adds the reportingNodesUUID to the lun map collection get params
func (o *LunMapCollectionGetParams) WithReportingNodesUUID(reportingNodesUUID *string) *LunMapCollectionGetParams {
o.SetReportingNodesUUID(reportingNodesUUID)
return o
}
// SetReportingNodesUUID adds the reportingNodesUuid to the lun map collection get params
func (o *LunMapCollectionGetParams) SetReportingNodesUUID(reportingNodesUUID *string) {
o.ReportingNodesUUID = reportingNodesUUID
}
// WithReturnRecords adds the returnRecords to the lun map collection get params
func (o *LunMapCollectionGetParams) WithReturnRecords(returnRecords *bool) *LunMapCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun map collection get params
func (o *LunMapCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the lun map collection get params
func (o *LunMapCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *LunMapCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the lun map collection get params
func (o *LunMapCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the lun map collection get params
func (o *LunMapCollectionGetParams) WithSvmName(svmName *string) *LunMapCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the lun map collection get params
func (o *LunMapCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the lun map collection get params
func (o *LunMapCollectionGetParams) WithSvmUUID(svmUUID *string) *LunMapCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the lun map collection get params
func (o *LunMapCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapCollectionGetParams) 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.IgroupInitiators != nil {
// query param igroup.initiators
var qrIgroupInitiators string
if o.IgroupInitiators != nil {
qrIgroupInitiators = *o.IgroupInitiators
}
qIgroupInitiators := qrIgroupInitiators
if qIgroupInitiators != "" {
if err := r.SetQueryParam("igroup.initiators", qIgroupInitiators); err != nil {
return err
}
}
}
if o.IgroupName != nil {
// query param igroup.name
var qrIgroupName string
if o.IgroupName != nil {
qrIgroupName = *o.IgroupName
}
qIgroupName := qrIgroupName
if qIgroupName != "" {
if err := r.SetQueryParam("igroup.name", qIgroupName); err != nil {
return err
}
}
}
if o.IgroupOsType != nil {
// query param igroup.os_type
var qrIgroupOsType string
if o.IgroupOsType != nil {
qrIgroupOsType = *o.IgroupOsType
}
qIgroupOsType := qrIgroupOsType
if qIgroupOsType != "" {
if err := r.SetQueryParam("igroup.os_type", qIgroupOsType); err != nil {
return err
}
}
}
if o.IgroupProtocol != nil {
// query param igroup.protocol
var qrIgroupProtocol string
if o.IgroupProtocol != nil {
qrIgroupProtocol = *o.IgroupProtocol
}
qIgroupProtocol := qrIgroupProtocol
if qIgroupProtocol != "" {
if err := r.SetQueryParam("igroup.protocol", qIgroupProtocol); err != nil {
return err
}
}
}
if o.IgroupUUID != nil {
// query param igroup.uuid
var qrIgroupUUID string
if o.IgroupUUID != nil {
qrIgroupUUID = *o.IgroupUUID
}
qIgroupUUID := qrIgroupUUID
if qIgroupUUID != "" {
if err := r.SetQueryParam("igroup.uuid", qIgroupUUID); err != nil {
return err
}
}
}
if o.LogicalUnitNumber != nil {
// query param logical_unit_number
var qrLogicalUnitNumber int64
if o.LogicalUnitNumber != nil {
qrLogicalUnitNumber = *o.LogicalUnitNumber
}
qLogicalUnitNumber := swag.FormatInt64(qrLogicalUnitNumber)
if qLogicalUnitNumber != "" {
if err := r.SetQueryParam("logical_unit_number", qLogicalUnitNumber); err != nil {
return err
}
}
}
if o.LunName != nil {
// query param lun.name
var qrLunName string
if o.LunName != nil {
qrLunName = *o.LunName
}
qLunName := qrLunName
if qLunName != "" {
if err := r.SetQueryParam("lun.name", qLunName); err != nil {
return err
}
}
}
if o.LunNodeName != nil {
// query param lun.node.name
var qrLunNodeName string
if o.LunNodeName != nil {
qrLunNodeName = *o.LunNodeName
}
qLunNodeName := qrLunNodeName
if qLunNodeName != "" {
if err := r.SetQueryParam("lun.node.name", qLunNodeName); err != nil {
return err
}
}
}
if o.LunNodeUUID != nil {
// query param lun.node.uuid
var qrLunNodeUUID string
if o.LunNodeUUID != nil {
qrLunNodeUUID = *o.LunNodeUUID
}
qLunNodeUUID := qrLunNodeUUID
if qLunNodeUUID != "" {
if err := r.SetQueryParam("lun.node.uuid", qLunNodeUUID); err != nil {
return err
}
}
}
if o.LunUUID != nil {
// query param lun.uuid
var qrLunUUID string
if o.LunUUID != nil {
qrLunUUID = *o.LunUUID
}
qLunUUID := qrLunUUID
if qLunUUID != "" {
if err := r.SetQueryParam("lun.uuid", qLunUUID); 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.ReportingNodesName != nil {
// query param reporting_nodes.name
var qrReportingNodesName string
if o.ReportingNodesName != nil {
qrReportingNodesName = *o.ReportingNodesName
}
qReportingNodesName := qrReportingNodesName
if qReportingNodesName != "" {
if err := r.SetQueryParam("reporting_nodes.name", qReportingNodesName); err != nil {
return err
}
}
}
if o.ReportingNodesUUID != nil {
// query param reporting_nodes.uuid
var qrReportingNodesUUID string
if o.ReportingNodesUUID != nil {
qrReportingNodesUUID = *o.ReportingNodesUUID
}
qReportingNodesUUID := qrReportingNodesUUID
if qReportingNodesUUID != "" {
if err := r.SetQueryParam("reporting_nodes.uuid", qReportingNodesUUID); 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
}
// bindParamLunMapCollectionGet binds the parameter fields
func (o *LunMapCollectionGetParams) 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
}
// bindParamLunMapCollectionGet binds the parameter order_by
func (o *LunMapCollectionGetParams) 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/s_a_n/lun_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunCreateParams creates a new LunCreateParams 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 NewLunCreateParams() *LunCreateParams {
return &LunCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunCreateParamsWithTimeout creates a new LunCreateParams object
// with the ability to set a timeout on a request.
func NewLunCreateParamsWithTimeout(timeout time.Duration) *LunCreateParams {
return &LunCreateParams{
timeout: timeout,
}
}
// NewLunCreateParamsWithContext creates a new LunCreateParams object
// with the ability to set a context for a request.
func NewLunCreateParamsWithContext(ctx context.Context) *LunCreateParams {
return &LunCreateParams{
Context: ctx,
}
}
// NewLunCreateParamsWithHTTPClient creates a new LunCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunCreateParamsWithHTTPClient(client *http.Client) *LunCreateParams {
return &LunCreateParams{
HTTPClient: client,
}
}
/*
LunCreateParams contains all the parameters to send to the API endpoint
for the lun create operation.
Typically these are written to a http.Request.
*/
type LunCreateParams struct {
/* Info.
The property values for the new LUN.
*/
Info *models.Lun
/* 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 lun create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCreateParams) WithDefaults() *LunCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := LunCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun create params
func (o *LunCreateParams) WithTimeout(timeout time.Duration) *LunCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun create params
func (o *LunCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun create params
func (o *LunCreateParams) WithContext(ctx context.Context) *LunCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun create params
func (o *LunCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun create params
func (o *LunCreateParams) WithHTTPClient(client *http.Client) *LunCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun create params
func (o *LunCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the lun create params
func (o *LunCreateParams) WithInfo(info *models.Lun) *LunCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun create params
func (o *LunCreateParams) SetInfo(info *models.Lun) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the lun create params
func (o *LunCreateParams) WithReturnRecords(returnRecords *bool) *LunCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun create params
func (o *LunCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *LunCreateParams) 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/s_a_n/igroup_initiator_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupInitiatorGetParams creates a new IgroupInitiatorGetParams 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 NewIgroupInitiatorGetParams() *IgroupInitiatorGetParams {
return &IgroupInitiatorGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupInitiatorGetParamsWithTimeout creates a new IgroupInitiatorGetParams object
// with the ability to set a timeout on a request.
func NewIgroupInitiatorGetParamsWithTimeout(timeout time.Duration) *IgroupInitiatorGetParams {
return &IgroupInitiatorGetParams{
timeout: timeout,
}
}
// NewIgroupInitiatorGetParamsWithContext creates a new IgroupInitiatorGetParams object
// with the ability to set a context for a request.
func NewIgroupInitiatorGetParamsWithContext(ctx context.Context) *IgroupInitiatorGetParams {
return &IgroupInitiatorGetParams{
Context: ctx,
}
}
// NewIgroupInitiatorGetParamsWithHTTPClient creates a new IgroupInitiatorGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupInitiatorGetParamsWithHTTPClient(client *http.Client) *IgroupInitiatorGetParams {
return &IgroupInitiatorGetParams{
HTTPClient: client,
}
}
/*
IgroupInitiatorGetParams contains all the parameters to send to the API endpoint
for the igroup initiator get operation.
Typically these are written to a http.Request.
*/
type IgroupInitiatorGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupUUID.
The unique identifier of the initiator group.
*/
IgroupUUID string
/* Name.
Initiator name
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup initiator get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorGetParams) WithDefaults() *IgroupInitiatorGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup initiator get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithTimeout(timeout time.Duration) *IgroupInitiatorGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithContext(ctx context.Context) *IgroupInitiatorGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithHTTPClient(client *http.Client) *IgroupInitiatorGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithFields(fields []string) *IgroupInitiatorGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithIgroupUUID(igroupUUID string) *IgroupInitiatorGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithName adds the name to the igroup initiator get params
func (o *IgroupInitiatorGetParams) WithName(name string) *IgroupInitiatorGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the igroup initiator get params
func (o *IgroupInitiatorGetParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupInitiatorGetParams) 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 igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
// path param name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIgroupInitiatorGet binds the parameter fields
func (o *IgroupInitiatorGetParams) 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/s_a_n/portset_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetGetParams creates a new PortsetGetParams 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 NewPortsetGetParams() *PortsetGetParams {
return &PortsetGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetGetParamsWithTimeout creates a new PortsetGetParams object
// with the ability to set a timeout on a request.
func NewPortsetGetParamsWithTimeout(timeout time.Duration) *PortsetGetParams {
return &PortsetGetParams{
timeout: timeout,
}
}
// NewPortsetGetParamsWithContext creates a new PortsetGetParams object
// with the ability to set a context for a request.
func NewPortsetGetParamsWithContext(ctx context.Context) *PortsetGetParams {
return &PortsetGetParams{
Context: ctx,
}
}
// NewPortsetGetParamsWithHTTPClient creates a new PortsetGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetGetParamsWithHTTPClient(client *http.Client) *PortsetGetParams {
return &PortsetGetParams{
HTTPClient: client,
}
}
/*
PortsetGetParams contains all the parameters to send to the API endpoint
for the portset get operation.
Typically these are written to a http.Request.
*/
type PortsetGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
The unique identifier of the portset.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the portset get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetGetParams) WithDefaults() *PortsetGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the portset get params
func (o *PortsetGetParams) WithTimeout(timeout time.Duration) *PortsetGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset get params
func (o *PortsetGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset get params
func (o *PortsetGetParams) WithContext(ctx context.Context) *PortsetGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset get params
func (o *PortsetGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset get params
func (o *PortsetGetParams) WithHTTPClient(client *http.Client) *PortsetGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset get params
func (o *PortsetGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the portset get params
func (o *PortsetGetParams) WithFields(fields []string) *PortsetGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the portset get params
func (o *PortsetGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the portset get params
func (o *PortsetGetParams) WithUUID(uuid string) *PortsetGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the portset get params
func (o *PortsetGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetGetParams) 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
}
// bindParamPortsetGet binds the parameter fields
func (o *PortsetGetParams) 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/s_a_n/lun_map_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapCreateReader is a Reader for the LunMapCreate structure.
type LunMapCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewLunMapCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapCreateDefault(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
}
}
// NewLunMapCreateCreated creates a LunMapCreateCreated with default headers values
func NewLunMapCreateCreated() *LunMapCreateCreated {
return &LunMapCreateCreated{}
}
/*
LunMapCreateCreated describes a response with status code 201, with default header values.
Created
*/
type LunMapCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.LunMapResponse
}
// IsSuccess returns true when this lun map create created response has a 2xx status code
func (o *LunMapCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map create created response has a 3xx status code
func (o *LunMapCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map create created response has a 4xx status code
func (o *LunMapCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map create created response has a 5xx status code
func (o *LunMapCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this lun map create created response a status code equal to that given
func (o *LunMapCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *LunMapCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps][%d] lunMapCreateCreated %+v", 201, o.Payload)
}
func (o *LunMapCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps][%d] lunMapCreateCreated %+v", 201, o.Payload)
}
func (o *LunMapCreateCreated) GetPayload() *models.LunMapResponse {
return o.Payload
}
func (o *LunMapCreateCreated) 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.LunMapResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunMapCreateDefault creates a LunMapCreateDefault with default headers values
func NewLunMapCreateDefault(code int) *LunMapCreateDefault {
return &LunMapCreateDefault{
_statusCode: code,
}
}
/*
LunMapCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254207 | The LUN is already mapped to the same initiator group. |
| 2621462 | The specified SVM does not exist or is not accessible to the caller. |
| 2621706 | Both the SVM UUID and SVM name were supplied, but don't refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5374053 | The LUN is the destination of an ongoing restore operation and is inaccessible for I/O and management. Wait for the restore to complete and try the command again. |
| 5374238 | The operation is not allowed on a LUN in a Snapshot copy. |
| 5374316 | A LUN move operation is in progress on the source LUN. |
| 5374329 | A LUN of class `vvol` cannot be mapped. |
| 5374573 | A node has no interface configured with the iSCSI or Fibre Channel protocols for the specified SVM. |
| 5374574 | Multiple nodes have no interface configured with the iSCSI or Fibre Channel protocols for the specified SVM. |
| 5374581 | A node has no interface configured with the iSCSI protocol for the specified SVM. |
| 5374582 | Multiple nodes have no interface configured with the iSCSI protocol for the specified SVM. |
| 5374583 | A node has no interface configured with the Fibre Channel protocol for the specified SVM. |
| 5374584 | Multiple nodes have no interface configured with the Fibre Channel protocol for the specified SVM. |
| 5374901 | Either `lun.uuid` or `lun.name` must be provided to create a LUN map. |
| 5374902 | Either `igroup.uuid` or `igroup.name` must be provided to create a LUN map. |
| 5374920 | The cluster node specified in additional_reporting_node does not exist. |
| 5374921 | The cluster node name and UUID specified in additional_reporting_node do not refer to the same cluster node. |
*/
type LunMapCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map create default response
func (o *LunMapCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map create default response has a 2xx status code
func (o *LunMapCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map create default response has a 3xx status code
func (o *LunMapCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map create default response has a 4xx status code
func (o *LunMapCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map create default response has a 5xx status code
func (o *LunMapCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map create default response a status code equal to that given
func (o *LunMapCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps][%d] lun_map_create default %+v", o._statusCode, o.Payload)
}
func (o *LunMapCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps][%d] lun_map_create default %+v", o._statusCode, o.Payload)
}
func (o *LunMapCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapCreateDefault) 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/s_a_n/iscsi_session_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_session_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiSessionGetReader is a Reader for the IscsiSessionGet structure.
type IscsiSessionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiSessionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiSessionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiSessionGetDefault(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
}
}
// NewIscsiSessionGetOK creates a IscsiSessionGetOK with default headers values
func NewIscsiSessionGetOK() *IscsiSessionGetOK {
return &IscsiSessionGetOK{}
}
/*
IscsiSessionGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiSessionGetOK struct {
Payload *models.IscsiSession
}
// IsSuccess returns true when this iscsi session get o k response has a 2xx status code
func (o *IscsiSessionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi session get o k response has a 3xx status code
func (o *IscsiSessionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi session get o k response has a 4xx status code
func (o *IscsiSessionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi session get o k response has a 5xx status code
func (o *IscsiSessionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi session get o k response a status code equal to that given
func (o *IscsiSessionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiSessionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions/{svm.uuid}/{tpgroup}/{tsih}][%d] iscsiSessionGetOK %+v", 200, o.Payload)
}
func (o *IscsiSessionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions/{svm.uuid}/{tpgroup}/{tsih}][%d] iscsiSessionGetOK %+v", 200, o.Payload)
}
func (o *IscsiSessionGetOK) GetPayload() *models.IscsiSession {
return o.Payload
}
func (o *IscsiSessionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiSession)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiSessionGetDefault creates a IscsiSessionGetDefault with default headers values
func NewIscsiSessionGetDefault(code int) *IscsiSessionGetDefault {
return &IscsiSessionGetDefault{
_statusCode: code,
}
}
/*
IscsiSessionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
*/
type IscsiSessionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi session get default response
func (o *IscsiSessionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi session get default response has a 2xx status code
func (o *IscsiSessionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi session get default response has a 3xx status code
func (o *IscsiSessionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi session get default response has a 4xx status code
func (o *IscsiSessionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi session get default response has a 5xx status code
func (o *IscsiSessionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi session get default response a status code equal to that given
func (o *IscsiSessionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiSessionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions/{svm.uuid}/{tpgroup}/{tsih}][%d] iscsi_session_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiSessionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions/{svm.uuid}/{tpgroup}/{tsih}][%d] iscsi_session_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiSessionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiSessionGetDefault) 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/s_a_n/wwpn_alias_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// WwpnAliasCreateReader is a Reader for the WwpnAliasCreate structure.
type WwpnAliasCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WwpnAliasCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewWwpnAliasCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWwpnAliasCreateDefault(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
}
}
// NewWwpnAliasCreateCreated creates a WwpnAliasCreateCreated with default headers values
func NewWwpnAliasCreateCreated() *WwpnAliasCreateCreated {
return &WwpnAliasCreateCreated{}
}
/*
WwpnAliasCreateCreated describes a response with status code 201, with default header values.
Created
*/
type WwpnAliasCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.WwpnAliasResponse
}
// IsSuccess returns true when this wwpn alias create created response has a 2xx status code
func (o *WwpnAliasCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this wwpn alias create created response has a 3xx status code
func (o *WwpnAliasCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this wwpn alias create created response has a 4xx status code
func (o *WwpnAliasCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this wwpn alias create created response has a 5xx status code
func (o *WwpnAliasCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this wwpn alias create created response a status code equal to that given
func (o *WwpnAliasCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *WwpnAliasCreateCreated) Error() string {
return fmt.Sprintf("[POST /network/fc/wwpn-aliases][%d] wwpnAliasCreateCreated %+v", 201, o.Payload)
}
func (o *WwpnAliasCreateCreated) String() string {
return fmt.Sprintf("[POST /network/fc/wwpn-aliases][%d] wwpnAliasCreateCreated %+v", 201, o.Payload)
}
func (o *WwpnAliasCreateCreated) GetPayload() *models.WwpnAliasResponse {
return o.Payload
}
func (o *WwpnAliasCreateCreated) 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.WwpnAliasResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewWwpnAliasCreateDefault creates a WwpnAliasCreateDefault with default headers values
func NewWwpnAliasCreateDefault(code int) *WwpnAliasCreateDefault {
return &WwpnAliasCreateDefault{
_statusCode: code,
}
}
/*
WwpnAliasCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254317 | The alias already exists. |
| 1260882 | The supplied SVM does not exist. |
| 2621462 | The supplied SVM does not exist. |
| 2621706 | Both the SVM UUID and SVM name were supplied, but do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5373982 | An invalid WWPN was supplied. The valid WWN format is XX:XX:XX:XX:XX:XX:XX:XX, where X is a hexadecimal digit. Example: "01:02:03:04:0a:0b:0c:0d". |
*/
type WwpnAliasCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the wwpn alias create default response
func (o *WwpnAliasCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this wwpn alias create default response has a 2xx status code
func (o *WwpnAliasCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this wwpn alias create default response has a 3xx status code
func (o *WwpnAliasCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this wwpn alias create default response has a 4xx status code
func (o *WwpnAliasCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this wwpn alias create default response has a 5xx status code
func (o *WwpnAliasCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this wwpn alias create default response a status code equal to that given
func (o *WwpnAliasCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WwpnAliasCreateDefault) Error() string {
return fmt.Sprintf("[POST /network/fc/wwpn-aliases][%d] wwpn_alias_create default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasCreateDefault) String() string {
return fmt.Sprintf("[POST /network/fc/wwpn-aliases][%d] wwpn_alias_create default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WwpnAliasCreateDefault) 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/s_a_n/portset_interface_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetInterfaceDeleteParams creates a new PortsetInterfaceDeleteParams 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 NewPortsetInterfaceDeleteParams() *PortsetInterfaceDeleteParams {
return &PortsetInterfaceDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetInterfaceDeleteParamsWithTimeout creates a new PortsetInterfaceDeleteParams object
// with the ability to set a timeout on a request.
func NewPortsetInterfaceDeleteParamsWithTimeout(timeout time.Duration) *PortsetInterfaceDeleteParams {
return &PortsetInterfaceDeleteParams{
timeout: timeout,
}
}
// NewPortsetInterfaceDeleteParamsWithContext creates a new PortsetInterfaceDeleteParams object
// with the ability to set a context for a request.
func NewPortsetInterfaceDeleteParamsWithContext(ctx context.Context) *PortsetInterfaceDeleteParams {
return &PortsetInterfaceDeleteParams{
Context: ctx,
}
}
// NewPortsetInterfaceDeleteParamsWithHTTPClient creates a new PortsetInterfaceDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetInterfaceDeleteParamsWithHTTPClient(client *http.Client) *PortsetInterfaceDeleteParams {
return &PortsetInterfaceDeleteParams{
HTTPClient: client,
}
}
/*
PortsetInterfaceDeleteParams contains all the parameters to send to the API endpoint
for the portset interface delete operation.
Typically these are written to a http.Request.
*/
type PortsetInterfaceDeleteParams struct {
/* PortsetUUID.
The unique identifier of the portset.
*/
PortsetUUID string
/* UUID.
The unique identifier of the network interface in the portset.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the portset interface delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceDeleteParams) WithDefaults() *PortsetInterfaceDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset interface delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) WithTimeout(timeout time.Duration) *PortsetInterfaceDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) WithContext(ctx context.Context) *PortsetInterfaceDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) WithHTTPClient(client *http.Client) *PortsetInterfaceDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithPortsetUUID adds the portsetUUID to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) WithPortsetUUID(portsetUUID string) *PortsetInterfaceDeleteParams {
o.SetPortsetUUID(portsetUUID)
return o
}
// SetPortsetUUID adds the portsetUuid to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) SetPortsetUUID(portsetUUID string) {
o.PortsetUUID = portsetUUID
}
// WithUUID adds the uuid to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) WithUUID(uuid string) *PortsetInterfaceDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the portset interface delete params
func (o *PortsetInterfaceDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetInterfaceDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param portset.uuid
if err := r.SetPathParam("portset.uuid", o.PortsetUUID); 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/s_a_n/iscsi_session_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_session_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiSessionGetParams creates a new IscsiSessionGetParams 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 NewIscsiSessionGetParams() *IscsiSessionGetParams {
return &IscsiSessionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiSessionGetParamsWithTimeout creates a new IscsiSessionGetParams object
// with the ability to set a timeout on a request.
func NewIscsiSessionGetParamsWithTimeout(timeout time.Duration) *IscsiSessionGetParams {
return &IscsiSessionGetParams{
timeout: timeout,
}
}
// NewIscsiSessionGetParamsWithContext creates a new IscsiSessionGetParams object
// with the ability to set a context for a request.
func NewIscsiSessionGetParamsWithContext(ctx context.Context) *IscsiSessionGetParams {
return &IscsiSessionGetParams{
Context: ctx,
}
}
// NewIscsiSessionGetParamsWithHTTPClient creates a new IscsiSessionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiSessionGetParamsWithHTTPClient(client *http.Client) *IscsiSessionGetParams {
return &IscsiSessionGetParams{
HTTPClient: client,
}
}
/*
IscsiSessionGetParams contains all the parameters to send to the API endpoint
for the iscsi session get operation.
Typically these are written to a http.Request.
*/
type IscsiSessionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* SvmUUID.
The unique identifier of the SVM of the iSCSI session.
*/
SvmUUID string
/* Tpgroup.
The target portal group of the iSCSI session.
*/
Tpgroup string
/* Tsih.
The target session identifying handle.
*/
Tsih int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi session get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiSessionGetParams) WithDefaults() *IscsiSessionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi session get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiSessionGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi session get params
func (o *IscsiSessionGetParams) WithTimeout(timeout time.Duration) *IscsiSessionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi session get params
func (o *IscsiSessionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi session get params
func (o *IscsiSessionGetParams) WithContext(ctx context.Context) *IscsiSessionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi session get params
func (o *IscsiSessionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi session get params
func (o *IscsiSessionGetParams) WithHTTPClient(client *http.Client) *IscsiSessionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi session get params
func (o *IscsiSessionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the iscsi session get params
func (o *IscsiSessionGetParams) WithFields(fields []string) *IscsiSessionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi session get params
func (o *IscsiSessionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithSvmUUID adds the svmUUID to the iscsi session get params
func (o *IscsiSessionGetParams) WithSvmUUID(svmUUID string) *IscsiSessionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi session get params
func (o *IscsiSessionGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WithTpgroup adds the tpgroup to the iscsi session get params
func (o *IscsiSessionGetParams) WithTpgroup(tpgroup string) *IscsiSessionGetParams {
o.SetTpgroup(tpgroup)
return o
}
// SetTpgroup adds the tpgroup to the iscsi session get params
func (o *IscsiSessionGetParams) SetTpgroup(tpgroup string) {
o.Tpgroup = tpgroup
}
// WithTsih adds the tsih to the iscsi session get params
func (o *IscsiSessionGetParams) WithTsih(tsih int64) *IscsiSessionGetParams {
o.SetTsih(tsih)
return o
}
// SetTsih adds the tsih to the iscsi session get params
func (o *IscsiSessionGetParams) SetTsih(tsih int64) {
o.Tsih = tsih
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiSessionGetParams) 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
}
// path param tpgroup
if err := r.SetPathParam("tpgroup", o.Tpgroup); err != nil {
return err
}
// path param tsih
if err := r.SetPathParam("tsih", swag.FormatInt64(o.Tsih)); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIscsiSessionGet binds the parameter fields
func (o *IscsiSessionGetParams) 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/s_a_n/lun_attribute_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunAttributeModifyReader is a Reader for the LunAttributeModify structure.
type LunAttributeModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunAttributeModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunAttributeModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunAttributeModifyDefault(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
}
}
// NewLunAttributeModifyOK creates a LunAttributeModifyOK with default headers values
func NewLunAttributeModifyOK() *LunAttributeModifyOK {
return &LunAttributeModifyOK{}
}
/*
LunAttributeModifyOK describes a response with status code 200, with default header values.
OK
*/
type LunAttributeModifyOK struct {
}
// IsSuccess returns true when this lun attribute modify o k response has a 2xx status code
func (o *LunAttributeModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun attribute modify o k response has a 3xx status code
func (o *LunAttributeModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun attribute modify o k response has a 4xx status code
func (o *LunAttributeModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun attribute modify o k response has a 5xx status code
func (o *LunAttributeModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun attribute modify o k response a status code equal to that given
func (o *LunAttributeModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *LunAttributeModifyOK) Error() string {
return fmt.Sprintf("[PATCH /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeModifyOK ", 200)
}
func (o *LunAttributeModifyOK) String() string {
return fmt.Sprintf("[PATCH /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeModifyOK ", 200)
}
func (o *LunAttributeModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewLunAttributeModifyDefault creates a LunAttributeModifyDefault with default headers values
func NewLunAttributeModifyDefault(code int) *LunAttributeModifyDefault {
return &LunAttributeModifyDefault{
_statusCode: code,
}
}
/*
LunAttributeModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN was not found. |
| 5374929 | The combined sizes of an attribute name and value are too large. |
| 5374931 | The specified attribute was not found. |
*/
type LunAttributeModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun attribute modify default response
func (o *LunAttributeModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun attribute modify default response has a 2xx status code
func (o *LunAttributeModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun attribute modify default response has a 3xx status code
func (o *LunAttributeModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun attribute modify default response has a 4xx status code
func (o *LunAttributeModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun attribute modify default response has a 5xx status code
func (o *LunAttributeModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun attribute modify default response a status code equal to that given
func (o *LunAttributeModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunAttributeModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_modify default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeModifyDefault) String() string {
return fmt.Sprintf("[PATCH /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_modify default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunAttributeModifyDefault) 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/s_a_n/lun_attribute_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunAttributeCreateReader is a Reader for the LunAttributeCreate structure.
type LunAttributeCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunAttributeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewLunAttributeCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunAttributeCreateDefault(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
}
}
// NewLunAttributeCreateCreated creates a LunAttributeCreateCreated with default headers values
func NewLunAttributeCreateCreated() *LunAttributeCreateCreated {
return &LunAttributeCreateCreated{}
}
/*
LunAttributeCreateCreated describes a response with status code 201, with default header values.
Created
*/
type LunAttributeCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.LunAttributeResponse
}
// IsSuccess returns true when this lun attribute create created response has a 2xx status code
func (o *LunAttributeCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun attribute create created response has a 3xx status code
func (o *LunAttributeCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun attribute create created response has a 4xx status code
func (o *LunAttributeCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this lun attribute create created response has a 5xx status code
func (o *LunAttributeCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this lun attribute create created response a status code equal to that given
func (o *LunAttributeCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *LunAttributeCreateCreated) Error() string {
return fmt.Sprintf("[POST /storage/luns/{lun.uuid}/attributes][%d] lunAttributeCreateCreated %+v", 201, o.Payload)
}
func (o *LunAttributeCreateCreated) String() string {
return fmt.Sprintf("[POST /storage/luns/{lun.uuid}/attributes][%d] lunAttributeCreateCreated %+v", 201, o.Payload)
}
func (o *LunAttributeCreateCreated) GetPayload() *models.LunAttributeResponse {
return o.Payload
}
func (o *LunAttributeCreateCreated) 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.LunAttributeResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunAttributeCreateDefault creates a LunAttributeCreateDefault with default headers values
func NewLunAttributeCreateDefault(code int) *LunAttributeCreateDefault {
return &LunAttributeCreateDefault{
_statusCode: code,
}
}
/*
LunAttributeCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN was not found. |
| 5374928 | An incomplete attribute name/value pair was supplied. |
| 5374929 | The combined sizes of an attribute name and value are too large. |
| 5374930 | The attribute already exists for the LUN. |
*/
type LunAttributeCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun attribute create default response
func (o *LunAttributeCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun attribute create default response has a 2xx status code
func (o *LunAttributeCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun attribute create default response has a 3xx status code
func (o *LunAttributeCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun attribute create default response has a 4xx status code
func (o *LunAttributeCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun attribute create default response has a 5xx status code
func (o *LunAttributeCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun attribute create default response a status code equal to that given
func (o *LunAttributeCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunAttributeCreateDefault) Error() string {
return fmt.Sprintf("[POST /storage/luns/{lun.uuid}/attributes][%d] lun_attribute_create default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeCreateDefault) String() string {
return fmt.Sprintf("[POST /storage/luns/{lun.uuid}/attributes][%d] lun_attribute_create default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunAttributeCreateDefault) 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/s_a_n/fcp_service_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// FcpServiceModifyReader is a Reader for the FcpServiceModify structure.
type FcpServiceModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcpServiceModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcpServiceModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcpServiceModifyDefault(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
}
}
// NewFcpServiceModifyOK creates a FcpServiceModifyOK with default headers values
func NewFcpServiceModifyOK() *FcpServiceModifyOK {
return &FcpServiceModifyOK{}
}
/*
FcpServiceModifyOK describes a response with status code 200, with default header values.
OK
*/
type FcpServiceModifyOK struct {
}
// IsSuccess returns true when this fcp service modify o k response has a 2xx status code
func (o *FcpServiceModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fcp service modify o k response has a 3xx status code
func (o *FcpServiceModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fcp service modify o k response has a 4xx status code
func (o *FcpServiceModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fcp service modify o k response has a 5xx status code
func (o *FcpServiceModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this fcp service modify o k response a status code equal to that given
func (o *FcpServiceModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *FcpServiceModifyOK) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/fcp/services/{svm.uuid}][%d] fcpServiceModifyOK ", 200)
}
func (o *FcpServiceModifyOK) String() string {
return fmt.Sprintf("[PATCH /protocols/san/fcp/services/{svm.uuid}][%d] fcpServiceModifyOK ", 200)
}
func (o *FcpServiceModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewFcpServiceModifyDefault creates a FcpServiceModifyDefault with default headers values
func NewFcpServiceModifyDefault(code int) *FcpServiceModifyDefault {
return &FcpServiceModifyDefault{
_statusCode: code,
}
}
/*
FcpServiceModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 5374083 | There is no Fibre Channel Protocol service for the specified SVM. |
*/
type FcpServiceModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fcp service modify default response
func (o *FcpServiceModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fcp service modify default response has a 2xx status code
func (o *FcpServiceModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fcp service modify default response has a 3xx status code
func (o *FcpServiceModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fcp service modify default response has a 4xx status code
func (o *FcpServiceModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fcp service modify default response has a 5xx status code
func (o *FcpServiceModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fcp service modify default response a status code equal to that given
func (o *FcpServiceModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcpServiceModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/fcp/services/{svm.uuid}][%d] fcp_service_modify default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceModifyDefault) String() string {
return fmt.Sprintf("[PATCH /protocols/san/fcp/services/{svm.uuid}][%d] fcp_service_modify default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcpServiceModifyDefault) 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/s_a_n/portset_interface_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetInterfaceGetParams creates a new PortsetInterfaceGetParams 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 NewPortsetInterfaceGetParams() *PortsetInterfaceGetParams {
return &PortsetInterfaceGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetInterfaceGetParamsWithTimeout creates a new PortsetInterfaceGetParams object
// with the ability to set a timeout on a request.
func NewPortsetInterfaceGetParamsWithTimeout(timeout time.Duration) *PortsetInterfaceGetParams {
return &PortsetInterfaceGetParams{
timeout: timeout,
}
}
// NewPortsetInterfaceGetParamsWithContext creates a new PortsetInterfaceGetParams object
// with the ability to set a context for a request.
func NewPortsetInterfaceGetParamsWithContext(ctx context.Context) *PortsetInterfaceGetParams {
return &PortsetInterfaceGetParams{
Context: ctx,
}
}
// NewPortsetInterfaceGetParamsWithHTTPClient creates a new PortsetInterfaceGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetInterfaceGetParamsWithHTTPClient(client *http.Client) *PortsetInterfaceGetParams {
return &PortsetInterfaceGetParams{
HTTPClient: client,
}
}
/*
PortsetInterfaceGetParams contains all the parameters to send to the API endpoint
for the portset interface get operation.
Typically these are written to a http.Request.
*/
type PortsetInterfaceGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* PortsetUUID.
The unique identifier of the portset.
*/
PortsetUUID string
/* UUID.
The unique identifier of the network interface in the portset.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the portset interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceGetParams) WithDefaults() *PortsetInterfaceGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the portset interface get params
func (o *PortsetInterfaceGetParams) WithTimeout(timeout time.Duration) *PortsetInterfaceGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset interface get params
func (o *PortsetInterfaceGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset interface get params
func (o *PortsetInterfaceGetParams) WithContext(ctx context.Context) *PortsetInterfaceGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset interface get params
func (o *PortsetInterfaceGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset interface get params
func (o *PortsetInterfaceGetParams) WithHTTPClient(client *http.Client) *PortsetInterfaceGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset interface get params
func (o *PortsetInterfaceGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the portset interface get params
func (o *PortsetInterfaceGetParams) WithFields(fields []string) *PortsetInterfaceGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the portset interface get params
func (o *PortsetInterfaceGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithPortsetUUID adds the portsetUUID to the portset interface get params
func (o *PortsetInterfaceGetParams) WithPortsetUUID(portsetUUID string) *PortsetInterfaceGetParams {
o.SetPortsetUUID(portsetUUID)
return o
}
// SetPortsetUUID adds the portsetUuid to the portset interface get params
func (o *PortsetInterfaceGetParams) SetPortsetUUID(portsetUUID string) {
o.PortsetUUID = portsetUUID
}
// WithUUID adds the uuid to the portset interface get params
func (o *PortsetInterfaceGetParams) WithUUID(uuid string) *PortsetInterfaceGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the portset interface get params
func (o *PortsetInterfaceGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetInterfaceGetParams) 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 portset.uuid
if err := r.SetPathParam("portset.uuid", o.PortsetUUID); 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
}
// bindParamPortsetInterfaceGet binds the parameter fields
func (o *PortsetInterfaceGetParams) 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/s_a_n/iscsi_credentials_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiCredentialsCreateReader is a Reader for the IscsiCredentialsCreate structure.
type IscsiCredentialsCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiCredentialsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewIscsiCredentialsCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiCredentialsCreateDefault(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
}
}
// NewIscsiCredentialsCreateCreated creates a IscsiCredentialsCreateCreated with default headers values
func NewIscsiCredentialsCreateCreated() *IscsiCredentialsCreateCreated {
return &IscsiCredentialsCreateCreated{}
}
/*
IscsiCredentialsCreateCreated describes a response with status code 201, with default header values.
Created
*/
type IscsiCredentialsCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.IscsiCredentialsResponse
}
// IsSuccess returns true when this iscsi credentials create created response has a 2xx status code
func (o *IscsiCredentialsCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi credentials create created response has a 3xx status code
func (o *IscsiCredentialsCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi credentials create created response has a 4xx status code
func (o *IscsiCredentialsCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi credentials create created response has a 5xx status code
func (o *IscsiCredentialsCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi credentials create created response a status code equal to that given
func (o *IscsiCredentialsCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *IscsiCredentialsCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/credentials][%d] iscsiCredentialsCreateCreated %+v", 201, o.Payload)
}
func (o *IscsiCredentialsCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/credentials][%d] iscsiCredentialsCreateCreated %+v", 201, o.Payload)
}
func (o *IscsiCredentialsCreateCreated) GetPayload() *models.IscsiCredentialsResponse {
return o.Payload
}
func (o *IscsiCredentialsCreateCreated) 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.IscsiCredentialsResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiCredentialsCreateDefault creates a IscsiCredentialsCreateDefault with default headers values
func NewIscsiCredentialsCreateDefault(code int) *IscsiCredentialsCreateDefault {
return &IscsiCredentialsCreateDefault{
_statusCode: code,
}
}
/*
IscsiCredentialsCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 2621706 | Both the SVM UUID and SVM name were supplied, but they do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5373969 | A non-empty qualifier is required after the prefix. An example of a valid IQN is _iqn.1995-08.com.example:string_. |
| 5373970 | The IQN prefix is invalid. The correct IQN prefix is _iqn_. An example of a valid IQN is _iqn.1995-08.com.example:string_. |
| 5373971 | The date field is invalid. A valid date field is _yyyy-mm_. An example of a valid IQN is _iqn.1995-08.com.example:string_. |
| 5373972 | The naming authority and string fields can contain only the characters _a-z_, _0-9_, _._, _:_, and _-_. |
| 5373977 | The EUI-64 identifier field must be exactly 16 hexadecimal digits. |
| 5373978 | The EUI formatted initiator name supplied is invalid. A valid EUI format is _eui.XXXXXXXXXXXXXXXX_, where X is a hexadecimal digit. |
| 5373997 | The initiator name supplied in invalid. The valid initiator name formats are _iqn.1995-08.com.example:string_ or _eui.0123456789abcdef_. |
| 5374078 | The iSCSI service does not exist. |
| 5374142 | An iSCSI security credential already exists for the specified initiator. |
| 5374145 | The iSCSI security password must contain an even number of valid hex digits. |
| 5374147 | The CHAP inbound and outbound passwords must be different. |
| 5374149 | The inbound user and password properties are required for CHAP authentication. |
| 5374150 | Outbound CHAP authentication requires an outbound password. |
| 5374855 | The value for property `initiator_address.ranges.start` is greater than the value for property `initiator_address.ranges.end`. |
| 5374856 | The value for property `initiator_address.ranges.start` does not belong to the same IP address family as the value for property `initiator_address.ranges.end`. |
| 5374900 | Setting the CHAP authentication properties are not supported with authentication types _none_ or _deny_. |
*/
type IscsiCredentialsCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi credentials create default response
func (o *IscsiCredentialsCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi credentials create default response has a 2xx status code
func (o *IscsiCredentialsCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi credentials create default response has a 3xx status code
func (o *IscsiCredentialsCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi credentials create default response has a 4xx status code
func (o *IscsiCredentialsCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi credentials create default response has a 5xx status code
func (o *IscsiCredentialsCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi credentials create default response a status code equal to that given
func (o *IscsiCredentialsCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiCredentialsCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/credentials][%d] iscsi_credentials_create default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/credentials][%d] iscsi_credentials_create default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiCredentialsCreateDefault) 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/s_a_n/igroup_initiator_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupInitiatorCreateReader is a Reader for the IgroupInitiatorCreate structure.
type IgroupInitiatorCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupInitiatorCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewIgroupInitiatorCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupInitiatorCreateDefault(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
}
}
// NewIgroupInitiatorCreateCreated creates a IgroupInitiatorCreateCreated with default headers values
func NewIgroupInitiatorCreateCreated() *IgroupInitiatorCreateCreated {
return &IgroupInitiatorCreateCreated{}
}
/*
IgroupInitiatorCreateCreated describes a response with status code 201, with default header values.
Created
*/
type IgroupInitiatorCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.IgroupInitiatorResponse
}
// IsSuccess returns true when this igroup initiator create created response has a 2xx status code
func (o *IgroupInitiatorCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup initiator create created response has a 3xx status code
func (o *IgroupInitiatorCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup initiator create created response has a 4xx status code
func (o *IgroupInitiatorCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup initiator create created response has a 5xx status code
func (o *IgroupInitiatorCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this igroup initiator create created response a status code equal to that given
func (o *IgroupInitiatorCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *IgroupInitiatorCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroupInitiatorCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupInitiatorCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroupInitiatorCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupInitiatorCreateCreated) GetPayload() *models.IgroupInitiatorResponse {
return o.Payload
}
func (o *IgroupInitiatorCreateCreated) 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.IgroupInitiatorResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupInitiatorCreateDefault creates a IgroupInitiatorCreateDefault with default headers values
func NewIgroupInitiatorCreateDefault(code int) *IgroupInitiatorCreateDefault {
return &IgroupInitiatorCreateDefault{
_statusCode: code,
}
}
/*
IgroupInitiatorCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254193 | Adding an initiator would cause the initiator to be mapped to the same LUN more than once. |
| 1254324 | Adding an initiator would cause the initiator to have the same logical unit identifier for multiple LUN maps. |
| 5373969 | A supplied initiator name looks like an iSCSI IQN initiator, but the portions after the prefix are missing. |
| 5373971 | A supplied initiator name looks like an iSCSI IQN initiator, but the date portion is invalid. |
| 5373972 | A supplied initiator name looks like an iSCSI IQN initiator, but the naming authority portion is invalid. |
| 5373977 | A supplied initiator name looks like an iSCSI EUI initiator, but the length is invalid. |
| 5373978 | A supplied initiator name looks like an iSCSI EUI initiator, but the format is invalid. |
| 5373992 | A supplied initiator name was too long to be valid. |
| 5373993 | A supplied initiator name did not match any valid format. |
| 5374033 | Initiators must be supplied. |
| 5374035 | A supplied initiator is already in the initiator group. |
| 5374038 | An invalid Fibre Channel WWPN was supplied. |
| 5374039 | An invalid iSCSI initiator name was supplied. |
| 5374734 | An initiator is already in another initiator group with a conflicting operating system type. |
| 5374852 | The initiator group specified in the URI does not exist. |
| 5374917 | Multiple matching initiators have been supplied with conflicting comments. |
*/
type IgroupInitiatorCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup initiator create default response
func (o *IgroupInitiatorCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup initiator create default response has a 2xx status code
func (o *IgroupInitiatorCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup initiator create default response has a 3xx status code
func (o *IgroupInitiatorCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup initiator create default response has a 4xx status code
func (o *IgroupInitiatorCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup initiator create default response has a 5xx status code
func (o *IgroupInitiatorCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup initiator create default response a status code equal to that given
func (o *IgroupInitiatorCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupInitiatorCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroup_initiator_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroup_initiator_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupInitiatorCreateDefault) 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/s_a_n/lun_map_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunMapDeleteParams creates a new LunMapDeleteParams 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 NewLunMapDeleteParams() *LunMapDeleteParams {
return &LunMapDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapDeleteParamsWithTimeout creates a new LunMapDeleteParams object
// with the ability to set a timeout on a request.
func NewLunMapDeleteParamsWithTimeout(timeout time.Duration) *LunMapDeleteParams {
return &LunMapDeleteParams{
timeout: timeout,
}
}
// NewLunMapDeleteParamsWithContext creates a new LunMapDeleteParams object
// with the ability to set a context for a request.
func NewLunMapDeleteParamsWithContext(ctx context.Context) *LunMapDeleteParams {
return &LunMapDeleteParams{
Context: ctx,
}
}
// NewLunMapDeleteParamsWithHTTPClient creates a new LunMapDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapDeleteParamsWithHTTPClient(client *http.Client) *LunMapDeleteParams {
return &LunMapDeleteParams{
HTTPClient: client,
}
}
/*
LunMapDeleteParams contains all the parameters to send to the API endpoint
for the lun map delete operation.
Typically these are written to a http.Request.
*/
type LunMapDeleteParams struct {
/* IgroupUUID.
The unique identifier of the igroup.
*/
IgroupUUID string
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun map delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapDeleteParams) WithDefaults() *LunMapDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun map delete params
func (o *LunMapDeleteParams) WithTimeout(timeout time.Duration) *LunMapDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map delete params
func (o *LunMapDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map delete params
func (o *LunMapDeleteParams) WithContext(ctx context.Context) *LunMapDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map delete params
func (o *LunMapDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map delete params
func (o *LunMapDeleteParams) WithHTTPClient(client *http.Client) *LunMapDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map delete params
func (o *LunMapDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIgroupUUID adds the igroupUUID to the lun map delete params
func (o *LunMapDeleteParams) WithIgroupUUID(igroupUUID string) *LunMapDeleteParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map delete params
func (o *LunMapDeleteParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithLunUUID adds the lunUUID to the lun map delete params
func (o *LunMapDeleteParams) WithLunUUID(lunUUID string) *LunMapDeleteParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map delete params
func (o *LunMapDeleteParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
// path param lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); 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/s_a_n/lun_attribute_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunAttributeDeleteParams creates a new LunAttributeDeleteParams 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 NewLunAttributeDeleteParams() *LunAttributeDeleteParams {
return &LunAttributeDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunAttributeDeleteParamsWithTimeout creates a new LunAttributeDeleteParams object
// with the ability to set a timeout on a request.
func NewLunAttributeDeleteParamsWithTimeout(timeout time.Duration) *LunAttributeDeleteParams {
return &LunAttributeDeleteParams{
timeout: timeout,
}
}
// NewLunAttributeDeleteParamsWithContext creates a new LunAttributeDeleteParams object
// with the ability to set a context for a request.
func NewLunAttributeDeleteParamsWithContext(ctx context.Context) *LunAttributeDeleteParams {
return &LunAttributeDeleteParams{
Context: ctx,
}
}
// NewLunAttributeDeleteParamsWithHTTPClient creates a new LunAttributeDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunAttributeDeleteParamsWithHTTPClient(client *http.Client) *LunAttributeDeleteParams {
return &LunAttributeDeleteParams{
HTTPClient: client,
}
}
/*
LunAttributeDeleteParams contains all the parameters to send to the API endpoint
for the lun attribute delete operation.
Typically these are written to a http.Request.
*/
type LunAttributeDeleteParams struct {
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
/* Name.
The name of the attribute.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun attribute delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeDeleteParams) WithDefaults() *LunAttributeDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun attribute delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun attribute delete params
func (o *LunAttributeDeleteParams) WithTimeout(timeout time.Duration) *LunAttributeDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun attribute delete params
func (o *LunAttributeDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun attribute delete params
func (o *LunAttributeDeleteParams) WithContext(ctx context.Context) *LunAttributeDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun attribute delete params
func (o *LunAttributeDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun attribute delete params
func (o *LunAttributeDeleteParams) WithHTTPClient(client *http.Client) *LunAttributeDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun attribute delete params
func (o *LunAttributeDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithLunUUID adds the lunUUID to the lun attribute delete params
func (o *LunAttributeDeleteParams) WithLunUUID(lunUUID string) *LunAttributeDeleteParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun attribute delete params
func (o *LunAttributeDeleteParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithName adds the name to the lun attribute delete params
func (o *LunAttributeDeleteParams) WithName(name string) *LunAttributeDeleteParams {
o.SetName(name)
return o
}
// SetName adds the name to the lun attribute delete params
func (o *LunAttributeDeleteParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *LunAttributeDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); err != nil {
return err
}
// path param name
if err := r.SetPathParam("name", o.Name); 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/s_a_n/iscsi_credentials_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCredentialsGetParams creates a new IscsiCredentialsGetParams 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 NewIscsiCredentialsGetParams() *IscsiCredentialsGetParams {
return &IscsiCredentialsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCredentialsGetParamsWithTimeout creates a new IscsiCredentialsGetParams object
// with the ability to set a timeout on a request.
func NewIscsiCredentialsGetParamsWithTimeout(timeout time.Duration) *IscsiCredentialsGetParams {
return &IscsiCredentialsGetParams{
timeout: timeout,
}
}
// NewIscsiCredentialsGetParamsWithContext creates a new IscsiCredentialsGetParams object
// with the ability to set a context for a request.
func NewIscsiCredentialsGetParamsWithContext(ctx context.Context) *IscsiCredentialsGetParams {
return &IscsiCredentialsGetParams{
Context: ctx,
}
}
// NewIscsiCredentialsGetParamsWithHTTPClient creates a new IscsiCredentialsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCredentialsGetParamsWithHTTPClient(client *http.Client) *IscsiCredentialsGetParams {
return &IscsiCredentialsGetParams{
HTTPClient: client,
}
}
/*
IscsiCredentialsGetParams contains all the parameters to send to the API endpoint
for the iscsi credentials get operation.
Typically these are written to a http.Request.
*/
type IscsiCredentialsGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Initiator.
The iSCSI initiator of the credentials object.
*/
Initiator string
/* SvmUUID.
The unique identifier of an SVM.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi credentials get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsGetParams) WithDefaults() *IscsiCredentialsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi credentials get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithTimeout(timeout time.Duration) *IscsiCredentialsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithContext(ctx context.Context) *IscsiCredentialsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithHTTPClient(client *http.Client) *IscsiCredentialsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithFields(fields []string) *IscsiCredentialsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInitiator adds the initiator to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithInitiator(initiator string) *IscsiCredentialsGetParams {
o.SetInitiator(initiator)
return o
}
// SetInitiator adds the initiator to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetInitiator(initiator string) {
o.Initiator = initiator
}
// WithSvmUUID adds the svmUUID to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) WithSvmUUID(svmUUID string) *IscsiCredentialsGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi credentials get params
func (o *IscsiCredentialsGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCredentialsGetParams) 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 initiator
if err := r.SetPathParam("initiator", o.Initiator); 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
}
// bindParamIscsiCredentialsGet binds the parameter fields
func (o *IscsiCredentialsGetParams) 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/s_a_n/iscsi_credentials_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiCredentialsGetReader is a Reader for the IscsiCredentialsGet structure.
type IscsiCredentialsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiCredentialsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiCredentialsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiCredentialsGetDefault(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
}
}
// NewIscsiCredentialsGetOK creates a IscsiCredentialsGetOK with default headers values
func NewIscsiCredentialsGetOK() *IscsiCredentialsGetOK {
return &IscsiCredentialsGetOK{}
}
/*
IscsiCredentialsGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiCredentialsGetOK struct {
Payload *models.IscsiCredentials
}
// IsSuccess returns true when this iscsi credentials get o k response has a 2xx status code
func (o *IscsiCredentialsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi credentials get o k response has a 3xx status code
func (o *IscsiCredentialsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi credentials get o k response has a 4xx status code
func (o *IscsiCredentialsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi credentials get o k response has a 5xx status code
func (o *IscsiCredentialsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi credentials get o k response a status code equal to that given
func (o *IscsiCredentialsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiCredentialsGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsiCredentialsGetOK %+v", 200, o.Payload)
}
func (o *IscsiCredentialsGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsiCredentialsGetOK %+v", 200, o.Payload)
}
func (o *IscsiCredentialsGetOK) GetPayload() *models.IscsiCredentials {
return o.Payload
}
func (o *IscsiCredentialsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiCredentials)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiCredentialsGetDefault creates a IscsiCredentialsGetDefault with default headers values
func NewIscsiCredentialsGetDefault(code int) *IscsiCredentialsGetDefault {
return &IscsiCredentialsGetDefault{
_statusCode: code,
}
}
/*
IscsiCredentialsGetDefault describes a response with status code -1, with default header values.
Error
*/
type IscsiCredentialsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi credentials get default response
func (o *IscsiCredentialsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi credentials get default response has a 2xx status code
func (o *IscsiCredentialsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi credentials get default response has a 3xx status code
func (o *IscsiCredentialsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi credentials get default response has a 4xx status code
func (o *IscsiCredentialsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi credentials get default response has a 5xx status code
func (o *IscsiCredentialsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi credentials get default response a status code equal to that given
func (o *IscsiCredentialsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiCredentialsGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsi_credentials_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsi_credentials_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiCredentialsGetDefault) 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/s_a_n/vvol_binding_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewVvolBindingCollectionGetParams creates a new VvolBindingCollectionGetParams 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 NewVvolBindingCollectionGetParams() *VvolBindingCollectionGetParams {
return &VvolBindingCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewVvolBindingCollectionGetParamsWithTimeout creates a new VvolBindingCollectionGetParams object
// with the ability to set a timeout on a request.
func NewVvolBindingCollectionGetParamsWithTimeout(timeout time.Duration) *VvolBindingCollectionGetParams {
return &VvolBindingCollectionGetParams{
timeout: timeout,
}
}
// NewVvolBindingCollectionGetParamsWithContext creates a new VvolBindingCollectionGetParams object
// with the ability to set a context for a request.
func NewVvolBindingCollectionGetParamsWithContext(ctx context.Context) *VvolBindingCollectionGetParams {
return &VvolBindingCollectionGetParams{
Context: ctx,
}
}
// NewVvolBindingCollectionGetParamsWithHTTPClient creates a new VvolBindingCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewVvolBindingCollectionGetParamsWithHTTPClient(client *http.Client) *VvolBindingCollectionGetParams {
return &VvolBindingCollectionGetParams{
HTTPClient: client,
}
}
/*
VvolBindingCollectionGetParams contains all the parameters to send to the API endpoint
for the vvol binding collection get operation.
Typically these are written to a http.Request.
*/
type VvolBindingCollectionGetParams struct {
/* Count.
Filter by count
*/
Count *int64
/* Fields.
Specify the fields to return.
*/
Fields []string
/* ID.
Filter by id
*/
ID *int64
/* IsOptimal.
Filter by is_optimal
*/
IsOptimal *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
/* ProtocolEndpointName.
Filter by protocol_endpoint.name
*/
ProtocolEndpointName *string
/* ProtocolEndpointUUID.
Filter by protocol_endpoint.uuid
*/
ProtocolEndpointUUID *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
/* VvolName.
Filter by vvol.name
*/
VvolName *string
/* VvolUUID.
Filter by vvol.uuid
*/
VvolUUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the vvol binding collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingCollectionGetParams) WithDefaults() *VvolBindingCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the vvol binding collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := VvolBindingCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithTimeout(timeout time.Duration) *VvolBindingCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithContext(ctx context.Context) *VvolBindingCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithHTTPClient(client *http.Client) *VvolBindingCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCount adds the count to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithCount(count *int64) *VvolBindingCollectionGetParams {
o.SetCount(count)
return o
}
// SetCount adds the count to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetCount(count *int64) {
o.Count = count
}
// WithFields adds the fields to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithFields(fields []string) *VvolBindingCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithID adds the id to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithID(id *int64) *VvolBindingCollectionGetParams {
o.SetID(id)
return o
}
// SetID adds the id to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetID(id *int64) {
o.ID = id
}
// WithIsOptimal adds the isOptimal to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithIsOptimal(isOptimal *bool) *VvolBindingCollectionGetParams {
o.SetIsOptimal(isOptimal)
return o
}
// SetIsOptimal adds the isOptimal to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetIsOptimal(isOptimal *bool) {
o.IsOptimal = isOptimal
}
// WithMaxRecords adds the maxRecords to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithMaxRecords(maxRecords *int64) *VvolBindingCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithOrderBy(orderBy []string) *VvolBindingCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithProtocolEndpointName adds the protocolEndpointName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithProtocolEndpointName(protocolEndpointName *string) *VvolBindingCollectionGetParams {
o.SetProtocolEndpointName(protocolEndpointName)
return o
}
// SetProtocolEndpointName adds the protocolEndpointName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetProtocolEndpointName(protocolEndpointName *string) {
o.ProtocolEndpointName = protocolEndpointName
}
// WithProtocolEndpointUUID adds the protocolEndpointUUID to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithProtocolEndpointUUID(protocolEndpointUUID *string) *VvolBindingCollectionGetParams {
o.SetProtocolEndpointUUID(protocolEndpointUUID)
return o
}
// SetProtocolEndpointUUID adds the protocolEndpointUuid to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetProtocolEndpointUUID(protocolEndpointUUID *string) {
o.ProtocolEndpointUUID = protocolEndpointUUID
}
// WithReturnRecords adds the returnRecords to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithReturnRecords(returnRecords *bool) *VvolBindingCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *VvolBindingCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithSvmName(svmName *string) *VvolBindingCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithSvmUUID(svmUUID *string) *VvolBindingCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithVvolName adds the vvolName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithVvolName(vvolName *string) *VvolBindingCollectionGetParams {
o.SetVvolName(vvolName)
return o
}
// SetVvolName adds the vvolName to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetVvolName(vvolName *string) {
o.VvolName = vvolName
}
// WithVvolUUID adds the vvolUUID to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) WithVvolUUID(vvolUUID *string) *VvolBindingCollectionGetParams {
o.SetVvolUUID(vvolUUID)
return o
}
// SetVvolUUID adds the vvolUuid to the vvol binding collection get params
func (o *VvolBindingCollectionGetParams) SetVvolUUID(vvolUUID *string) {
o.VvolUUID = vvolUUID
}
// WriteToRequest writes these params to a swagger request
func (o *VvolBindingCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Count != nil {
// query param count
var qrCount int64
if o.Count != nil {
qrCount = *o.Count
}
qCount := swag.FormatInt64(qrCount)
if qCount != "" {
if err := r.SetQueryParam("count", qCount); 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.ID != nil {
// query param id
var qrID int64
if o.ID != nil {
qrID = *o.ID
}
qID := swag.FormatInt64(qrID)
if qID != "" {
if err := r.SetQueryParam("id", qID); err != nil {
return err
}
}
}
if o.IsOptimal != nil {
// query param is_optimal
var qrIsOptimal bool
if o.IsOptimal != nil {
qrIsOptimal = *o.IsOptimal
}
qIsOptimal := swag.FormatBool(qrIsOptimal)
if qIsOptimal != "" {
if err := r.SetQueryParam("is_optimal", qIsOptimal); 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.ProtocolEndpointName != nil {
// query param protocol_endpoint.name
var qrProtocolEndpointName string
if o.ProtocolEndpointName != nil {
qrProtocolEndpointName = *o.ProtocolEndpointName
}
qProtocolEndpointName := qrProtocolEndpointName
if qProtocolEndpointName != "" {
if err := r.SetQueryParam("protocol_endpoint.name", qProtocolEndpointName); err != nil {
return err
}
}
}
if o.ProtocolEndpointUUID != nil {
// query param protocol_endpoint.uuid
var qrProtocolEndpointUUID string
if o.ProtocolEndpointUUID != nil {
qrProtocolEndpointUUID = *o.ProtocolEndpointUUID
}
qProtocolEndpointUUID := qrProtocolEndpointUUID
if qProtocolEndpointUUID != "" {
if err := r.SetQueryParam("protocol_endpoint.uuid", qProtocolEndpointUUID); 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 o.VvolName != nil {
// query param vvol.name
var qrVvolName string
if o.VvolName != nil {
qrVvolName = *o.VvolName
}
qVvolName := qrVvolName
if qVvolName != "" {
if err := r.SetQueryParam("vvol.name", qVvolName); err != nil {
return err
}
}
}
if o.VvolUUID != nil {
// query param vvol.uuid
var qrVvolUUID string
if o.VvolUUID != nil {
qrVvolUUID = *o.VvolUUID
}
qVvolUUID := qrVvolUUID
if qVvolUUID != "" {
if err := r.SetQueryParam("vvol.uuid", qVvolUUID); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamVvolBindingCollectionGet binds the parameter fields
func (o *VvolBindingCollectionGetParams) 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
}
// bindParamVvolBindingCollectionGet binds the parameter order_by
func (o *VvolBindingCollectionGetParams) 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/s_a_n/igroup_initiator_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupInitiatorCollectionGetReader is a Reader for the IgroupInitiatorCollectionGet structure.
type IgroupInitiatorCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupInitiatorCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupInitiatorCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupInitiatorCollectionGetDefault(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
}
}
// NewIgroupInitiatorCollectionGetOK creates a IgroupInitiatorCollectionGetOK with default headers values
func NewIgroupInitiatorCollectionGetOK() *IgroupInitiatorCollectionGetOK {
return &IgroupInitiatorCollectionGetOK{}
}
/*
IgroupInitiatorCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupInitiatorCollectionGetOK struct {
Payload *models.IgroupInitiatorResponse
}
// IsSuccess returns true when this igroup initiator collection get o k response has a 2xx status code
func (o *IgroupInitiatorCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup initiator collection get o k response has a 3xx status code
func (o *IgroupInitiatorCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup initiator collection get o k response has a 4xx status code
func (o *IgroupInitiatorCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup initiator collection get o k response has a 5xx status code
func (o *IgroupInitiatorCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup initiator collection get o k response a status code equal to that given
func (o *IgroupInitiatorCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupInitiatorCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroupInitiatorCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupInitiatorCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroupInitiatorCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupInitiatorCollectionGetOK) GetPayload() *models.IgroupInitiatorResponse {
return o.Payload
}
func (o *IgroupInitiatorCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IgroupInitiatorResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupInitiatorCollectionGetDefault creates a IgroupInitiatorCollectionGetDefault with default headers values
func NewIgroupInitiatorCollectionGetDefault(code int) *IgroupInitiatorCollectionGetDefault {
return &IgroupInitiatorCollectionGetDefault{
_statusCode: code,
}
}
/*
IgroupInitiatorCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupInitiatorCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup initiator collection get default response
func (o *IgroupInitiatorCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup initiator collection get default response has a 2xx status code
func (o *IgroupInitiatorCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup initiator collection get default response has a 3xx status code
func (o *IgroupInitiatorCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup initiator collection get default response has a 4xx status code
func (o *IgroupInitiatorCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup initiator collection get default response has a 5xx status code
func (o *IgroupInitiatorCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup initiator collection get default response a status code equal to that given
func (o *IgroupInitiatorCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupInitiatorCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroup_initiator_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators][%d] igroup_initiator_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupInitiatorCollectionGetDefault) 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/s_a_n/fcp_collection_performance_metrics_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_collection_performance_metrics_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcpCollectionPerformanceMetricsGetParams creates a new FcpCollectionPerformanceMetricsGetParams 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 NewFcpCollectionPerformanceMetricsGetParams() *FcpCollectionPerformanceMetricsGetParams {
return &FcpCollectionPerformanceMetricsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcpCollectionPerformanceMetricsGetParamsWithTimeout creates a new FcpCollectionPerformanceMetricsGetParams object
// with the ability to set a timeout on a request.
func NewFcpCollectionPerformanceMetricsGetParamsWithTimeout(timeout time.Duration) *FcpCollectionPerformanceMetricsGetParams {
return &FcpCollectionPerformanceMetricsGetParams{
timeout: timeout,
}
}
// NewFcpCollectionPerformanceMetricsGetParamsWithContext creates a new FcpCollectionPerformanceMetricsGetParams object
// with the ability to set a context for a request.
func NewFcpCollectionPerformanceMetricsGetParamsWithContext(ctx context.Context) *FcpCollectionPerformanceMetricsGetParams {
return &FcpCollectionPerformanceMetricsGetParams{
Context: ctx,
}
}
// NewFcpCollectionPerformanceMetricsGetParamsWithHTTPClient creates a new FcpCollectionPerformanceMetricsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcpCollectionPerformanceMetricsGetParamsWithHTTPClient(client *http.Client) *FcpCollectionPerformanceMetricsGetParams {
return &FcpCollectionPerformanceMetricsGetParams{
HTTPClient: client,
}
}
/*
FcpCollectionPerformanceMetricsGetParams contains all the parameters to send to the API endpoint
for the fcp collection performance metrics get operation.
Typically these are written to a http.Request.
*/
type FcpCollectionPerformanceMetricsGetParams struct {
/* Duration.
Filter by duration
*/
Duration *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Interval.
The time range for the data. Examples can be 1h, 1d, 1m, 1w, 1y.
The period for each time range is as follows:
* 1h: Metrics over the most recent hour sampled over 15 seconds.
* 1d: Metrics over the most recent day sampled over 5 minutes.
* 1w: Metrics over the most recent week sampled over 30 minutes.
* 1m: Metrics over the most recent month sampled over 2 hours.
* 1y: Metrics over the most recent year sampled over a day.
Default: "1h"
*/
Interval *string
/* IopsOther.
Filter by iops.other
*/
IopsOther *int64
/* IopsRead.
Filter by iops.read
*/
IopsRead *int64
/* IopsTotal.
Filter by iops.total
*/
IopsTotal *int64
/* IopsWrite.
Filter by iops.write
*/
IopsWrite *int64
/* LatencyOther.
Filter by latency.other
*/
LatencyOther *int64
/* LatencyRead.
Filter by latency.read
*/
LatencyRead *int64
/* LatencyTotal.
Filter by latency.total
*/
LatencyTotal *int64
/* LatencyWrite.
Filter by latency.write
*/
LatencyWrite *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
/* Status.
Filter by status
*/
Status *string
/* SvmUUID.
The unique identifier of the SVM.
*/
SvmUUID string
/* ThroughputRead.
Filter by throughput.read
*/
ThroughputRead *int64
/* ThroughputTotal.
Filter by throughput.total
*/
ThroughputTotal *int64
/* ThroughputWrite.
Filter by throughput.write
*/
ThroughputWrite *int64
/* Timestamp.
Filter by timestamp
*/
Timestamp *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fcp collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpCollectionPerformanceMetricsGetParams) WithDefaults() *FcpCollectionPerformanceMetricsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fcp collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpCollectionPerformanceMetricsGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FcpCollectionPerformanceMetricsGetParams{
Interval: &intervalDefault,
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithTimeout(timeout time.Duration) *FcpCollectionPerformanceMetricsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithContext(ctx context.Context) *FcpCollectionPerformanceMetricsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithHTTPClient(client *http.Client) *FcpCollectionPerformanceMetricsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithDuration(duration *string) *FcpCollectionPerformanceMetricsGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithFields(fields []string) *FcpCollectionPerformanceMetricsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithInterval(interval *string) *FcpCollectionPerformanceMetricsGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithIopsOther(iopsOther *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithIopsRead(iopsRead *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithIopsTotal(iopsTotal *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithIopsWrite(iopsWrite *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithLatencyOther(latencyOther *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithLatencyRead(latencyRead *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithLatencyTotal(latencyTotal *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithLatencyWrite(latencyWrite *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithMaxRecords(maxRecords *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithOrderBy(orderBy []string) *FcpCollectionPerformanceMetricsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithReturnRecords(returnRecords *bool) *FcpCollectionPerformanceMetricsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithReturnTimeout(returnTimeout *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithStatus(status *string) *FcpCollectionPerformanceMetricsGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetStatus(status *string) {
o.Status = status
}
// WithSvmUUID adds the svmUUID to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithSvmUUID(svmUUID string) *FcpCollectionPerformanceMetricsGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WithThroughputRead adds the throughputRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithThroughputRead(throughputRead *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithThroughputTotal(throughputTotal *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithThroughputWrite(throughputWrite *int64) *FcpCollectionPerformanceMetricsGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) WithTimestamp(timestamp *string) *FcpCollectionPerformanceMetricsGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the fcp collection performance metrics get params
func (o *FcpCollectionPerformanceMetricsGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WriteToRequest writes these params to a swagger request
func (o *FcpCollectionPerformanceMetricsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Duration != nil {
// query param duration
var qrDuration string
if o.Duration != nil {
qrDuration = *o.Duration
}
qDuration := qrDuration
if qDuration != "" {
if err := r.SetQueryParam("duration", qDuration); 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.Interval != nil {
// query param interval
var qrInterval string
if o.Interval != nil {
qrInterval = *o.Interval
}
qInterval := qrInterval
if qInterval != "" {
if err := r.SetQueryParam("interval", qInterval); err != nil {
return err
}
}
}
if o.IopsOther != nil {
// query param iops.other
var qrIopsOther int64
if o.IopsOther != nil {
qrIopsOther = *o.IopsOther
}
qIopsOther := swag.FormatInt64(qrIopsOther)
if qIopsOther != "" {
if err := r.SetQueryParam("iops.other", qIopsOther); 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.IopsTotal != nil {
// query param iops.total
var qrIopsTotal int64
if o.IopsTotal != nil {
qrIopsTotal = *o.IopsTotal
}
qIopsTotal := swag.FormatInt64(qrIopsTotal)
if qIopsTotal != "" {
if err := r.SetQueryParam("iops.total", qIopsTotal); 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.LatencyOther != nil {
// query param latency.other
var qrLatencyOther int64
if o.LatencyOther != nil {
qrLatencyOther = *o.LatencyOther
}
qLatencyOther := swag.FormatInt64(qrLatencyOther)
if qLatencyOther != "" {
if err := r.SetQueryParam("latency.other", qLatencyOther); err != nil {
return err
}
}
}
if o.LatencyRead != nil {
// query param latency.read
var qrLatencyRead int64
if o.LatencyRead != nil {
qrLatencyRead = *o.LatencyRead
}
qLatencyRead := swag.FormatInt64(qrLatencyRead)
if qLatencyRead != "" {
if err := r.SetQueryParam("latency.read", qLatencyRead); err != nil {
return err
}
}
}
if o.LatencyTotal != nil {
// query param latency.total
var qrLatencyTotal int64
if o.LatencyTotal != nil {
qrLatencyTotal = *o.LatencyTotal
}
qLatencyTotal := swag.FormatInt64(qrLatencyTotal)
if qLatencyTotal != "" {
if err := r.SetQueryParam("latency.total", qLatencyTotal); err != nil {
return err
}
}
}
if o.LatencyWrite != nil {
// query param latency.write
var qrLatencyWrite int64
if o.LatencyWrite != nil {
qrLatencyWrite = *o.LatencyWrite
}
qLatencyWrite := swag.FormatInt64(qrLatencyWrite)
if qLatencyWrite != "" {
if err := r.SetQueryParam("latency.write", qLatencyWrite); 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.Status != nil {
// query param status
var qrStatus string
if o.Status != nil {
qrStatus = *o.Status
}
qStatus := qrStatus
if qStatus != "" {
if err := r.SetQueryParam("status", qStatus); err != nil {
return err
}
}
}
// path param svm.uuid
if err := r.SetPathParam("svm.uuid", o.SvmUUID); 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.ThroughputTotal != nil {
// query param throughput.total
var qrThroughputTotal int64
if o.ThroughputTotal != nil {
qrThroughputTotal = *o.ThroughputTotal
}
qThroughputTotal := swag.FormatInt64(qrThroughputTotal)
if qThroughputTotal != "" {
if err := r.SetQueryParam("throughput.total", qThroughputTotal); 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.Timestamp != nil {
// query param timestamp
var qrTimestamp string
if o.Timestamp != nil {
qrTimestamp = *o.Timestamp
}
qTimestamp := qrTimestamp
if qTimestamp != "" {
if err := r.SetQueryParam("timestamp", qTimestamp); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcpCollectionPerformanceMetricsGet binds the parameter fields
func (o *FcpCollectionPerformanceMetricsGetParams) 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
}
// bindParamFcpCollectionPerformanceMetricsGet binds the parameter order_by
func (o *FcpCollectionPerformanceMetricsGetParams) 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/s_a_n/fcp_service_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcpServiceModifyParams creates a new FcpServiceModifyParams 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 NewFcpServiceModifyParams() *FcpServiceModifyParams {
return &FcpServiceModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcpServiceModifyParamsWithTimeout creates a new FcpServiceModifyParams object
// with the ability to set a timeout on a request.
func NewFcpServiceModifyParamsWithTimeout(timeout time.Duration) *FcpServiceModifyParams {
return &FcpServiceModifyParams{
timeout: timeout,
}
}
// NewFcpServiceModifyParamsWithContext creates a new FcpServiceModifyParams object
// with the ability to set a context for a request.
func NewFcpServiceModifyParamsWithContext(ctx context.Context) *FcpServiceModifyParams {
return &FcpServiceModifyParams{
Context: ctx,
}
}
// NewFcpServiceModifyParamsWithHTTPClient creates a new FcpServiceModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcpServiceModifyParamsWithHTTPClient(client *http.Client) *FcpServiceModifyParams {
return &FcpServiceModifyParams{
HTTPClient: client,
}
}
/*
FcpServiceModifyParams contains all the parameters to send to the API endpoint
for the fcp service modify operation.
Typically these are written to a http.Request.
*/
type FcpServiceModifyParams struct {
/* Info.
The new property values for the FC Protocol service.
*/
Info *models.FcpService
/* SvmUUID.
The unique identifier of the SVM whose FC Protocol service is to be updated.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fcp service modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceModifyParams) WithDefaults() *FcpServiceModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fcp service modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fcp service modify params
func (o *FcpServiceModifyParams) WithTimeout(timeout time.Duration) *FcpServiceModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fcp service modify params
func (o *FcpServiceModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fcp service modify params
func (o *FcpServiceModifyParams) WithContext(ctx context.Context) *FcpServiceModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fcp service modify params
func (o *FcpServiceModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fcp service modify params
func (o *FcpServiceModifyParams) WithHTTPClient(client *http.Client) *FcpServiceModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fcp service modify params
func (o *FcpServiceModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the fcp service modify params
func (o *FcpServiceModifyParams) WithInfo(info *models.FcpService) *FcpServiceModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the fcp service modify params
func (o *FcpServiceModifyParams) SetInfo(info *models.FcpService) {
o.Info = info
}
// WithSvmUUID adds the svmUUID to the fcp service modify params
func (o *FcpServiceModifyParams) WithSvmUUID(svmUUID string) *FcpServiceModifyParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the fcp service modify params
func (o *FcpServiceModifyParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *FcpServiceModifyParams) 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 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/s_a_n/vvol_binding_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// VvolBindingCollectionGetReader is a Reader for the VvolBindingCollectionGet structure.
type VvolBindingCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *VvolBindingCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewVvolBindingCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewVvolBindingCollectionGetDefault(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
}
}
// NewVvolBindingCollectionGetOK creates a VvolBindingCollectionGetOK with default headers values
func NewVvolBindingCollectionGetOK() *VvolBindingCollectionGetOK {
return &VvolBindingCollectionGetOK{}
}
/*
VvolBindingCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type VvolBindingCollectionGetOK struct {
Payload *models.VvolBindingResponse
}
// IsSuccess returns true when this vvol binding collection get o k response has a 2xx status code
func (o *VvolBindingCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this vvol binding collection get o k response has a 3xx status code
func (o *VvolBindingCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this vvol binding collection get o k response has a 4xx status code
func (o *VvolBindingCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this vvol binding collection get o k response has a 5xx status code
func (o *VvolBindingCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this vvol binding collection get o k response a status code equal to that given
func (o *VvolBindingCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *VvolBindingCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings][%d] vvolBindingCollectionGetOK %+v", 200, o.Payload)
}
func (o *VvolBindingCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings][%d] vvolBindingCollectionGetOK %+v", 200, o.Payload)
}
func (o *VvolBindingCollectionGetOK) GetPayload() *models.VvolBindingResponse {
return o.Payload
}
func (o *VvolBindingCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.VvolBindingResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewVvolBindingCollectionGetDefault creates a VvolBindingCollectionGetDefault with default headers values
func NewVvolBindingCollectionGetDefault(code int) *VvolBindingCollectionGetDefault {
return &VvolBindingCollectionGetDefault{
_statusCode: code,
}
}
/*
VvolBindingCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type VvolBindingCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the vvol binding collection get default response
func (o *VvolBindingCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this vvol binding collection get default response has a 2xx status code
func (o *VvolBindingCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this vvol binding collection get default response has a 3xx status code
func (o *VvolBindingCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this vvol binding collection get default response has a 4xx status code
func (o *VvolBindingCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this vvol binding collection get default response has a 5xx status code
func (o *VvolBindingCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this vvol binding collection get default response a status code equal to that given
func (o *VvolBindingCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *VvolBindingCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings][%d] vvol_binding_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings][%d] vvol_binding_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *VvolBindingCollectionGetDefault) 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/s_a_n/igroup_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupGetParams creates a new IgroupGetParams 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 NewIgroupGetParams() *IgroupGetParams {
return &IgroupGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupGetParamsWithTimeout creates a new IgroupGetParams object
// with the ability to set a timeout on a request.
func NewIgroupGetParamsWithTimeout(timeout time.Duration) *IgroupGetParams {
return &IgroupGetParams{
timeout: timeout,
}
}
// NewIgroupGetParamsWithContext creates a new IgroupGetParams object
// with the ability to set a context for a request.
func NewIgroupGetParamsWithContext(ctx context.Context) *IgroupGetParams {
return &IgroupGetParams{
Context: ctx,
}
}
// NewIgroupGetParamsWithHTTPClient creates a new IgroupGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupGetParamsWithHTTPClient(client *http.Client) *IgroupGetParams {
return &IgroupGetParams{
HTTPClient: client,
}
}
/*
IgroupGetParams contains all the parameters to send to the API endpoint
for the igroup get operation.
Typically these are written to a http.Request.
*/
type IgroupGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
The unique identifier of the initiator group.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupGetParams) WithDefaults() *IgroupGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the igroup get params
func (o *IgroupGetParams) WithTimeout(timeout time.Duration) *IgroupGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup get params
func (o *IgroupGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup get params
func (o *IgroupGetParams) WithContext(ctx context.Context) *IgroupGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup get params
func (o *IgroupGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup get params
func (o *IgroupGetParams) WithHTTPClient(client *http.Client) *IgroupGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup get params
func (o *IgroupGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the igroup get params
func (o *IgroupGetParams) WithFields(fields []string) *IgroupGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup get params
func (o *IgroupGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the igroup get params
func (o *IgroupGetParams) WithUUID(uuid string) *IgroupGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the igroup get params
func (o *IgroupGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupGetParams) 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
}
// bindParamIgroupGet binds the parameter fields
func (o *IgroupGetParams) 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/s_a_n/igroup_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupCollectionGetReader is a Reader for the IgroupCollectionGet structure.
type IgroupCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupCollectionGetDefault(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
}
}
// NewIgroupCollectionGetOK creates a IgroupCollectionGetOK with default headers values
func NewIgroupCollectionGetOK() *IgroupCollectionGetOK {
return &IgroupCollectionGetOK{}
}
/*
IgroupCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupCollectionGetOK struct {
Payload *models.IgroupResponse
}
// IsSuccess returns true when this igroup collection get o k response has a 2xx status code
func (o *IgroupCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup collection get o k response has a 3xx status code
func (o *IgroupCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup collection get o k response has a 4xx status code
func (o *IgroupCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup collection get o k response has a 5xx status code
func (o *IgroupCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup collection get o k response a status code equal to that given
func (o *IgroupCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups][%d] igroupCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups][%d] igroupCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupCollectionGetOK) GetPayload() *models.IgroupResponse {
return o.Payload
}
func (o *IgroupCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IgroupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupCollectionGetDefault creates a IgroupCollectionGetDefault with default headers values
func NewIgroupCollectionGetDefault(code int) *IgroupCollectionGetDefault {
return &IgroupCollectionGetDefault{
_statusCode: code,
}
}
/*
IgroupCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type IgroupCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup collection get default response
func (o *IgroupCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup collection get default response has a 2xx status code
func (o *IgroupCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup collection get default response has a 3xx status code
func (o *IgroupCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup collection get default response has a 4xx status code
func (o *IgroupCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup collection get default response has a 5xx status code
func (o *IgroupCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup collection get default response a status code equal to that given
func (o *IgroupCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups][%d] igroup_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups][%d] igroup_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupCollectionGetDefault) 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/s_a_n/wwpn_alias_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// WwpnAliasCollectionGetReader is a Reader for the WwpnAliasCollectionGet structure.
type WwpnAliasCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WwpnAliasCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewWwpnAliasCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWwpnAliasCollectionGetDefault(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
}
}
// NewWwpnAliasCollectionGetOK creates a WwpnAliasCollectionGetOK with default headers values
func NewWwpnAliasCollectionGetOK() *WwpnAliasCollectionGetOK {
return &WwpnAliasCollectionGetOK{}
}
/*
WwpnAliasCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type WwpnAliasCollectionGetOK struct {
Payload *models.WwpnAliasResponse
}
// IsSuccess returns true when this wwpn alias collection get o k response has a 2xx status code
func (o *WwpnAliasCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this wwpn alias collection get o k response has a 3xx status code
func (o *WwpnAliasCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this wwpn alias collection get o k response has a 4xx status code
func (o *WwpnAliasCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this wwpn alias collection get o k response has a 5xx status code
func (o *WwpnAliasCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this wwpn alias collection get o k response a status code equal to that given
func (o *WwpnAliasCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *WwpnAliasCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases][%d] wwpnAliasCollectionGetOK %+v", 200, o.Payload)
}
func (o *WwpnAliasCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases][%d] wwpnAliasCollectionGetOK %+v", 200, o.Payload)
}
func (o *WwpnAliasCollectionGetOK) GetPayload() *models.WwpnAliasResponse {
return o.Payload
}
func (o *WwpnAliasCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.WwpnAliasResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewWwpnAliasCollectionGetDefault creates a WwpnAliasCollectionGetDefault with default headers values
func NewWwpnAliasCollectionGetDefault(code int) *WwpnAliasCollectionGetDefault {
return &WwpnAliasCollectionGetDefault{
_statusCode: code,
}
}
/*
WwpnAliasCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type WwpnAliasCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the wwpn alias collection get default response
func (o *WwpnAliasCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this wwpn alias collection get default response has a 2xx status code
func (o *WwpnAliasCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this wwpn alias collection get default response has a 3xx status code
func (o *WwpnAliasCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this wwpn alias collection get default response has a 4xx status code
func (o *WwpnAliasCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this wwpn alias collection get default response has a 5xx status code
func (o *WwpnAliasCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this wwpn alias collection get default response a status code equal to that given
func (o *WwpnAliasCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WwpnAliasCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases][%d] wwpn_alias_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases][%d] wwpn_alias_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WwpnAliasCollectionGetDefault) 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/s_a_n/fcp_service_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// FcpServiceCreateReader is a Reader for the FcpServiceCreate structure.
type FcpServiceCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcpServiceCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewFcpServiceCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcpServiceCreateDefault(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
}
}
// NewFcpServiceCreateCreated creates a FcpServiceCreateCreated with default headers values
func NewFcpServiceCreateCreated() *FcpServiceCreateCreated {
return &FcpServiceCreateCreated{}
}
/*
FcpServiceCreateCreated describes a response with status code 201, with default header values.
Created
*/
type FcpServiceCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.FcpServiceResponse
}
// IsSuccess returns true when this fcp service create created response has a 2xx status code
func (o *FcpServiceCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fcp service create created response has a 3xx status code
func (o *FcpServiceCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this fcp service create created response has a 4xx status code
func (o *FcpServiceCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this fcp service create created response has a 5xx status code
func (o *FcpServiceCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this fcp service create created response a status code equal to that given
func (o *FcpServiceCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *FcpServiceCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/fcp/services][%d] fcpServiceCreateCreated %+v", 201, o.Payload)
}
func (o *FcpServiceCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/fcp/services][%d] fcpServiceCreateCreated %+v", 201, o.Payload)
}
func (o *FcpServiceCreateCreated) GetPayload() *models.FcpServiceResponse {
return o.Payload
}
func (o *FcpServiceCreateCreated) 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.FcpServiceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcpServiceCreateDefault creates a FcpServiceCreateDefault with default headers values
func NewFcpServiceCreateDefault(code int) *FcpServiceCreateDefault {
return &FcpServiceCreateDefault{
_statusCode: code,
}
}
/*
FcpServiceCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1115127 | The cluster lacks a valid FCP license. |
| 2621462 | The supplied SVM does not exist. |
| 2621507 | The Fibre Channel Protocol is not allowed for the specified SVM. |
| 2621706 | The specified `svm.uuid` and `svm.name` do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5374082 | The Fibre Channel Protocol service already exists for the SVM. |
| 5374092 | The Fibre Channel Procotol is not supported on the cluster hardware configuration; there are no Fibre Channel adapters. |
| 5374893 | The SVM is stopped. The SVM must be running to create a Fibre Channel Protocol service. |
*/
type FcpServiceCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fcp service create default response
func (o *FcpServiceCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fcp service create default response has a 2xx status code
func (o *FcpServiceCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fcp service create default response has a 3xx status code
func (o *FcpServiceCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fcp service create default response has a 4xx status code
func (o *FcpServiceCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fcp service create default response has a 5xx status code
func (o *FcpServiceCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fcp service create default response a status code equal to that given
func (o *FcpServiceCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcpServiceCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/fcp/services][%d] fcp_service_create default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/fcp/services][%d] fcp_service_create default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcpServiceCreateDefault) 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/s_a_n/igroup_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupCollectionGetParams creates a new IgroupCollectionGetParams 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 NewIgroupCollectionGetParams() *IgroupCollectionGetParams {
return &IgroupCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupCollectionGetParamsWithTimeout creates a new IgroupCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIgroupCollectionGetParamsWithTimeout(timeout time.Duration) *IgroupCollectionGetParams {
return &IgroupCollectionGetParams{
timeout: timeout,
}
}
// NewIgroupCollectionGetParamsWithContext creates a new IgroupCollectionGetParams object
// with the ability to set a context for a request.
func NewIgroupCollectionGetParamsWithContext(ctx context.Context) *IgroupCollectionGetParams {
return &IgroupCollectionGetParams{
Context: ctx,
}
}
// NewIgroupCollectionGetParamsWithHTTPClient creates a new IgroupCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupCollectionGetParamsWithHTTPClient(client *http.Client) *IgroupCollectionGetParams {
return &IgroupCollectionGetParams{
HTTPClient: client,
}
}
/*
IgroupCollectionGetParams contains all the parameters to send to the API endpoint
for the igroup collection get operation.
Typically these are written to a http.Request.
*/
type IgroupCollectionGetParams struct {
/* Comment.
Filter by comment
*/
Comment *string
/* ConnectivityTrackingAlertsSummaryArgumentsCode.
Filter by connectivity_tracking.alerts.summary.arguments.code
*/
ConnectivityTrackingAlertsSummaryArgumentsCode *string
/* ConnectivityTrackingAlertsSummaryArgumentsMessage.
Filter by connectivity_tracking.alerts.summary.arguments.message
*/
ConnectivityTrackingAlertsSummaryArgumentsMessage *string
/* ConnectivityTrackingAlertsSummaryCode.
Filter by connectivity_tracking.alerts.summary.code
*/
ConnectivityTrackingAlertsSummaryCode *string
/* ConnectivityTrackingAlertsSummaryMessage.
Filter by connectivity_tracking.alerts.summary.message
*/
ConnectivityTrackingAlertsSummaryMessage *string
/* ConnectivityTrackingAlertsSummaryTarget.
Filter by connectivity_tracking.alerts.summary.target
*/
ConnectivityTrackingAlertsSummaryTarget *string
/* ConnectivityTrackingConnectionState.
Filter by connectivity_tracking.connection_state
*/
ConnectivityTrackingConnectionState *string
/* ConnectivityTrackingRequiredNodesName.
Filter by connectivity_tracking.required_nodes.name
*/
ConnectivityTrackingRequiredNodesName *string
/* ConnectivityTrackingRequiredNodesUUID.
Filter by connectivity_tracking.required_nodes.uuid
*/
ConnectivityTrackingRequiredNodesUUID *string
/* DeleteOnUnmap.
Filter by delete_on_unmap
*/
DeleteOnUnmap *bool
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupsComment.
Filter by igroups.comment
*/
IgroupsComment *string
/* IgroupsName.
Filter by igroups.name
*/
IgroupsName *string
/* IgroupsUUID.
Filter by igroups.uuid
*/
IgroupsUUID *string
/* InitiatorsComment.
Filter by initiators.comment
*/
InitiatorsComment *string
/* InitiatorsConnectivityTrackingConnectionState.
Filter by initiators.connectivity_tracking.connection_state
*/
InitiatorsConnectivityTrackingConnectionState *string
/* InitiatorsIgroupName.
Filter by initiators.igroup.name
*/
InitiatorsIgroupName *string
/* InitiatorsIgroupUUID.
Filter by initiators.igroup.uuid
*/
InitiatorsIgroupUUID *string
/* InitiatorsName.
Filter by initiators.name
*/
InitiatorsName *string
/* LunMapsLogicalUnitNumber.
Filter by lun_maps.logical_unit_number
*/
LunMapsLogicalUnitNumber *int64
/* LunMapsLunName.
Filter by lun_maps.lun.name
*/
LunMapsLunName *string
/* LunMapsLunNodeName.
Filter by lun_maps.lun.node.name
*/
LunMapsLunNodeName *string
/* LunMapsLunNodeUUID.
Filter by lun_maps.lun.node.uuid
*/
LunMapsLunNodeUUID *string
/* LunMapsLunUUID.
Filter by lun_maps.lun.uuid
*/
LunMapsLunUUID *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
/* OsType.
Filter by os_type
*/
OsType *string
/* ParentIgroupsComment.
Filter by parent_igroups.comment
*/
ParentIgroupsComment *string
/* ParentIgroupsName.
Filter by parent_igroups.name
*/
ParentIgroupsName *string
/* ParentIgroupsUUID.
Filter by parent_igroups.uuid
*/
ParentIgroupsUUID *string
/* PortsetName.
Filter by portset.name
*/
PortsetName *string
/* PortsetUUID.
Filter by portset.uuid
*/
PortsetUUID *string
/* Protocol.
Filter by protocol
*/
Protocol *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
/* SupportsIgroups.
Filter by supports_igroups
*/
SupportsIgroups *bool
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
/* TargetFirmwareRevision.
Filter by target.firmware_revision
*/
TargetFirmwareRevision *string
/* TargetProductID.
Filter by target.product_id
*/
TargetProductID *string
/* TargetVendorID.
Filter by target.vendor_id
*/
TargetVendorID *string
/* UUID.
Filter by uuid
*/
UUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupCollectionGetParams) WithDefaults() *IgroupCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IgroupCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup collection get params
func (o *IgroupCollectionGetParams) WithTimeout(timeout time.Duration) *IgroupCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup collection get params
func (o *IgroupCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup collection get params
func (o *IgroupCollectionGetParams) WithContext(ctx context.Context) *IgroupCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup collection get params
func (o *IgroupCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup collection get params
func (o *IgroupCollectionGetParams) WithHTTPClient(client *http.Client) *IgroupCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup collection get params
func (o *IgroupCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithComment adds the comment to the igroup collection get params
func (o *IgroupCollectionGetParams) WithComment(comment *string) *IgroupCollectionGetParams {
o.SetComment(comment)
return o
}
// SetComment adds the comment to the igroup collection get params
func (o *IgroupCollectionGetParams) SetComment(comment *string) {
o.Comment = comment
}
// WithConnectivityTrackingAlertsSummaryArgumentsCode adds the connectivityTrackingAlertsSummaryArgumentsCode to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingAlertsSummaryArgumentsCode(connectivityTrackingAlertsSummaryArgumentsCode *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingAlertsSummaryArgumentsCode(connectivityTrackingAlertsSummaryArgumentsCode)
return o
}
// SetConnectivityTrackingAlertsSummaryArgumentsCode adds the connectivityTrackingAlertsSummaryArgumentsCode to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingAlertsSummaryArgumentsCode(connectivityTrackingAlertsSummaryArgumentsCode *string) {
o.ConnectivityTrackingAlertsSummaryArgumentsCode = connectivityTrackingAlertsSummaryArgumentsCode
}
// WithConnectivityTrackingAlertsSummaryArgumentsMessage adds the connectivityTrackingAlertsSummaryArgumentsMessage to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingAlertsSummaryArgumentsMessage(connectivityTrackingAlertsSummaryArgumentsMessage *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingAlertsSummaryArgumentsMessage(connectivityTrackingAlertsSummaryArgumentsMessage)
return o
}
// SetConnectivityTrackingAlertsSummaryArgumentsMessage adds the connectivityTrackingAlertsSummaryArgumentsMessage to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingAlertsSummaryArgumentsMessage(connectivityTrackingAlertsSummaryArgumentsMessage *string) {
o.ConnectivityTrackingAlertsSummaryArgumentsMessage = connectivityTrackingAlertsSummaryArgumentsMessage
}
// WithConnectivityTrackingAlertsSummaryCode adds the connectivityTrackingAlertsSummaryCode to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingAlertsSummaryCode(connectivityTrackingAlertsSummaryCode *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingAlertsSummaryCode(connectivityTrackingAlertsSummaryCode)
return o
}
// SetConnectivityTrackingAlertsSummaryCode adds the connectivityTrackingAlertsSummaryCode to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingAlertsSummaryCode(connectivityTrackingAlertsSummaryCode *string) {
o.ConnectivityTrackingAlertsSummaryCode = connectivityTrackingAlertsSummaryCode
}
// WithConnectivityTrackingAlertsSummaryMessage adds the connectivityTrackingAlertsSummaryMessage to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingAlertsSummaryMessage(connectivityTrackingAlertsSummaryMessage *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingAlertsSummaryMessage(connectivityTrackingAlertsSummaryMessage)
return o
}
// SetConnectivityTrackingAlertsSummaryMessage adds the connectivityTrackingAlertsSummaryMessage to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingAlertsSummaryMessage(connectivityTrackingAlertsSummaryMessage *string) {
o.ConnectivityTrackingAlertsSummaryMessage = connectivityTrackingAlertsSummaryMessage
}
// WithConnectivityTrackingAlertsSummaryTarget adds the connectivityTrackingAlertsSummaryTarget to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingAlertsSummaryTarget(connectivityTrackingAlertsSummaryTarget *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingAlertsSummaryTarget(connectivityTrackingAlertsSummaryTarget)
return o
}
// SetConnectivityTrackingAlertsSummaryTarget adds the connectivityTrackingAlertsSummaryTarget to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingAlertsSummaryTarget(connectivityTrackingAlertsSummaryTarget *string) {
o.ConnectivityTrackingAlertsSummaryTarget = connectivityTrackingAlertsSummaryTarget
}
// WithConnectivityTrackingConnectionState adds the connectivityTrackingConnectionState to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingConnectionState(connectivityTrackingConnectionState *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingConnectionState(connectivityTrackingConnectionState)
return o
}
// SetConnectivityTrackingConnectionState adds the connectivityTrackingConnectionState to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingConnectionState(connectivityTrackingConnectionState *string) {
o.ConnectivityTrackingConnectionState = connectivityTrackingConnectionState
}
// WithConnectivityTrackingRequiredNodesName adds the connectivityTrackingRequiredNodesName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingRequiredNodesName(connectivityTrackingRequiredNodesName *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingRequiredNodesName(connectivityTrackingRequiredNodesName)
return o
}
// SetConnectivityTrackingRequiredNodesName adds the connectivityTrackingRequiredNodesName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingRequiredNodesName(connectivityTrackingRequiredNodesName *string) {
o.ConnectivityTrackingRequiredNodesName = connectivityTrackingRequiredNodesName
}
// WithConnectivityTrackingRequiredNodesUUID adds the connectivityTrackingRequiredNodesUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithConnectivityTrackingRequiredNodesUUID(connectivityTrackingRequiredNodesUUID *string) *IgroupCollectionGetParams {
o.SetConnectivityTrackingRequiredNodesUUID(connectivityTrackingRequiredNodesUUID)
return o
}
// SetConnectivityTrackingRequiredNodesUUID adds the connectivityTrackingRequiredNodesUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetConnectivityTrackingRequiredNodesUUID(connectivityTrackingRequiredNodesUUID *string) {
o.ConnectivityTrackingRequiredNodesUUID = connectivityTrackingRequiredNodesUUID
}
// WithDeleteOnUnmap adds the deleteOnUnmap to the igroup collection get params
func (o *IgroupCollectionGetParams) WithDeleteOnUnmap(deleteOnUnmap *bool) *IgroupCollectionGetParams {
o.SetDeleteOnUnmap(deleteOnUnmap)
return o
}
// SetDeleteOnUnmap adds the deleteOnUnmap to the igroup collection get params
func (o *IgroupCollectionGetParams) SetDeleteOnUnmap(deleteOnUnmap *bool) {
o.DeleteOnUnmap = deleteOnUnmap
}
// WithFields adds the fields to the igroup collection get params
func (o *IgroupCollectionGetParams) WithFields(fields []string) *IgroupCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup collection get params
func (o *IgroupCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupsComment adds the igroupsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) WithIgroupsComment(igroupsComment *string) *IgroupCollectionGetParams {
o.SetIgroupsComment(igroupsComment)
return o
}
// SetIgroupsComment adds the igroupsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) SetIgroupsComment(igroupsComment *string) {
o.IgroupsComment = igroupsComment
}
// WithIgroupsName adds the igroupsName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithIgroupsName(igroupsName *string) *IgroupCollectionGetParams {
o.SetIgroupsName(igroupsName)
return o
}
// SetIgroupsName adds the igroupsName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetIgroupsName(igroupsName *string) {
o.IgroupsName = igroupsName
}
// WithIgroupsUUID adds the igroupsUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithIgroupsUUID(igroupsUUID *string) *IgroupCollectionGetParams {
o.SetIgroupsUUID(igroupsUUID)
return o
}
// SetIgroupsUUID adds the igroupsUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetIgroupsUUID(igroupsUUID *string) {
o.IgroupsUUID = igroupsUUID
}
// WithInitiatorsComment adds the initiatorsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) WithInitiatorsComment(initiatorsComment *string) *IgroupCollectionGetParams {
o.SetInitiatorsComment(initiatorsComment)
return o
}
// SetInitiatorsComment adds the initiatorsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) SetInitiatorsComment(initiatorsComment *string) {
o.InitiatorsComment = initiatorsComment
}
// WithInitiatorsConnectivityTrackingConnectionState adds the initiatorsConnectivityTrackingConnectionState to the igroup collection get params
func (o *IgroupCollectionGetParams) WithInitiatorsConnectivityTrackingConnectionState(initiatorsConnectivityTrackingConnectionState *string) *IgroupCollectionGetParams {
o.SetInitiatorsConnectivityTrackingConnectionState(initiatorsConnectivityTrackingConnectionState)
return o
}
// SetInitiatorsConnectivityTrackingConnectionState adds the initiatorsConnectivityTrackingConnectionState to the igroup collection get params
func (o *IgroupCollectionGetParams) SetInitiatorsConnectivityTrackingConnectionState(initiatorsConnectivityTrackingConnectionState *string) {
o.InitiatorsConnectivityTrackingConnectionState = initiatorsConnectivityTrackingConnectionState
}
// WithInitiatorsIgroupName adds the initiatorsIgroupName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithInitiatorsIgroupName(initiatorsIgroupName *string) *IgroupCollectionGetParams {
o.SetInitiatorsIgroupName(initiatorsIgroupName)
return o
}
// SetInitiatorsIgroupName adds the initiatorsIgroupName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetInitiatorsIgroupName(initiatorsIgroupName *string) {
o.InitiatorsIgroupName = initiatorsIgroupName
}
// WithInitiatorsIgroupUUID adds the initiatorsIgroupUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithInitiatorsIgroupUUID(initiatorsIgroupUUID *string) *IgroupCollectionGetParams {
o.SetInitiatorsIgroupUUID(initiatorsIgroupUUID)
return o
}
// SetInitiatorsIgroupUUID adds the initiatorsIgroupUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetInitiatorsIgroupUUID(initiatorsIgroupUUID *string) {
o.InitiatorsIgroupUUID = initiatorsIgroupUUID
}
// WithInitiatorsName adds the initiatorsName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithInitiatorsName(initiatorsName *string) *IgroupCollectionGetParams {
o.SetInitiatorsName(initiatorsName)
return o
}
// SetInitiatorsName adds the initiatorsName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetInitiatorsName(initiatorsName *string) {
o.InitiatorsName = initiatorsName
}
// WithLunMapsLogicalUnitNumber adds the lunMapsLogicalUnitNumber to the igroup collection get params
func (o *IgroupCollectionGetParams) WithLunMapsLogicalUnitNumber(lunMapsLogicalUnitNumber *int64) *IgroupCollectionGetParams {
o.SetLunMapsLogicalUnitNumber(lunMapsLogicalUnitNumber)
return o
}
// SetLunMapsLogicalUnitNumber adds the lunMapsLogicalUnitNumber to the igroup collection get params
func (o *IgroupCollectionGetParams) SetLunMapsLogicalUnitNumber(lunMapsLogicalUnitNumber *int64) {
o.LunMapsLogicalUnitNumber = lunMapsLogicalUnitNumber
}
// WithLunMapsLunName adds the lunMapsLunName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithLunMapsLunName(lunMapsLunName *string) *IgroupCollectionGetParams {
o.SetLunMapsLunName(lunMapsLunName)
return o
}
// SetLunMapsLunName adds the lunMapsLunName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetLunMapsLunName(lunMapsLunName *string) {
o.LunMapsLunName = lunMapsLunName
}
// WithLunMapsLunNodeName adds the lunMapsLunNodeName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithLunMapsLunNodeName(lunMapsLunNodeName *string) *IgroupCollectionGetParams {
o.SetLunMapsLunNodeName(lunMapsLunNodeName)
return o
}
// SetLunMapsLunNodeName adds the lunMapsLunNodeName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetLunMapsLunNodeName(lunMapsLunNodeName *string) {
o.LunMapsLunNodeName = lunMapsLunNodeName
}
// WithLunMapsLunNodeUUID adds the lunMapsLunNodeUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithLunMapsLunNodeUUID(lunMapsLunNodeUUID *string) *IgroupCollectionGetParams {
o.SetLunMapsLunNodeUUID(lunMapsLunNodeUUID)
return o
}
// SetLunMapsLunNodeUUID adds the lunMapsLunNodeUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetLunMapsLunNodeUUID(lunMapsLunNodeUUID *string) {
o.LunMapsLunNodeUUID = lunMapsLunNodeUUID
}
// WithLunMapsLunUUID adds the lunMapsLunUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithLunMapsLunUUID(lunMapsLunUUID *string) *IgroupCollectionGetParams {
o.SetLunMapsLunUUID(lunMapsLunUUID)
return o
}
// SetLunMapsLunUUID adds the lunMapsLunUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetLunMapsLunUUID(lunMapsLunUUID *string) {
o.LunMapsLunUUID = lunMapsLunUUID
}
// WithMaxRecords adds the maxRecords to the igroup collection get params
func (o *IgroupCollectionGetParams) WithMaxRecords(maxRecords *int64) *IgroupCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the igroup collection get params
func (o *IgroupCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the igroup collection get params
func (o *IgroupCollectionGetParams) WithName(name *string) *IgroupCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the igroup collection get params
func (o *IgroupCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the igroup collection get params
func (o *IgroupCollectionGetParams) WithOrderBy(orderBy []string) *IgroupCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the igroup collection get params
func (o *IgroupCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithOsType adds the osType to the igroup collection get params
func (o *IgroupCollectionGetParams) WithOsType(osType *string) *IgroupCollectionGetParams {
o.SetOsType(osType)
return o
}
// SetOsType adds the osType to the igroup collection get params
func (o *IgroupCollectionGetParams) SetOsType(osType *string) {
o.OsType = osType
}
// WithParentIgroupsComment adds the parentIgroupsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) WithParentIgroupsComment(parentIgroupsComment *string) *IgroupCollectionGetParams {
o.SetParentIgroupsComment(parentIgroupsComment)
return o
}
// SetParentIgroupsComment adds the parentIgroupsComment to the igroup collection get params
func (o *IgroupCollectionGetParams) SetParentIgroupsComment(parentIgroupsComment *string) {
o.ParentIgroupsComment = parentIgroupsComment
}
// WithParentIgroupsName adds the parentIgroupsName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithParentIgroupsName(parentIgroupsName *string) *IgroupCollectionGetParams {
o.SetParentIgroupsName(parentIgroupsName)
return o
}
// SetParentIgroupsName adds the parentIgroupsName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetParentIgroupsName(parentIgroupsName *string) {
o.ParentIgroupsName = parentIgroupsName
}
// WithParentIgroupsUUID adds the parentIgroupsUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithParentIgroupsUUID(parentIgroupsUUID *string) *IgroupCollectionGetParams {
o.SetParentIgroupsUUID(parentIgroupsUUID)
return o
}
// SetParentIgroupsUUID adds the parentIgroupsUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetParentIgroupsUUID(parentIgroupsUUID *string) {
o.ParentIgroupsUUID = parentIgroupsUUID
}
// WithPortsetName adds the portsetName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithPortsetName(portsetName *string) *IgroupCollectionGetParams {
o.SetPortsetName(portsetName)
return o
}
// SetPortsetName adds the portsetName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetPortsetName(portsetName *string) {
o.PortsetName = portsetName
}
// WithPortsetUUID adds the portsetUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithPortsetUUID(portsetUUID *string) *IgroupCollectionGetParams {
o.SetPortsetUUID(portsetUUID)
return o
}
// SetPortsetUUID adds the portsetUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetPortsetUUID(portsetUUID *string) {
o.PortsetUUID = portsetUUID
}
// WithProtocol adds the protocol to the igroup collection get params
func (o *IgroupCollectionGetParams) WithProtocol(protocol *string) *IgroupCollectionGetParams {
o.SetProtocol(protocol)
return o
}
// SetProtocol adds the protocol to the igroup collection get params
func (o *IgroupCollectionGetParams) SetProtocol(protocol *string) {
o.Protocol = protocol
}
// WithReturnRecords adds the returnRecords to the igroup collection get params
func (o *IgroupCollectionGetParams) WithReturnRecords(returnRecords *bool) *IgroupCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup collection get params
func (o *IgroupCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the igroup collection get params
func (o *IgroupCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IgroupCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the igroup collection get params
func (o *IgroupCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSupportsIgroups adds the supportsIgroups to the igroup collection get params
func (o *IgroupCollectionGetParams) WithSupportsIgroups(supportsIgroups *bool) *IgroupCollectionGetParams {
o.SetSupportsIgroups(supportsIgroups)
return o
}
// SetSupportsIgroups adds the supportsIgroups to the igroup collection get params
func (o *IgroupCollectionGetParams) SetSupportsIgroups(supportsIgroups *bool) {
o.SupportsIgroups = supportsIgroups
}
// WithSvmName adds the svmName to the igroup collection get params
func (o *IgroupCollectionGetParams) WithSvmName(svmName *string) *IgroupCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the igroup collection get params
func (o *IgroupCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithSvmUUID(svmUUID *string) *IgroupCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithTargetFirmwareRevision adds the targetFirmwareRevision to the igroup collection get params
func (o *IgroupCollectionGetParams) WithTargetFirmwareRevision(targetFirmwareRevision *string) *IgroupCollectionGetParams {
o.SetTargetFirmwareRevision(targetFirmwareRevision)
return o
}
// SetTargetFirmwareRevision adds the targetFirmwareRevision to the igroup collection get params
func (o *IgroupCollectionGetParams) SetTargetFirmwareRevision(targetFirmwareRevision *string) {
o.TargetFirmwareRevision = targetFirmwareRevision
}
// WithTargetProductID adds the targetProductID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithTargetProductID(targetProductID *string) *IgroupCollectionGetParams {
o.SetTargetProductID(targetProductID)
return o
}
// SetTargetProductID adds the targetProductId to the igroup collection get params
func (o *IgroupCollectionGetParams) SetTargetProductID(targetProductID *string) {
o.TargetProductID = targetProductID
}
// WithTargetVendorID adds the targetVendorID to the igroup collection get params
func (o *IgroupCollectionGetParams) WithTargetVendorID(targetVendorID *string) *IgroupCollectionGetParams {
o.SetTargetVendorID(targetVendorID)
return o
}
// SetTargetVendorID adds the targetVendorId to the igroup collection get params
func (o *IgroupCollectionGetParams) SetTargetVendorID(targetVendorID *string) {
o.TargetVendorID = targetVendorID
}
// WithUUID adds the uuid to the igroup collection get params
func (o *IgroupCollectionGetParams) WithUUID(uuid *string) *IgroupCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the igroup collection get params
func (o *IgroupCollectionGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupCollectionGetParams) 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.ConnectivityTrackingAlertsSummaryArgumentsCode != nil {
// query param connectivity_tracking.alerts.summary.arguments.code
var qrConnectivityTrackingAlertsSummaryArgumentsCode string
if o.ConnectivityTrackingAlertsSummaryArgumentsCode != nil {
qrConnectivityTrackingAlertsSummaryArgumentsCode = *o.ConnectivityTrackingAlertsSummaryArgumentsCode
}
qConnectivityTrackingAlertsSummaryArgumentsCode := qrConnectivityTrackingAlertsSummaryArgumentsCode
if qConnectivityTrackingAlertsSummaryArgumentsCode != "" {
if err := r.SetQueryParam("connectivity_tracking.alerts.summary.arguments.code", qConnectivityTrackingAlertsSummaryArgumentsCode); err != nil {
return err
}
}
}
if o.ConnectivityTrackingAlertsSummaryArgumentsMessage != nil {
// query param connectivity_tracking.alerts.summary.arguments.message
var qrConnectivityTrackingAlertsSummaryArgumentsMessage string
if o.ConnectivityTrackingAlertsSummaryArgumentsMessage != nil {
qrConnectivityTrackingAlertsSummaryArgumentsMessage = *o.ConnectivityTrackingAlertsSummaryArgumentsMessage
}
qConnectivityTrackingAlertsSummaryArgumentsMessage := qrConnectivityTrackingAlertsSummaryArgumentsMessage
if qConnectivityTrackingAlertsSummaryArgumentsMessage != "" {
if err := r.SetQueryParam("connectivity_tracking.alerts.summary.arguments.message", qConnectivityTrackingAlertsSummaryArgumentsMessage); err != nil {
return err
}
}
}
if o.ConnectivityTrackingAlertsSummaryCode != nil {
// query param connectivity_tracking.alerts.summary.code
var qrConnectivityTrackingAlertsSummaryCode string
if o.ConnectivityTrackingAlertsSummaryCode != nil {
qrConnectivityTrackingAlertsSummaryCode = *o.ConnectivityTrackingAlertsSummaryCode
}
qConnectivityTrackingAlertsSummaryCode := qrConnectivityTrackingAlertsSummaryCode
if qConnectivityTrackingAlertsSummaryCode != "" {
if err := r.SetQueryParam("connectivity_tracking.alerts.summary.code", qConnectivityTrackingAlertsSummaryCode); err != nil {
return err
}
}
}
if o.ConnectivityTrackingAlertsSummaryMessage != nil {
// query param connectivity_tracking.alerts.summary.message
var qrConnectivityTrackingAlertsSummaryMessage string
if o.ConnectivityTrackingAlertsSummaryMessage != nil {
qrConnectivityTrackingAlertsSummaryMessage = *o.ConnectivityTrackingAlertsSummaryMessage
}
qConnectivityTrackingAlertsSummaryMessage := qrConnectivityTrackingAlertsSummaryMessage
| 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/s_a_n/iscsi_service_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiServiceGetParams creates a new IscsiServiceGetParams 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 NewIscsiServiceGetParams() *IscsiServiceGetParams {
return &IscsiServiceGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiServiceGetParamsWithTimeout creates a new IscsiServiceGetParams object
// with the ability to set a timeout on a request.
func NewIscsiServiceGetParamsWithTimeout(timeout time.Duration) *IscsiServiceGetParams {
return &IscsiServiceGetParams{
timeout: timeout,
}
}
// NewIscsiServiceGetParamsWithContext creates a new IscsiServiceGetParams object
// with the ability to set a context for a request.
func NewIscsiServiceGetParamsWithContext(ctx context.Context) *IscsiServiceGetParams {
return &IscsiServiceGetParams{
Context: ctx,
}
}
// NewIscsiServiceGetParamsWithHTTPClient creates a new IscsiServiceGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiServiceGetParamsWithHTTPClient(client *http.Client) *IscsiServiceGetParams {
return &IscsiServiceGetParams{
HTTPClient: client,
}
}
/*
IscsiServiceGetParams contains all the parameters to send to the API endpoint
for the iscsi service get operation.
Typically these are written to a http.Request.
*/
type IscsiServiceGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* SvmUUID.
The unique identifier of the SVM for which to retrieve the iSCSI service.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi service get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceGetParams) WithDefaults() *IscsiServiceGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi service get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi service get params
func (o *IscsiServiceGetParams) WithTimeout(timeout time.Duration) *IscsiServiceGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi service get params
func (o *IscsiServiceGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi service get params
func (o *IscsiServiceGetParams) WithContext(ctx context.Context) *IscsiServiceGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi service get params
func (o *IscsiServiceGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi service get params
func (o *IscsiServiceGetParams) WithHTTPClient(client *http.Client) *IscsiServiceGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi service get params
func (o *IscsiServiceGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the iscsi service get params
func (o *IscsiServiceGetParams) WithFields(fields []string) *IscsiServiceGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi service get params
func (o *IscsiServiceGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithSvmUUID adds the svmUUID to the iscsi service get params
func (o *IscsiServiceGetParams) WithSvmUUID(svmUUID string) *IscsiServiceGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi service get params
func (o *IscsiServiceGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiServiceGetParams) 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
}
// bindParamIscsiServiceGet binds the parameter fields
func (o *IscsiServiceGetParams) 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/s_a_n/lun_map_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapGetReader is a Reader for the LunMapGet structure.
type LunMapGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunMapGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapGetDefault(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
}
}
// NewLunMapGetOK creates a LunMapGetOK with default headers values
func NewLunMapGetOK() *LunMapGetOK {
return &LunMapGetOK{}
}
/*
LunMapGetOK describes a response with status code 200, with default header values.
OK
*/
type LunMapGetOK struct {
Payload *models.LunMap
}
// IsSuccess returns true when this lun map get o k response has a 2xx status code
func (o *LunMapGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map get o k response has a 3xx status code
func (o *LunMapGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map get o k response has a 4xx status code
func (o *LunMapGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map get o k response has a 5xx status code
func (o *LunMapGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun map get o k response a status code equal to that given
func (o *LunMapGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunMapGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}][%d] lunMapGetOK %+v", 200, o.Payload)
}
func (o *LunMapGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}][%d] lunMapGetOK %+v", 200, o.Payload)
}
func (o *LunMapGetOK) GetPayload() *models.LunMap {
return o.Payload
}
func (o *LunMapGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LunMap)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunMapGetDefault creates a LunMapGetDefault with default headers values
func NewLunMapGetDefault(code int) *LunMapGetDefault {
return &LunMapGetDefault{
_statusCode: code,
}
}
/*
LunMapGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374852 | The initiator group does not exist or is not accessible to the caller. |
| 5374875 | The LUN does not exist or is not accessible to the caller. |
*/
type LunMapGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map get default response
func (o *LunMapGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map get default response has a 2xx status code
func (o *LunMapGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map get default response has a 3xx status code
func (o *LunMapGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map get default response has a 4xx status code
func (o *LunMapGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map get default response has a 5xx status code
func (o *LunMapGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map get default response a status code equal to that given
func (o *LunMapGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}][%d] lun_map_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}][%d] lun_map_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapGetDefault) 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/s_a_n/lun_map_reporting_node_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_reporting_node_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapReportingNodeCreateReader is a Reader for the LunMapReportingNodeCreate structure.
type LunMapReportingNodeCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapReportingNodeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewLunMapReportingNodeCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapReportingNodeCreateDefault(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
}
}
// NewLunMapReportingNodeCreateCreated creates a LunMapReportingNodeCreateCreated with default headers values
func NewLunMapReportingNodeCreateCreated() *LunMapReportingNodeCreateCreated {
return &LunMapReportingNodeCreateCreated{}
}
/*
LunMapReportingNodeCreateCreated describes a response with status code 201, with default header values.
Created
*/
type LunMapReportingNodeCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.LunMapReportingNodeResponse
}
// IsSuccess returns true when this lun map reporting node create created response has a 2xx status code
func (o *LunMapReportingNodeCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map reporting node create created response has a 3xx status code
func (o *LunMapReportingNodeCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map reporting node create created response has a 4xx status code
func (o *LunMapReportingNodeCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map reporting node create created response has a 5xx status code
func (o *LunMapReportingNodeCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this lun map reporting node create created response a status code equal to that given
func (o *LunMapReportingNodeCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *LunMapReportingNodeCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes][%d] lunMapReportingNodeCreateCreated %+v", 201, o.Payload)
}
func (o *LunMapReportingNodeCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes][%d] lunMapReportingNodeCreateCreated %+v", 201, o.Payload)
}
func (o *LunMapReportingNodeCreateCreated) GetPayload() *models.LunMapReportingNodeResponse {
return o.Payload
}
func (o *LunMapReportingNodeCreateCreated) 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.LunMapReportingNodeResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunMapReportingNodeCreateDefault creates a LunMapReportingNodeCreateDefault with default headers values
func NewLunMapReportingNodeCreateDefault(code int) *LunMapReportingNodeCreateDefault {
return &LunMapReportingNodeCreateDefault{
_statusCode: code,
}
}
/*
LunMapReportingNodeCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN does not exist or is not accessible to the caller. |
| 5374878 | The specified initiator group does not exist, is not accessible to the caller, or is not in the same SVM as the specified LUN. |
| 5374920 | The specified cluster node does not exist. |
| 5374921 | The specified cluster node name and UUID do not refer to the same cluster node. |
| 5374922 | The specified LUN map does not exist. |
| 5374923 | A cluster node `uuid` or `name` must be specified to add a reporting node. |
*/
type LunMapReportingNodeCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map reporting node create default response
func (o *LunMapReportingNodeCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map reporting node create default response has a 2xx status code
func (o *LunMapReportingNodeCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map reporting node create default response has a 3xx status code
func (o *LunMapReportingNodeCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map reporting node create default response has a 4xx status code
func (o *LunMapReportingNodeCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map reporting node create default response has a 5xx status code
func (o *LunMapReportingNodeCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map reporting node create default response a status code equal to that given
func (o *LunMapReportingNodeCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapReportingNodeCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes][%d] lun_map_reporting_node_create default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes][%d] lun_map_reporting_node_create default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapReportingNodeCreateDefault) 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/s_a_n/iscsi_service_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiServiceModifyReader is a Reader for the IscsiServiceModify structure.
type IscsiServiceModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiServiceModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiServiceModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiServiceModifyDefault(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
}
}
// NewIscsiServiceModifyOK creates a IscsiServiceModifyOK with default headers values
func NewIscsiServiceModifyOK() *IscsiServiceModifyOK {
return &IscsiServiceModifyOK{}
}
/*
IscsiServiceModifyOK describes a response with status code 200, with default header values.
OK
*/
type IscsiServiceModifyOK struct {
}
// IsSuccess returns true when this iscsi service modify o k response has a 2xx status code
func (o *IscsiServiceModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi service modify o k response has a 3xx status code
func (o *IscsiServiceModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi service modify o k response has a 4xx status code
func (o *IscsiServiceModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi service modify o k response has a 5xx status code
func (o *IscsiServiceModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi service modify o k response a status code equal to that given
func (o *IscsiServiceModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiServiceModifyOK) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceModifyOK ", 200)
}
func (o *IscsiServiceModifyOK) String() string {
return fmt.Sprintf("[PATCH /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceModifyOK ", 200)
}
func (o *IscsiServiceModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIscsiServiceModifyDefault creates a IscsiServiceModifyDefault with default headers values
func NewIscsiServiceModifyDefault(code int) *IscsiServiceModifyDefault {
return &IscsiServiceModifyDefault{
_statusCode: code,
}
}
/*
IscsiServiceModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 5374078 | The SVM does not have an iSCSI service. |
*/
type IscsiServiceModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi service modify default response
func (o *IscsiServiceModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi service modify default response has a 2xx status code
func (o *IscsiServiceModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi service modify default response has a 3xx status code
func (o *IscsiServiceModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi service modify default response has a 4xx status code
func (o *IscsiServiceModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi service modify default response has a 5xx status code
func (o *IscsiServiceModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi service modify default response a status code equal to that given
func (o *IscsiServiceModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiServiceModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_modify default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceModifyDefault) String() string {
return fmt.Sprintf("[PATCH /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_modify default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiServiceModifyDefault) 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/s_a_n/igroup_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupCreateParams creates a new IgroupCreateParams 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 NewIgroupCreateParams() *IgroupCreateParams {
return &IgroupCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupCreateParamsWithTimeout creates a new IgroupCreateParams object
// with the ability to set a timeout on a request.
func NewIgroupCreateParamsWithTimeout(timeout time.Duration) *IgroupCreateParams {
return &IgroupCreateParams{
timeout: timeout,
}
}
// NewIgroupCreateParamsWithContext creates a new IgroupCreateParams object
// with the ability to set a context for a request.
func NewIgroupCreateParamsWithContext(ctx context.Context) *IgroupCreateParams {
return &IgroupCreateParams{
Context: ctx,
}
}
// NewIgroupCreateParamsWithHTTPClient creates a new IgroupCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupCreateParamsWithHTTPClient(client *http.Client) *IgroupCreateParams {
return &IgroupCreateParams{
HTTPClient: client,
}
}
/*
IgroupCreateParams contains all the parameters to send to the API endpoint
for the igroup create operation.
Typically these are written to a http.Request.
*/
type IgroupCreateParams struct {
/* Info.
The property values for the new initiator group.
*/
Info *models.Igroup
/* 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 igroup create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupCreateParams) WithDefaults() *IgroupCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IgroupCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup create params
func (o *IgroupCreateParams) WithTimeout(timeout time.Duration) *IgroupCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup create params
func (o *IgroupCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup create params
func (o *IgroupCreateParams) WithContext(ctx context.Context) *IgroupCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup create params
func (o *IgroupCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup create params
func (o *IgroupCreateParams) WithHTTPClient(client *http.Client) *IgroupCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup create params
func (o *IgroupCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the igroup create params
func (o *IgroupCreateParams) WithInfo(info *models.Igroup) *IgroupCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the igroup create params
func (o *IgroupCreateParams) SetInfo(info *models.Igroup) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the igroup create params
func (o *IgroupCreateParams) WithReturnRecords(returnRecords *bool) *IgroupCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup create params
func (o *IgroupCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupCreateParams) 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/s_a_n/iscsi_service_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiServiceGetReader is a Reader for the IscsiServiceGet structure.
type IscsiServiceGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiServiceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiServiceGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiServiceGetDefault(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
}
}
// NewIscsiServiceGetOK creates a IscsiServiceGetOK with default headers values
func NewIscsiServiceGetOK() *IscsiServiceGetOK {
return &IscsiServiceGetOK{}
}
/*
IscsiServiceGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiServiceGetOK struct {
Payload *models.IscsiService
}
// IsSuccess returns true when this iscsi service get o k response has a 2xx status code
func (o *IscsiServiceGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi service get o k response has a 3xx status code
func (o *IscsiServiceGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi service get o k response has a 4xx status code
func (o *IscsiServiceGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi service get o k response has a 5xx status code
func (o *IscsiServiceGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi service get o k response a status code equal to that given
func (o *IscsiServiceGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiServiceGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceGetOK %+v", 200, o.Payload)
}
func (o *IscsiServiceGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceGetOK %+v", 200, o.Payload)
}
func (o *IscsiServiceGetOK) GetPayload() *models.IscsiService {
return o.Payload
}
func (o *IscsiServiceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiService)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiServiceGetDefault creates a IscsiServiceGetDefault with default headers values
func NewIscsiServiceGetDefault(code int) *IscsiServiceGetDefault {
return &IscsiServiceGetDefault{
_statusCode: code,
}
}
/*
IscsiServiceGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 5374078 | The SVM does not have an iSCSI service. |
*/
type IscsiServiceGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi service get default response
func (o *IscsiServiceGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi service get default response has a 2xx status code
func (o *IscsiServiceGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi service get default response has a 3xx status code
func (o *IscsiServiceGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi service get default response has a 4xx status code
func (o *IscsiServiceGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi service get default response has a 5xx status code
func (o *IscsiServiceGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi service get default response a status code equal to that given
func (o *IscsiServiceGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiServiceGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiServiceGetDefault) 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/s_a_n/lun_attribute_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunAttributeGetReader is a Reader for the LunAttributeGet structure.
type LunAttributeGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunAttributeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunAttributeGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunAttributeGetDefault(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
}
}
// NewLunAttributeGetOK creates a LunAttributeGetOK with default headers values
func NewLunAttributeGetOK() *LunAttributeGetOK {
return &LunAttributeGetOK{}
}
/*
LunAttributeGetOK describes a response with status code 200, with default header values.
OK
*/
type LunAttributeGetOK struct {
Payload *models.LunAttribute
}
// IsSuccess returns true when this lun attribute get o k response has a 2xx status code
func (o *LunAttributeGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun attribute get o k response has a 3xx status code
func (o *LunAttributeGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun attribute get o k response has a 4xx status code
func (o *LunAttributeGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun attribute get o k response has a 5xx status code
func (o *LunAttributeGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun attribute get o k response a status code equal to that given
func (o *LunAttributeGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunAttributeGetOK) Error() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeGetOK %+v", 200, o.Payload)
}
func (o *LunAttributeGetOK) String() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeGetOK %+v", 200, o.Payload)
}
func (o *LunAttributeGetOK) GetPayload() *models.LunAttribute {
return o.Payload
}
func (o *LunAttributeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LunAttribute)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunAttributeGetDefault creates a LunAttributeGetDefault with default headers values
func NewLunAttributeGetDefault(code int) *LunAttributeGetDefault {
return &LunAttributeGetDefault{
_statusCode: code,
}
}
/*
LunAttributeGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN was not found. |
| 5374931 | The specified attribute was not found. |
*/
type LunAttributeGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun attribute get default response
func (o *LunAttributeGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun attribute get default response has a 2xx status code
func (o *LunAttributeGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun attribute get default response has a 3xx status code
func (o *LunAttributeGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun attribute get default response has a 4xx status code
func (o *LunAttributeGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun attribute get default response has a 5xx status code
func (o *LunAttributeGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun attribute get default response a status code equal to that given
func (o *LunAttributeGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunAttributeGetDefault) Error() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_get default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeGetDefault) String() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_get default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunAttributeGetDefault) 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/s_a_n/iscsi_credentials_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiCredentialsCollectionGetReader is a Reader for the IscsiCredentialsCollectionGet structure.
type IscsiCredentialsCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiCredentialsCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiCredentialsCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiCredentialsCollectionGetDefault(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
}
}
// NewIscsiCredentialsCollectionGetOK creates a IscsiCredentialsCollectionGetOK with default headers values
func NewIscsiCredentialsCollectionGetOK() *IscsiCredentialsCollectionGetOK {
return &IscsiCredentialsCollectionGetOK{}
}
/*
IscsiCredentialsCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiCredentialsCollectionGetOK struct {
Payload *models.IscsiCredentialsResponse
}
// IsSuccess returns true when this iscsi credentials collection get o k response has a 2xx status code
func (o *IscsiCredentialsCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi credentials collection get o k response has a 3xx status code
func (o *IscsiCredentialsCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi credentials collection get o k response has a 4xx status code
func (o *IscsiCredentialsCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi credentials collection get o k response has a 5xx status code
func (o *IscsiCredentialsCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi credentials collection get o k response a status code equal to that given
func (o *IscsiCredentialsCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiCredentialsCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials][%d] iscsiCredentialsCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiCredentialsCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials][%d] iscsiCredentialsCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiCredentialsCollectionGetOK) GetPayload() *models.IscsiCredentialsResponse {
return o.Payload
}
func (o *IscsiCredentialsCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiCredentialsResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiCredentialsCollectionGetDefault creates a IscsiCredentialsCollectionGetDefault with default headers values
func NewIscsiCredentialsCollectionGetDefault(code int) *IscsiCredentialsCollectionGetDefault {
return &IscsiCredentialsCollectionGetDefault{
_statusCode: code,
}
}
/*
IscsiCredentialsCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type IscsiCredentialsCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi credentials collection get default response
func (o *IscsiCredentialsCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi credentials collection get default response has a 2xx status code
func (o *IscsiCredentialsCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi credentials collection get default response has a 3xx status code
func (o *IscsiCredentialsCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi credentials collection get default response has a 4xx status code
func (o *IscsiCredentialsCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi credentials collection get default response has a 5xx status code
func (o *IscsiCredentialsCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi credentials collection get default response a status code equal to that given
func (o *IscsiCredentialsCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiCredentialsCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials][%d] iscsi_credentials_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/credentials][%d] iscsi_credentials_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiCredentialsCollectionGetDefault) 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/s_a_n/portset_interface_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetInterfaceCreateParams creates a new PortsetInterfaceCreateParams 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 NewPortsetInterfaceCreateParams() *PortsetInterfaceCreateParams {
return &PortsetInterfaceCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetInterfaceCreateParamsWithTimeout creates a new PortsetInterfaceCreateParams object
// with the ability to set a timeout on a request.
func NewPortsetInterfaceCreateParamsWithTimeout(timeout time.Duration) *PortsetInterfaceCreateParams {
return &PortsetInterfaceCreateParams{
timeout: timeout,
}
}
// NewPortsetInterfaceCreateParamsWithContext creates a new PortsetInterfaceCreateParams object
// with the ability to set a context for a request.
func NewPortsetInterfaceCreateParamsWithContext(ctx context.Context) *PortsetInterfaceCreateParams {
return &PortsetInterfaceCreateParams{
Context: ctx,
}
}
// NewPortsetInterfaceCreateParamsWithHTTPClient creates a new PortsetInterfaceCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetInterfaceCreateParamsWithHTTPClient(client *http.Client) *PortsetInterfaceCreateParams {
return &PortsetInterfaceCreateParams{
HTTPClient: client,
}
}
/*
PortsetInterfaceCreateParams contains all the parameters to send to the API endpoint
for the portset interface create operation.
Typically these are written to a http.Request.
*/
type PortsetInterfaceCreateParams struct {
/* Info.
The properties of the interface to add to the portset.
*/
Info *models.PortsetInterface
/* PortsetUUID.
The unique identifier of the portset.
*/
PortsetUUID string
/* 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 portset interface create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceCreateParams) WithDefaults() *PortsetInterfaceCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset interface create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetInterfaceCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := PortsetInterfaceCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithTimeout(timeout time.Duration) *PortsetInterfaceCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithContext(ctx context.Context) *PortsetInterfaceCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithHTTPClient(client *http.Client) *PortsetInterfaceCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithInfo(info *models.PortsetInterface) *PortsetInterfaceCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetInfo(info *models.PortsetInterface) {
o.Info = info
}
// WithPortsetUUID adds the portsetUUID to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithPortsetUUID(portsetUUID string) *PortsetInterfaceCreateParams {
o.SetPortsetUUID(portsetUUID)
return o
}
// SetPortsetUUID adds the portsetUuid to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetPortsetUUID(portsetUUID string) {
o.PortsetUUID = portsetUUID
}
// WithReturnRecords adds the returnRecords to the portset interface create params
func (o *PortsetInterfaceCreateParams) WithReturnRecords(returnRecords *bool) *PortsetInterfaceCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the portset interface create params
func (o *PortsetInterfaceCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetInterfaceCreateParams) 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 portset.uuid
if err := r.SetPathParam("portset.uuid", o.PortsetUUID); 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/s_a_n/portset_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetDeleteParams creates a new PortsetDeleteParams 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 NewPortsetDeleteParams() *PortsetDeleteParams {
return &PortsetDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetDeleteParamsWithTimeout creates a new PortsetDeleteParams object
// with the ability to set a timeout on a request.
func NewPortsetDeleteParamsWithTimeout(timeout time.Duration) *PortsetDeleteParams {
return &PortsetDeleteParams{
timeout: timeout,
}
}
// NewPortsetDeleteParamsWithContext creates a new PortsetDeleteParams object
// with the ability to set a context for a request.
func NewPortsetDeleteParamsWithContext(ctx context.Context) *PortsetDeleteParams {
return &PortsetDeleteParams{
Context: ctx,
}
}
// NewPortsetDeleteParamsWithHTTPClient creates a new PortsetDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetDeleteParamsWithHTTPClient(client *http.Client) *PortsetDeleteParams {
return &PortsetDeleteParams{
HTTPClient: client,
}
}
/*
PortsetDeleteParams contains all the parameters to send to the API endpoint
for the portset delete operation.
Typically these are written to a http.Request.
*/
type PortsetDeleteParams struct {
/* AllowDeleteWhileBound.
Allows deletion of a portset that is bound to an igroup.<br/>
Deleting a portset can expand the set of LIFs through which a LUN is available.
*/
AllowDeleteWhileBound *bool
/* UUID.
The unique identifier of the portset.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the portset delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetDeleteParams) WithDefaults() *PortsetDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetDeleteParams) SetDefaults() {
var (
allowDeleteWhileBoundDefault = bool(false)
)
val := PortsetDeleteParams{
AllowDeleteWhileBound: &allowDeleteWhileBoundDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the portset delete params
func (o *PortsetDeleteParams) WithTimeout(timeout time.Duration) *PortsetDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset delete params
func (o *PortsetDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset delete params
func (o *PortsetDeleteParams) WithContext(ctx context.Context) *PortsetDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset delete params
func (o *PortsetDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset delete params
func (o *PortsetDeleteParams) WithHTTPClient(client *http.Client) *PortsetDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset delete params
func (o *PortsetDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAllowDeleteWhileBound adds the allowDeleteWhileBound to the portset delete params
func (o *PortsetDeleteParams) WithAllowDeleteWhileBound(allowDeleteWhileBound *bool) *PortsetDeleteParams {
o.SetAllowDeleteWhileBound(allowDeleteWhileBound)
return o
}
// SetAllowDeleteWhileBound adds the allowDeleteWhileBound to the portset delete params
func (o *PortsetDeleteParams) SetAllowDeleteWhileBound(allowDeleteWhileBound *bool) {
o.AllowDeleteWhileBound = allowDeleteWhileBound
}
// WithUUID adds the uuid to the portset delete params
func (o *PortsetDeleteParams) WithUUID(uuid string) *PortsetDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the portset delete params
func (o *PortsetDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AllowDeleteWhileBound != nil {
// query param allow_delete_while_bound
var qrAllowDeleteWhileBound bool
if o.AllowDeleteWhileBound != nil {
qrAllowDeleteWhileBound = *o.AllowDeleteWhileBound
}
qAllowDeleteWhileBound := swag.FormatBool(qrAllowDeleteWhileBound)
if qAllowDeleteWhileBound != "" {
if err := r.SetQueryParam("allow_delete_while_bound", qAllowDeleteWhileBound); 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/s_a_n/iscsi_session_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_session_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiSessionCollectionGetReader is a Reader for the IscsiSessionCollectionGet structure.
type IscsiSessionCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiSessionCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiSessionCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiSessionCollectionGetDefault(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
}
}
// NewIscsiSessionCollectionGetOK creates a IscsiSessionCollectionGetOK with default headers values
func NewIscsiSessionCollectionGetOK() *IscsiSessionCollectionGetOK {
return &IscsiSessionCollectionGetOK{}
}
/*
IscsiSessionCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiSessionCollectionGetOK struct {
Payload *models.IscsiSessionResponse
}
// IsSuccess returns true when this iscsi session collection get o k response has a 2xx status code
func (o *IscsiSessionCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi session collection get o k response has a 3xx status code
func (o *IscsiSessionCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi session collection get o k response has a 4xx status code
func (o *IscsiSessionCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi session collection get o k response has a 5xx status code
func (o *IscsiSessionCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi session collection get o k response a status code equal to that given
func (o *IscsiSessionCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiSessionCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions][%d] iscsiSessionCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiSessionCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions][%d] iscsiSessionCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiSessionCollectionGetOK) GetPayload() *models.IscsiSessionResponse {
return o.Payload
}
func (o *IscsiSessionCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiSessionResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiSessionCollectionGetDefault creates a IscsiSessionCollectionGetDefault with default headers values
func NewIscsiSessionCollectionGetDefault(code int) *IscsiSessionCollectionGetDefault {
return &IscsiSessionCollectionGetDefault{
_statusCode: code,
}
}
/*
IscsiSessionCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type IscsiSessionCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi session collection get default response
func (o *IscsiSessionCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi session collection get default response has a 2xx status code
func (o *IscsiSessionCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi session collection get default response has a 3xx status code
func (o *IscsiSessionCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi session collection get default response has a 4xx status code
func (o *IscsiSessionCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi session collection get default response has a 5xx status code
func (o *IscsiSessionCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi session collection get default response a status code equal to that given
func (o *IscsiSessionCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiSessionCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions][%d] iscsi_session_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiSessionCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/sessions][%d] iscsi_session_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiSessionCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiSessionCollectionGetDefault) 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/s_a_n/wwpn_alias_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewWwpnAliasCreateParams creates a new WwpnAliasCreateParams 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 NewWwpnAliasCreateParams() *WwpnAliasCreateParams {
return &WwpnAliasCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewWwpnAliasCreateParamsWithTimeout creates a new WwpnAliasCreateParams object
// with the ability to set a timeout on a request.
func NewWwpnAliasCreateParamsWithTimeout(timeout time.Duration) *WwpnAliasCreateParams {
return &WwpnAliasCreateParams{
timeout: timeout,
}
}
// NewWwpnAliasCreateParamsWithContext creates a new WwpnAliasCreateParams object
// with the ability to set a context for a request.
func NewWwpnAliasCreateParamsWithContext(ctx context.Context) *WwpnAliasCreateParams {
return &WwpnAliasCreateParams{
Context: ctx,
}
}
// NewWwpnAliasCreateParamsWithHTTPClient creates a new WwpnAliasCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewWwpnAliasCreateParamsWithHTTPClient(client *http.Client) *WwpnAliasCreateParams {
return &WwpnAliasCreateParams{
HTTPClient: client,
}
}
/*
WwpnAliasCreateParams contains all the parameters to send to the API endpoint
for the wwpn alias create operation.
Typically these are written to a http.Request.
*/
type WwpnAliasCreateParams struct {
/* Info.
The property values for the new WWPN alias.
*/
Info *models.WwpnAlias
/* 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 wwpn alias create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasCreateParams) WithDefaults() *WwpnAliasCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the wwpn alias create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := WwpnAliasCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the wwpn alias create params
func (o *WwpnAliasCreateParams) WithTimeout(timeout time.Duration) *WwpnAliasCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the wwpn alias create params
func (o *WwpnAliasCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the wwpn alias create params
func (o *WwpnAliasCreateParams) WithContext(ctx context.Context) *WwpnAliasCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the wwpn alias create params
func (o *WwpnAliasCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the wwpn alias create params
func (o *WwpnAliasCreateParams) WithHTTPClient(client *http.Client) *WwpnAliasCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the wwpn alias create params
func (o *WwpnAliasCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the wwpn alias create params
func (o *WwpnAliasCreateParams) WithInfo(info *models.WwpnAlias) *WwpnAliasCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the wwpn alias create params
func (o *WwpnAliasCreateParams) SetInfo(info *models.WwpnAlias) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the wwpn alias create params
func (o *WwpnAliasCreateParams) WithReturnRecords(returnRecords *bool) *WwpnAliasCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the wwpn alias create params
func (o *WwpnAliasCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *WwpnAliasCreateParams) 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/s_a_n/portset_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewPortsetCreateParams creates a new PortsetCreateParams 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 NewPortsetCreateParams() *PortsetCreateParams {
return &PortsetCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetCreateParamsWithTimeout creates a new PortsetCreateParams object
// with the ability to set a timeout on a request.
func NewPortsetCreateParamsWithTimeout(timeout time.Duration) *PortsetCreateParams {
return &PortsetCreateParams{
timeout: timeout,
}
}
// NewPortsetCreateParamsWithContext creates a new PortsetCreateParams object
// with the ability to set a context for a request.
func NewPortsetCreateParamsWithContext(ctx context.Context) *PortsetCreateParams {
return &PortsetCreateParams{
Context: ctx,
}
}
// NewPortsetCreateParamsWithHTTPClient creates a new PortsetCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetCreateParamsWithHTTPClient(client *http.Client) *PortsetCreateParams {
return &PortsetCreateParams{
HTTPClient: client,
}
}
/*
PortsetCreateParams contains all the parameters to send to the API endpoint
for the portset create operation.
Typically these are written to a http.Request.
*/
type PortsetCreateParams struct {
/* Info.
The property values for the new portset.
*/
Info *models.Portset
/* 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 portset create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetCreateParams) WithDefaults() *PortsetCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := PortsetCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the portset create params
func (o *PortsetCreateParams) WithTimeout(timeout time.Duration) *PortsetCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset create params
func (o *PortsetCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset create params
func (o *PortsetCreateParams) WithContext(ctx context.Context) *PortsetCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset create params
func (o *PortsetCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset create params
func (o *PortsetCreateParams) WithHTTPClient(client *http.Client) *PortsetCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset create params
func (o *PortsetCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the portset create params
func (o *PortsetCreateParams) WithInfo(info *models.Portset) *PortsetCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the portset create params
func (o *PortsetCreateParams) SetInfo(info *models.Portset) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the portset create params
func (o *PortsetCreateParams) WithReturnRecords(returnRecords *bool) *PortsetCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the portset create params
func (o *PortsetCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetCreateParams) 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/s_a_n/lun_map_reporting_node_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_reporting_node_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapReportingNodeDeleteReader is a Reader for the LunMapReportingNodeDelete structure.
type LunMapReportingNodeDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapReportingNodeDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunMapReportingNodeDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapReportingNodeDeleteDefault(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
}
}
// NewLunMapReportingNodeDeleteOK creates a LunMapReportingNodeDeleteOK with default headers values
func NewLunMapReportingNodeDeleteOK() *LunMapReportingNodeDeleteOK {
return &LunMapReportingNodeDeleteOK{}
}
/*
LunMapReportingNodeDeleteOK describes a response with status code 200, with default header values.
OK
*/
type LunMapReportingNodeDeleteOK struct {
}
// IsSuccess returns true when this lun map reporting node delete o k response has a 2xx status code
func (o *LunMapReportingNodeDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map reporting node delete o k response has a 3xx status code
func (o *LunMapReportingNodeDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map reporting node delete o k response has a 4xx status code
func (o *LunMapReportingNodeDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map reporting node delete o k response has a 5xx status code
func (o *LunMapReportingNodeDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun map reporting node delete o k response a status code equal to that given
func (o *LunMapReportingNodeDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *LunMapReportingNodeDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lunMapReportingNodeDeleteOK ", 200)
}
func (o *LunMapReportingNodeDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lunMapReportingNodeDeleteOK ", 200)
}
func (o *LunMapReportingNodeDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewLunMapReportingNodeDeleteDefault creates a LunMapReportingNodeDeleteDefault with default headers values
func NewLunMapReportingNodeDeleteDefault(code int) *LunMapReportingNodeDeleteDefault {
return &LunMapReportingNodeDeleteDefault{
_statusCode: code,
}
}
/*
LunMapReportingNodeDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374608 | An attempt was made to delete the last reporting node for a LUN. The REST API requires that a LUN map must maintain at least one reporting node. |
| 5374875 | The specified LUN does not exist or is not accessible to the caller. |
| 5374878 | The specified initiator group does not exist, is not accessible to the caller, or is not in the same SVM as the specified LUN. |
| 5374922 | The specified LUN map does not exist. |
*/
type LunMapReportingNodeDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map reporting node delete default response
func (o *LunMapReportingNodeDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map reporting node delete default response has a 2xx status code
func (o *LunMapReportingNodeDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map reporting node delete default response has a 3xx status code
func (o *LunMapReportingNodeDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map reporting node delete default response has a 4xx status code
func (o *LunMapReportingNodeDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map reporting node delete default response has a 5xx status code
func (o *LunMapReportingNodeDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map reporting node delete default response a status code equal to that given
func (o *LunMapReportingNodeDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapReportingNodeDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lun_map_reporting_node_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lun_map_reporting_node_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapReportingNodeDeleteDefault) 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/s_a_n/lun_map_reporting_node_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_reporting_node_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunMapReportingNodeCollectionGetParams creates a new LunMapReportingNodeCollectionGetParams 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 NewLunMapReportingNodeCollectionGetParams() *LunMapReportingNodeCollectionGetParams {
return &LunMapReportingNodeCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapReportingNodeCollectionGetParamsWithTimeout creates a new LunMapReportingNodeCollectionGetParams object
// with the ability to set a timeout on a request.
func NewLunMapReportingNodeCollectionGetParamsWithTimeout(timeout time.Duration) *LunMapReportingNodeCollectionGetParams {
return &LunMapReportingNodeCollectionGetParams{
timeout: timeout,
}
}
// NewLunMapReportingNodeCollectionGetParamsWithContext creates a new LunMapReportingNodeCollectionGetParams object
// with the ability to set a context for a request.
func NewLunMapReportingNodeCollectionGetParamsWithContext(ctx context.Context) *LunMapReportingNodeCollectionGetParams {
return &LunMapReportingNodeCollectionGetParams{
Context: ctx,
}
}
// NewLunMapReportingNodeCollectionGetParamsWithHTTPClient creates a new LunMapReportingNodeCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapReportingNodeCollectionGetParamsWithHTTPClient(client *http.Client) *LunMapReportingNodeCollectionGetParams {
return &LunMapReportingNodeCollectionGetParams{
HTTPClient: client,
}
}
/*
LunMapReportingNodeCollectionGetParams contains all the parameters to send to the API endpoint
for the lun map reporting node collection get operation.
Typically these are written to a http.Request.
*/
type LunMapReportingNodeCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupUUID.
The unique identifier of the igroup.
*/
IgroupUUID string
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID 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
/* 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
/* UUID.
Filter by uuid
*/
UUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun map reporting node collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeCollectionGetParams) WithDefaults() *LunMapReportingNodeCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map reporting node collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := LunMapReportingNodeCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithTimeout(timeout time.Duration) *LunMapReportingNodeCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithContext(ctx context.Context) *LunMapReportingNodeCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithHTTPClient(client *http.Client) *LunMapReportingNodeCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithFields(fields []string) *LunMapReportingNodeCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithIgroupUUID(igroupUUID string) *LunMapReportingNodeCollectionGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithLunUUID adds the lunUUID to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithLunUUID(lunUUID string) *LunMapReportingNodeCollectionGetParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithMaxRecords adds the maxRecords to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithMaxRecords(maxRecords *int64) *LunMapReportingNodeCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithName(name *string) *LunMapReportingNodeCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithOrderBy(orderBy []string) *LunMapReportingNodeCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithReturnRecords(returnRecords *bool) *LunMapReportingNodeCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *LunMapReportingNodeCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) WithUUID(uuid *string) *LunMapReportingNodeCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the lun map reporting node collection get params
func (o *LunMapReportingNodeCollectionGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapReportingNodeCollectionGetParams) 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 igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
// path param lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); 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.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.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
}
// bindParamLunMapReportingNodeCollectionGet binds the parameter fields
func (o *LunMapReportingNodeCollectionGetParams) 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
}
// bindParamLunMapReportingNodeCollectionGet binds the parameter order_by
func (o *LunMapReportingNodeCollectionGetParams) 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/s_a_n/iscsi_credentials_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCredentialsCreateParams creates a new IscsiCredentialsCreateParams 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 NewIscsiCredentialsCreateParams() *IscsiCredentialsCreateParams {
return &IscsiCredentialsCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCredentialsCreateParamsWithTimeout creates a new IscsiCredentialsCreateParams object
// with the ability to set a timeout on a request.
func NewIscsiCredentialsCreateParamsWithTimeout(timeout time.Duration) *IscsiCredentialsCreateParams {
return &IscsiCredentialsCreateParams{
timeout: timeout,
}
}
// NewIscsiCredentialsCreateParamsWithContext creates a new IscsiCredentialsCreateParams object
// with the ability to set a context for a request.
func NewIscsiCredentialsCreateParamsWithContext(ctx context.Context) *IscsiCredentialsCreateParams {
return &IscsiCredentialsCreateParams{
Context: ctx,
}
}
// NewIscsiCredentialsCreateParamsWithHTTPClient creates a new IscsiCredentialsCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCredentialsCreateParamsWithHTTPClient(client *http.Client) *IscsiCredentialsCreateParams {
return &IscsiCredentialsCreateParams{
HTTPClient: client,
}
}
/*
IscsiCredentialsCreateParams contains all the parameters to send to the API endpoint
for the iscsi credentials create operation.
Typically these are written to a http.Request.
*/
type IscsiCredentialsCreateParams struct {
/* Info.
The property values for the new iSCSI credentials object.
*/
Info *models.IscsiCredentials
/* 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 iscsi credentials create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsCreateParams) WithDefaults() *IscsiCredentialsCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi credentials create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IscsiCredentialsCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) WithTimeout(timeout time.Duration) *IscsiCredentialsCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) WithContext(ctx context.Context) *IscsiCredentialsCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) WithHTTPClient(client *http.Client) *IscsiCredentialsCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) WithInfo(info *models.IscsiCredentials) *IscsiCredentialsCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) SetInfo(info *models.IscsiCredentials) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) WithReturnRecords(returnRecords *bool) *IscsiCredentialsCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi credentials create params
func (o *IscsiCredentialsCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCredentialsCreateParams) 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/s_a_n/iscsi_service_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiServiceCreateReader is a Reader for the IscsiServiceCreate structure.
type IscsiServiceCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiServiceCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewIscsiServiceCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiServiceCreateDefault(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
}
}
// NewIscsiServiceCreateCreated creates a IscsiServiceCreateCreated with default headers values
func NewIscsiServiceCreateCreated() *IscsiServiceCreateCreated {
return &IscsiServiceCreateCreated{}
}
/*
IscsiServiceCreateCreated describes a response with status code 201, with default header values.
Created
*/
type IscsiServiceCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.IscsiServiceResponse
}
// IsSuccess returns true when this iscsi service create created response has a 2xx status code
func (o *IscsiServiceCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi service create created response has a 3xx status code
func (o *IscsiServiceCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi service create created response has a 4xx status code
func (o *IscsiServiceCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi service create created response has a 5xx status code
func (o *IscsiServiceCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi service create created response a status code equal to that given
func (o *IscsiServiceCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *IscsiServiceCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/services][%d] iscsiServiceCreateCreated %+v", 201, o.Payload)
}
func (o *IscsiServiceCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/services][%d] iscsiServiceCreateCreated %+v", 201, o.Payload)
}
func (o *IscsiServiceCreateCreated) GetPayload() *models.IscsiServiceResponse {
return o.Payload
}
func (o *IscsiServiceCreateCreated) 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.IscsiServiceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiServiceCreateDefault creates a IscsiServiceCreateDefault with default headers values
func NewIscsiServiceCreateDefault(code int) *IscsiServiceCreateDefault {
return &IscsiServiceCreateDefault{
_statusCode: code,
}
}
/*
IscsiServiceCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1115127 | The cluster lacks a valid iSCSI license. |
| 2621462 | The supplied SVM does not exist. |
| 2621507 | The iSCSI protocol is not allowed for the specified SVM. |
| 2621706 | The specified `svm.uuid` and `svm.name` do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5373966 | An iSCSI service cannot be created in an SVM that is configured for NVMe. |
| 5374077 | An iSCSI service already exists for the specified SVM. |
| 5374893 | The SVM is stopped. The SVM must be running to create an iSCSI service. |
*/
type IscsiServiceCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi service create default response
func (o *IscsiServiceCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi service create default response has a 2xx status code
func (o *IscsiServiceCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi service create default response has a 3xx status code
func (o *IscsiServiceCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi service create default response has a 4xx status code
func (o *IscsiServiceCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi service create default response has a 5xx status code
func (o *IscsiServiceCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi service create default response a status code equal to that given
func (o *IscsiServiceCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiServiceCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/services][%d] iscsi_service_create default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/iscsi/services][%d] iscsi_service_create default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiServiceCreateDefault) 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/s_a_n/lun_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunGetReader is a Reader for the LunGet structure.
type LunGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunGetDefault(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
}
}
// NewLunGetOK creates a LunGetOK with default headers values
func NewLunGetOK() *LunGetOK {
return &LunGetOK{}
}
/*
LunGetOK describes a response with status code 200, with default header values.
OK
*/
type LunGetOK struct {
Payload *models.Lun
}
// IsSuccess returns true when this lun get o k response has a 2xx status code
func (o *LunGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun get o k response has a 3xx status code
func (o *LunGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun get o k response has a 4xx status code
func (o *LunGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun get o k response has a 5xx status code
func (o *LunGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun get o k response a status code equal to that given
func (o *LunGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunGetOK) Error() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}][%d] lunGetOK %+v", 200, o.Payload)
}
func (o *LunGetOK) String() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}][%d] lunGetOK %+v", 200, o.Payload)
}
func (o *LunGetOK) GetPayload() *models.Lun {
return o.Payload
}
func (o *LunGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Lun)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunGetDefault creates a LunGetDefault with default headers values
func NewLunGetDefault(code int) *LunGetDefault {
return &LunGetDefault{
_statusCode: code,
}
}
/*
LunGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN was not found. |
| 5374876 | The specified LUN was not found. |
*/
type LunGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun get default response
func (o *LunGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun get default response has a 2xx status code
func (o *LunGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun get default response has a 3xx status code
func (o *LunGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun get default response has a 4xx status code
func (o *LunGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun get default response has a 5xx status code
func (o *LunGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun get default response a status code equal to that given
func (o *LunGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunGetDefault) Error() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}][%d] lun_get default %+v", o._statusCode, o.Payload)
}
func (o *LunGetDefault) String() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}][%d] lun_get default %+v", o._statusCode, o.Payload)
}
func (o *LunGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunGetDefault) 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/s_a_n/igroup_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupCreateReader is a Reader for the IgroupCreate structure.
type IgroupCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewIgroupCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupCreateDefault(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
}
}
// NewIgroupCreateCreated creates a IgroupCreateCreated with default headers values
func NewIgroupCreateCreated() *IgroupCreateCreated {
return &IgroupCreateCreated{}
}
/*
IgroupCreateCreated describes a response with status code 201, with default header values.
Created
*/
type IgroupCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.IgroupResponse
}
// IsSuccess returns true when this igroup create created response has a 2xx status code
func (o *IgroupCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup create created response has a 3xx status code
func (o *IgroupCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup create created response has a 4xx status code
func (o *IgroupCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup create created response has a 5xx status code
func (o *IgroupCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this igroup create created response a status code equal to that given
func (o *IgroupCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *IgroupCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups][%d] igroupCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups][%d] igroupCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupCreateCreated) GetPayload() *models.IgroupResponse {
return o.Payload
}
func (o *IgroupCreateCreated) 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.IgroupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupCreateDefault creates a IgroupCreateDefault with default headers values
func NewIgroupCreateDefault(code int) *IgroupCreateDefault {
return &IgroupCreateDefault{
_statusCode: code,
}
}
/*
IgroupCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | The supplied SVM does not exist. |
| 2621706 | The specified `svm.uuid` and `svm.name` do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5373958 | An invalid initiator group name was supplied. |
| 5373966 | An initiator group cannot be created in an SVM that is configured for NVMe. |
| 5373969 | A supplied initiator name looks like an iSCSI IQN initiator, but the portions after the prefix are missing. |
| 5373971 | A supplied initiator name looks like an iSCSI IQN initiator, but the date portion is invalid. |
| 5373972 | A supplied initiator name looks like an iSCSI IQN initiator, but the naming authority portion is invalid. |
| 5373977 | A supplied initiator name looks like an iSCSI EUI initiator, but the length is invalid. |
| 5373978 | A supplied initiator name looks like an iSCSI EUI initiator, but the format is invalid. |
| 5373992 | A supplied initiator name was too long to be valid. |
| 5373993 | A supplied initiator name did not match any valid format. |
| 5374023 | An initiator group with the same name already exists. |
| 5374027 | An attempt was made to bind a portset with no member network interfaces to the initiator group. |
| 5374028 | An attempt was made to bind a portset with an incompatible protocol to the initiator group. |
| 5374038 | An invalid Fibre Channel WWPN was supplied. |
| 5374039 | An invalid iSCSI initiator name was supplied. |
| 5374040 | Initiators and child initiator groups were both supplied, but only one option is allowed. |
| 5374732 | An initiator is already in another initiator group with a conflicting operating system type. |
| 5374735 | An attempt was made to add a child igroup that would exceed the maximum allowable depth. |
| 5374737 | A supplied child initiator group already exists in another initiator group's hierarchy. |
| 5374739 | A supplied child initiator group has an operating system type that differs from the parent initiator group. |
| 5374740 | A supplied child initiator group has an protocol that differs from the parent initiator group. |
| 5374741 | A supplied child initiator group is already owned by a different child in the initiator group's hierarchy. |
| 5374742 | A supplied child initiator group contains an initiator that is already owned by another initiator group in the hierarchy. |
| 5374746 | The cluster is currently running in a mixed version and nested initiator groups cannot be created until the effective cluster version reaches 9.9.1. |
| 5374747 | The cluster is currently running in a mixed version and initiator group comments cannot be created until the effective cluster version reaches 9.9.1. |
| 5374917 | Multiple matching initiators have been supplied with conflicting comments. |
*/
type IgroupCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup create default response
func (o *IgroupCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup create default response has a 2xx status code
func (o *IgroupCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup create default response has a 3xx status code
func (o *IgroupCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup create default response has a 4xx status code
func (o *IgroupCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup create default response has a 5xx status code
func (o *IgroupCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup create default response a status code equal to that given
func (o *IgroupCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups][%d] igroup_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups][%d] igroup_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupCreateDefault) 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/s_a_n/igroup_initiator_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupInitiatorGetReader is a Reader for the IgroupInitiatorGet structure.
type IgroupInitiatorGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupInitiatorGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupInitiatorGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupInitiatorGetDefault(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
}
}
// NewIgroupInitiatorGetOK creates a IgroupInitiatorGetOK with default headers values
func NewIgroupInitiatorGetOK() *IgroupInitiatorGetOK {
return &IgroupInitiatorGetOK{}
}
/*
IgroupInitiatorGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupInitiatorGetOK struct {
Payload *models.IgroupInitiator
}
// IsSuccess returns true when this igroup initiator get o k response has a 2xx status code
func (o *IgroupInitiatorGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup initiator get o k response has a 3xx status code
func (o *IgroupInitiatorGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup initiator get o k response has a 4xx status code
func (o *IgroupInitiatorGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup initiator get o k response has a 5xx status code
func (o *IgroupInitiatorGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup initiator get o k response a status code equal to that given
func (o *IgroupInitiatorGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupInitiatorGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorGetOK %+v", 200, o.Payload)
}
func (o *IgroupInitiatorGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorGetOK %+v", 200, o.Payload)
}
func (o *IgroupInitiatorGetOK) GetPayload() *models.IgroupInitiator {
return o.Payload
}
func (o *IgroupInitiatorGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IgroupInitiator)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupInitiatorGetDefault creates a IgroupInitiatorGetDefault with default headers values
func NewIgroupInitiatorGetDefault(code int) *IgroupInitiatorGetDefault {
return &IgroupInitiatorGetDefault{
_statusCode: code,
}
}
/*
IgroupInitiatorGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4 | The initiator is not a member of the initiator group. |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupInitiatorGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup initiator get default response
func (o *IgroupInitiatorGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup initiator get default response has a 2xx status code
func (o *IgroupInitiatorGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup initiator get default response has a 3xx status code
func (o *IgroupInitiatorGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup initiator get default response has a 4xx status code
func (o *IgroupInitiatorGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup initiator get default response has a 5xx status code
func (o *IgroupInitiatorGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup initiator get default response a status code equal to that given
func (o *IgroupInitiatorGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupInitiatorGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupInitiatorGetDefault) 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/s_a_n/igroup_initiator_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupInitiatorModifyReader is a Reader for the IgroupInitiatorModify structure.
type IgroupInitiatorModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupInitiatorModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupInitiatorModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupInitiatorModifyDefault(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
}
}
// NewIgroupInitiatorModifyOK creates a IgroupInitiatorModifyOK with default headers values
func NewIgroupInitiatorModifyOK() *IgroupInitiatorModifyOK {
return &IgroupInitiatorModifyOK{}
}
/*
IgroupInitiatorModifyOK describes a response with status code 200, with default header values.
OK
*/
type IgroupInitiatorModifyOK struct {
}
// IsSuccess returns true when this igroup initiator modify o k response has a 2xx status code
func (o *IgroupInitiatorModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup initiator modify o k response has a 3xx status code
func (o *IgroupInitiatorModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup initiator modify o k response has a 4xx status code
func (o *IgroupInitiatorModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup initiator modify o k response has a 5xx status code
func (o *IgroupInitiatorModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup initiator modify o k response a status code equal to that given
func (o *IgroupInitiatorModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupInitiatorModifyOK) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorModifyOK ", 200)
}
func (o *IgroupInitiatorModifyOK) String() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorModifyOK ", 200)
}
func (o *IgroupInitiatorModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIgroupInitiatorModifyDefault creates a IgroupInitiatorModifyDefault with default headers values
func NewIgroupInitiatorModifyDefault(code int) *IgroupInitiatorModifyDefault {
return &IgroupInitiatorModifyDefault{
_statusCode: code,
}
}
/*
IgroupInitiatorModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374034 | An initiator is not a member of the initiator group. |
| 5374744 | The cluster is currently running in a mixed version and the initiators cannot be modified until the effective cluster version reaches 9.9.1. |
| 5374852 | The initiator group does not exist. |
| 5374918 | A subset of the provided list of initiators were modified before a failure occurred. |
*/
type IgroupInitiatorModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup initiator modify default response
func (o *IgroupInitiatorModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup initiator modify default response has a 2xx status code
func (o *IgroupInitiatorModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup initiator modify default response has a 3xx status code
func (o *IgroupInitiatorModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup initiator modify default response has a 4xx status code
func (o *IgroupInitiatorModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup initiator modify default response has a 5xx status code
func (o *IgroupInitiatorModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup initiator modify default response a status code equal to that given
func (o *IgroupInitiatorModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupInitiatorModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_modify default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorModifyDefault) String() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_modify default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupInitiatorModifyDefault) 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/s_a_n/igroup_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupDeleteParams creates a new IgroupDeleteParams 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 NewIgroupDeleteParams() *IgroupDeleteParams {
return &IgroupDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupDeleteParamsWithTimeout creates a new IgroupDeleteParams object
// with the ability to set a timeout on a request.
func NewIgroupDeleteParamsWithTimeout(timeout time.Duration) *IgroupDeleteParams {
return &IgroupDeleteParams{
timeout: timeout,
}
}
// NewIgroupDeleteParamsWithContext creates a new IgroupDeleteParams object
// with the ability to set a context for a request.
func NewIgroupDeleteParamsWithContext(ctx context.Context) *IgroupDeleteParams {
return &IgroupDeleteParams{
Context: ctx,
}
}
// NewIgroupDeleteParamsWithHTTPClient creates a new IgroupDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupDeleteParamsWithHTTPClient(client *http.Client) *IgroupDeleteParams {
return &IgroupDeleteParams{
HTTPClient: client,
}
}
/*
IgroupDeleteParams contains all the parameters to send to the API endpoint
for the igroup delete operation.
Typically these are written to a http.Request.
*/
type IgroupDeleteParams struct {
/* AllowDeleteWhileMapped.
Allows the deletion of a mapped initiator group.<br/>
Deleting a mapped initiator group means that the LUNs, to which the
initiator group is mapped, are no longer available to the initiators.
This might cause a disruption in the availability of data.<br/>
<b>This parameter should be used with caution.</b>
*/
AllowDeleteWhileMapped *bool
/* UUID.
The unique identifier of the initiator group.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupDeleteParams) WithDefaults() *IgroupDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupDeleteParams) SetDefaults() {
var (
allowDeleteWhileMappedDefault = bool(false)
)
val := IgroupDeleteParams{
AllowDeleteWhileMapped: &allowDeleteWhileMappedDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup delete params
func (o *IgroupDeleteParams) WithTimeout(timeout time.Duration) *IgroupDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup delete params
func (o *IgroupDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup delete params
func (o *IgroupDeleteParams) WithContext(ctx context.Context) *IgroupDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup delete params
func (o *IgroupDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup delete params
func (o *IgroupDeleteParams) WithHTTPClient(client *http.Client) *IgroupDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup delete params
func (o *IgroupDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAllowDeleteWhileMapped adds the allowDeleteWhileMapped to the igroup delete params
func (o *IgroupDeleteParams) WithAllowDeleteWhileMapped(allowDeleteWhileMapped *bool) *IgroupDeleteParams {
o.SetAllowDeleteWhileMapped(allowDeleteWhileMapped)
return o
}
// SetAllowDeleteWhileMapped adds the allowDeleteWhileMapped to the igroup delete params
func (o *IgroupDeleteParams) SetAllowDeleteWhileMapped(allowDeleteWhileMapped *bool) {
o.AllowDeleteWhileMapped = allowDeleteWhileMapped
}
// WithUUID adds the uuid to the igroup delete params
func (o *IgroupDeleteParams) WithUUID(uuid string) *IgroupDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the igroup delete params
func (o *IgroupDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AllowDeleteWhileMapped != nil {
// query param allow_delete_while_mapped
var qrAllowDeleteWhileMapped bool
if o.AllowDeleteWhileMapped != nil {
qrAllowDeleteWhileMapped = *o.AllowDeleteWhileMapped
}
qAllowDeleteWhileMapped := swag.FormatBool(qrAllowDeleteWhileMapped)
if qAllowDeleteWhileMapped != "" {
if err := r.SetQueryParam("allow_delete_while_mapped", qAllowDeleteWhileMapped); 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/s_a_n/iscsi_service_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiServiceCollectionGetReader is a Reader for the IscsiServiceCollectionGet structure.
type IscsiServiceCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiServiceCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiServiceCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiServiceCollectionGetDefault(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
}
}
// NewIscsiServiceCollectionGetOK creates a IscsiServiceCollectionGetOK with default headers values
func NewIscsiServiceCollectionGetOK() *IscsiServiceCollectionGetOK {
return &IscsiServiceCollectionGetOK{}
}
/*
IscsiServiceCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiServiceCollectionGetOK struct {
Payload *models.IscsiServiceResponse
}
// IsSuccess returns true when this iscsi service collection get o k response has a 2xx status code
func (o *IscsiServiceCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi service collection get o k response has a 3xx status code
func (o *IscsiServiceCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi service collection get o k response has a 4xx status code
func (o *IscsiServiceCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi service collection get o k response has a 5xx status code
func (o *IscsiServiceCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi service collection get o k response a status code equal to that given
func (o *IscsiServiceCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiServiceCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services][%d] iscsiServiceCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiServiceCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services][%d] iscsiServiceCollectionGetOK %+v", 200, o.Payload)
}
func (o *IscsiServiceCollectionGetOK) GetPayload() *models.IscsiServiceResponse {
return o.Payload
}
func (o *IscsiServiceCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IscsiServiceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiServiceCollectionGetDefault creates a IscsiServiceCollectionGetDefault with default headers values
func NewIscsiServiceCollectionGetDefault(code int) *IscsiServiceCollectionGetDefault {
return &IscsiServiceCollectionGetDefault{
_statusCode: code,
}
}
/*
IscsiServiceCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type IscsiServiceCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi service collection get default response
func (o *IscsiServiceCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi service collection get default response has a 2xx status code
func (o *IscsiServiceCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi service collection get default response has a 3xx status code
func (o *IscsiServiceCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi service collection get default response has a 4xx status code
func (o *IscsiServiceCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi service collection get default response has a 5xx status code
func (o *IscsiServiceCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi service collection get default response a status code equal to that given
func (o *IscsiServiceCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiServiceCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services][%d] iscsi_service_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services][%d] iscsi_service_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiServiceCollectionGetDefault) 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/s_a_n/vvol_binding_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewVvolBindingGetParams creates a new VvolBindingGetParams 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 NewVvolBindingGetParams() *VvolBindingGetParams {
return &VvolBindingGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewVvolBindingGetParamsWithTimeout creates a new VvolBindingGetParams object
// with the ability to set a timeout on a request.
func NewVvolBindingGetParamsWithTimeout(timeout time.Duration) *VvolBindingGetParams {
return &VvolBindingGetParams{
timeout: timeout,
}
}
// NewVvolBindingGetParamsWithContext creates a new VvolBindingGetParams object
// with the ability to set a context for a request.
func NewVvolBindingGetParamsWithContext(ctx context.Context) *VvolBindingGetParams {
return &VvolBindingGetParams{
Context: ctx,
}
}
// NewVvolBindingGetParamsWithHTTPClient creates a new VvolBindingGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewVvolBindingGetParamsWithHTTPClient(client *http.Client) *VvolBindingGetParams {
return &VvolBindingGetParams{
HTTPClient: client,
}
}
/*
VvolBindingGetParams contains all the parameters to send to the API endpoint
for the vvol binding get operation.
Typically these are written to a http.Request.
*/
type VvolBindingGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* ProtocolEndpointUUID.
The unique identifier of the class `protocol_endpoint` LUN.
*/
ProtocolEndpointUUID string
/* VvolUUID.
The unique identifier of the class `vvol` LUN.
*/
VvolUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the vvol binding get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingGetParams) WithDefaults() *VvolBindingGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the vvol binding get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the vvol binding get params
func (o *VvolBindingGetParams) WithTimeout(timeout time.Duration) *VvolBindingGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the vvol binding get params
func (o *VvolBindingGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the vvol binding get params
func (o *VvolBindingGetParams) WithContext(ctx context.Context) *VvolBindingGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the vvol binding get params
func (o *VvolBindingGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the vvol binding get params
func (o *VvolBindingGetParams) WithHTTPClient(client *http.Client) *VvolBindingGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the vvol binding get params
func (o *VvolBindingGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the vvol binding get params
func (o *VvolBindingGetParams) WithFields(fields []string) *VvolBindingGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the vvol binding get params
func (o *VvolBindingGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithProtocolEndpointUUID adds the protocolEndpointUUID to the vvol binding get params
func (o *VvolBindingGetParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingGetParams {
o.SetProtocolEndpointUUID(protocolEndpointUUID)
return o
}
// SetProtocolEndpointUUID adds the protocolEndpointUuid to the vvol binding get params
func (o *VvolBindingGetParams) SetProtocolEndpointUUID(protocolEndpointUUID string) {
o.ProtocolEndpointUUID = protocolEndpointUUID
}
// WithVvolUUID adds the vvolUUID to the vvol binding get params
func (o *VvolBindingGetParams) WithVvolUUID(vvolUUID string) *VvolBindingGetParams {
o.SetVvolUUID(vvolUUID)
return o
}
// SetVvolUUID adds the vvolUuid to the vvol binding get params
func (o *VvolBindingGetParams) SetVvolUUID(vvolUUID string) {
o.VvolUUID = vvolUUID
}
// WriteToRequest writes these params to a swagger request
func (o *VvolBindingGetParams) 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 protocol_endpoint.uuid
if err := r.SetPathParam("protocol_endpoint.uuid", o.ProtocolEndpointUUID); err != nil {
return err
}
// path param vvol.uuid
if err := r.SetPathParam("vvol.uuid", o.VvolUUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamVvolBindingGet binds the parameter fields
func (o *VvolBindingGetParams) 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/s_a_n/wwpn_alias_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewWwpnAliasDeleteParams creates a new WwpnAliasDeleteParams 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 NewWwpnAliasDeleteParams() *WwpnAliasDeleteParams {
return &WwpnAliasDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewWwpnAliasDeleteParamsWithTimeout creates a new WwpnAliasDeleteParams object
// with the ability to set a timeout on a request.
func NewWwpnAliasDeleteParamsWithTimeout(timeout time.Duration) *WwpnAliasDeleteParams {
return &WwpnAliasDeleteParams{
timeout: timeout,
}
}
// NewWwpnAliasDeleteParamsWithContext creates a new WwpnAliasDeleteParams object
// with the ability to set a context for a request.
func NewWwpnAliasDeleteParamsWithContext(ctx context.Context) *WwpnAliasDeleteParams {
return &WwpnAliasDeleteParams{
Context: ctx,
}
}
// NewWwpnAliasDeleteParamsWithHTTPClient creates a new WwpnAliasDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewWwpnAliasDeleteParamsWithHTTPClient(client *http.Client) *WwpnAliasDeleteParams {
return &WwpnAliasDeleteParams{
HTTPClient: client,
}
}
/*
WwpnAliasDeleteParams contains all the parameters to send to the API endpoint
for the wwpn alias delete operation.
Typically these are written to a http.Request.
*/
type WwpnAliasDeleteParams struct {
/* Alias.
The name of FC WWPN alias.
*/
Alias string
/* SvmUUID.
The unique identifier of the SVM.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the wwpn alias delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasDeleteParams) WithDefaults() *WwpnAliasDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the wwpn alias delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) WithTimeout(timeout time.Duration) *WwpnAliasDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) WithContext(ctx context.Context) *WwpnAliasDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) WithHTTPClient(client *http.Client) *WwpnAliasDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAlias adds the alias to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) WithAlias(alias string) *WwpnAliasDeleteParams {
o.SetAlias(alias)
return o
}
// SetAlias adds the alias to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) SetAlias(alias string) {
o.Alias = alias
}
// WithSvmUUID adds the svmUUID to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) WithSvmUUID(svmUUID string) *WwpnAliasDeleteParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the wwpn alias delete params
func (o *WwpnAliasDeleteParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *WwpnAliasDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param alias
if err := r.SetPathParam("alias", o.Alias); 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/s_a_n/igroup_nested_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupNestedDeleteReader is a Reader for the IgroupNestedDelete structure.
type IgroupNestedDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupNestedDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupNestedDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupNestedDeleteDefault(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
}
}
// NewIgroupNestedDeleteOK creates a IgroupNestedDeleteOK with default headers values
func NewIgroupNestedDeleteOK() *IgroupNestedDeleteOK {
return &IgroupNestedDeleteOK{}
}
/*
IgroupNestedDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IgroupNestedDeleteOK struct {
}
// IsSuccess returns true when this igroup nested delete o k response has a 2xx status code
func (o *IgroupNestedDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup nested delete o k response has a 3xx status code
func (o *IgroupNestedDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup nested delete o k response has a 4xx status code
func (o *IgroupNestedDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup nested delete o k response has a 5xx status code
func (o *IgroupNestedDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup nested delete o k response a status code equal to that given
func (o *IgroupNestedDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupNestedDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroupNestedDeleteOK ", 200)
}
func (o *IgroupNestedDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroupNestedDeleteOK ", 200)
}
func (o *IgroupNestedDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIgroupNestedDeleteDefault creates a IgroupNestedDeleteDefault with default headers values
func NewIgroupNestedDeleteDefault(code int) *IgroupNestedDeleteDefault {
return &IgroupNestedDeleteDefault{
_statusCode: code,
}
}
/*
IgroupNestedDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254213 | The initiator group is mapped to one or more LUNs and `allow_delete_while_mapped` has not been specified. |
| 5374738 | The child initiator group is not owned by the parent initiator group. |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupNestedDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup nested delete default response
func (o *IgroupNestedDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup nested delete default response has a 2xx status code
func (o *IgroupNestedDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup nested delete default response has a 3xx status code
func (o *IgroupNestedDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup nested delete default response has a 4xx status code
func (o *IgroupNestedDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup nested delete default response has a 5xx status code
func (o *IgroupNestedDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup nested delete default response a status code equal to that given
func (o *IgroupNestedDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupNestedDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroup_nested_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroup_nested_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupNestedDeleteDefault) 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/s_a_n/lun_attribute_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunAttributeDeleteReader is a Reader for the LunAttributeDelete structure.
type LunAttributeDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunAttributeDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunAttributeDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunAttributeDeleteDefault(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
}
}
// NewLunAttributeDeleteOK creates a LunAttributeDeleteOK with default headers values
func NewLunAttributeDeleteOK() *LunAttributeDeleteOK {
return &LunAttributeDeleteOK{}
}
/*
LunAttributeDeleteOK describes a response with status code 200, with default header values.
OK
*/
type LunAttributeDeleteOK struct {
}
// IsSuccess returns true when this lun attribute delete o k response has a 2xx status code
func (o *LunAttributeDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun attribute delete o k response has a 3xx status code
func (o *LunAttributeDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun attribute delete o k response has a 4xx status code
func (o *LunAttributeDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun attribute delete o k response has a 5xx status code
func (o *LunAttributeDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun attribute delete o k response a status code equal to that given
func (o *LunAttributeDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *LunAttributeDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeDeleteOK ", 200)
}
func (o *LunAttributeDeleteOK) String() string {
return fmt.Sprintf("[DELETE /storage/luns/{lun.uuid}/attributes/{name}][%d] lunAttributeDeleteOK ", 200)
}
func (o *LunAttributeDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewLunAttributeDeleteDefault creates a LunAttributeDeleteDefault with default headers values
func NewLunAttributeDeleteDefault(code int) *LunAttributeDeleteDefault {
return &LunAttributeDeleteDefault{
_statusCode: code,
}
}
/*
LunAttributeDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN was not found. |
| 5374931 | The specified attribute was not found. |
*/
type LunAttributeDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun attribute delete default response
func (o *LunAttributeDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun attribute delete default response has a 2xx status code
func (o *LunAttributeDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun attribute delete default response has a 3xx status code
func (o *LunAttributeDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun attribute delete default response has a 4xx status code
func (o *LunAttributeDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun attribute delete default response has a 5xx status code
func (o *LunAttributeDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun attribute delete default response a status code equal to that given
func (o *LunAttributeDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunAttributeDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /storage/luns/{lun.uuid}/attributes/{name}][%d] lun_attribute_delete default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunAttributeDeleteDefault) 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/s_a_n/fc_login_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fc_login_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcLoginCollectionGetParams creates a new FcLoginCollectionGetParams 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 NewFcLoginCollectionGetParams() *FcLoginCollectionGetParams {
return &FcLoginCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcLoginCollectionGetParamsWithTimeout creates a new FcLoginCollectionGetParams object
// with the ability to set a timeout on a request.
func NewFcLoginCollectionGetParamsWithTimeout(timeout time.Duration) *FcLoginCollectionGetParams {
return &FcLoginCollectionGetParams{
timeout: timeout,
}
}
// NewFcLoginCollectionGetParamsWithContext creates a new FcLoginCollectionGetParams object
// with the ability to set a context for a request.
func NewFcLoginCollectionGetParamsWithContext(ctx context.Context) *FcLoginCollectionGetParams {
return &FcLoginCollectionGetParams{
Context: ctx,
}
}
// NewFcLoginCollectionGetParamsWithHTTPClient creates a new FcLoginCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcLoginCollectionGetParamsWithHTTPClient(client *http.Client) *FcLoginCollectionGetParams {
return &FcLoginCollectionGetParams{
HTTPClient: client,
}
}
/*
FcLoginCollectionGetParams contains all the parameters to send to the API endpoint
for the fc login collection get operation.
Typically these are written to a http.Request.
*/
type FcLoginCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupsName.
Filter by igroups.name
*/
IgroupsName *string
/* IgroupsUUID.
Filter by igroups.uuid
*/
IgroupsUUID *string
/* InitiatorAliases.
Filter by initiator.aliases
*/
InitiatorAliases *string
/* InitiatorComment.
Filter by initiator.comment
*/
InitiatorComment *string
/* InitiatorPortAddress.
Filter by initiator.port_address
*/
InitiatorPortAddress *string
/* InitiatorWwnn.
Filter by initiator.wwnn
*/
InitiatorWwnn *string
/* InitiatorWwpn.
Filter by initiator.wwpn
*/
InitiatorWwpn *string
/* InterfaceName.
Filter by interface.name
*/
InterfaceName *string
/* InterfaceUUID.
Filter by interface.uuid
*/
InterfaceUUID *string
/* InterfaceWwpn.
Filter by interface.wwpn
*/
InterfaceWwpn *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
/* Protocol.
Filter by protocol
*/
Protocol *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 fc login collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcLoginCollectionGetParams) WithDefaults() *FcLoginCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc login collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcLoginCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FcLoginCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithTimeout(timeout time.Duration) *FcLoginCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithContext(ctx context.Context) *FcLoginCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithHTTPClient(client *http.Client) *FcLoginCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithFields(fields []string) *FcLoginCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupsName adds the igroupsName to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithIgroupsName(igroupsName *string) *FcLoginCollectionGetParams {
o.SetIgroupsName(igroupsName)
return o
}
// SetIgroupsName adds the igroupsName to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetIgroupsName(igroupsName *string) {
o.IgroupsName = igroupsName
}
// WithIgroupsUUID adds the igroupsUUID to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithIgroupsUUID(igroupsUUID *string) *FcLoginCollectionGetParams {
o.SetIgroupsUUID(igroupsUUID)
return o
}
// SetIgroupsUUID adds the igroupsUuid to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetIgroupsUUID(igroupsUUID *string) {
o.IgroupsUUID = igroupsUUID
}
// WithInitiatorAliases adds the initiatorAliases to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInitiatorAliases(initiatorAliases *string) *FcLoginCollectionGetParams {
o.SetInitiatorAliases(initiatorAliases)
return o
}
// SetInitiatorAliases adds the initiatorAliases to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInitiatorAliases(initiatorAliases *string) {
o.InitiatorAliases = initiatorAliases
}
// WithInitiatorComment adds the initiatorComment to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInitiatorComment(initiatorComment *string) *FcLoginCollectionGetParams {
o.SetInitiatorComment(initiatorComment)
return o
}
// SetInitiatorComment adds the initiatorComment to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInitiatorComment(initiatorComment *string) {
o.InitiatorComment = initiatorComment
}
// WithInitiatorPortAddress adds the initiatorPortAddress to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInitiatorPortAddress(initiatorPortAddress *string) *FcLoginCollectionGetParams {
o.SetInitiatorPortAddress(initiatorPortAddress)
return o
}
// SetInitiatorPortAddress adds the initiatorPortAddress to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInitiatorPortAddress(initiatorPortAddress *string) {
o.InitiatorPortAddress = initiatorPortAddress
}
// WithInitiatorWwnn adds the initiatorWwnn to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInitiatorWwnn(initiatorWwnn *string) *FcLoginCollectionGetParams {
o.SetInitiatorWwnn(initiatorWwnn)
return o
}
// SetInitiatorWwnn adds the initiatorWwnn to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInitiatorWwnn(initiatorWwnn *string) {
o.InitiatorWwnn = initiatorWwnn
}
// WithInitiatorWwpn adds the initiatorWwpn to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInitiatorWwpn(initiatorWwpn *string) *FcLoginCollectionGetParams {
o.SetInitiatorWwpn(initiatorWwpn)
return o
}
// SetInitiatorWwpn adds the initiatorWwpn to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInitiatorWwpn(initiatorWwpn *string) {
o.InitiatorWwpn = initiatorWwpn
}
// WithInterfaceName adds the interfaceName to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInterfaceName(interfaceName *string) *FcLoginCollectionGetParams {
o.SetInterfaceName(interfaceName)
return o
}
// SetInterfaceName adds the interfaceName to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInterfaceName(interfaceName *string) {
o.InterfaceName = interfaceName
}
// WithInterfaceUUID adds the interfaceUUID to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInterfaceUUID(interfaceUUID *string) *FcLoginCollectionGetParams {
o.SetInterfaceUUID(interfaceUUID)
return o
}
// SetInterfaceUUID adds the interfaceUuid to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInterfaceUUID(interfaceUUID *string) {
o.InterfaceUUID = interfaceUUID
}
// WithInterfaceWwpn adds the interfaceWwpn to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithInterfaceWwpn(interfaceWwpn *string) *FcLoginCollectionGetParams {
o.SetInterfaceWwpn(interfaceWwpn)
return o
}
// SetInterfaceWwpn adds the interfaceWwpn to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetInterfaceWwpn(interfaceWwpn *string) {
o.InterfaceWwpn = interfaceWwpn
}
// WithMaxRecords adds the maxRecords to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithMaxRecords(maxRecords *int64) *FcLoginCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithOrderBy(orderBy []string) *FcLoginCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithProtocol adds the protocol to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithProtocol(protocol *string) *FcLoginCollectionGetParams {
o.SetProtocol(protocol)
return o
}
// SetProtocol adds the protocol to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetProtocol(protocol *string) {
o.Protocol = protocol
}
// WithReturnRecords adds the returnRecords to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithReturnRecords(returnRecords *bool) *FcLoginCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *FcLoginCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithSvmName(svmName *string) *FcLoginCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the fc login collection get params
func (o *FcLoginCollectionGetParams) WithSvmUUID(svmUUID *string) *FcLoginCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the fc login collection get params
func (o *FcLoginCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *FcLoginCollectionGetParams) 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.IgroupsName != nil {
// query param igroups.name
var qrIgroupsName string
if o.IgroupsName != nil {
qrIgroupsName = *o.IgroupsName
}
qIgroupsName := qrIgroupsName
if qIgroupsName != "" {
if err := r.SetQueryParam("igroups.name", qIgroupsName); err != nil {
return err
}
}
}
if o.IgroupsUUID != nil {
// query param igroups.uuid
var qrIgroupsUUID string
if o.IgroupsUUID != nil {
qrIgroupsUUID = *o.IgroupsUUID
}
qIgroupsUUID := qrIgroupsUUID
if qIgroupsUUID != "" {
if err := r.SetQueryParam("igroups.uuid", qIgroupsUUID); err != nil {
return err
}
}
}
if o.InitiatorAliases != nil {
// query param initiator.aliases
var qrInitiatorAliases string
if o.InitiatorAliases != nil {
qrInitiatorAliases = *o.InitiatorAliases
}
qInitiatorAliases := qrInitiatorAliases
if qInitiatorAliases != "" {
if err := r.SetQueryParam("initiator.aliases", qInitiatorAliases); err != nil {
return err
}
}
}
if o.InitiatorComment != nil {
// query param initiator.comment
var qrInitiatorComment string
if o.InitiatorComment != nil {
qrInitiatorComment = *o.InitiatorComment
}
qInitiatorComment := qrInitiatorComment
if qInitiatorComment != "" {
if err := r.SetQueryParam("initiator.comment", qInitiatorComment); err != nil {
return err
}
}
}
if o.InitiatorPortAddress != nil {
// query param initiator.port_address
var qrInitiatorPortAddress string
if o.InitiatorPortAddress != nil {
qrInitiatorPortAddress = *o.InitiatorPortAddress
}
qInitiatorPortAddress := qrInitiatorPortAddress
if qInitiatorPortAddress != "" {
if err := r.SetQueryParam("initiator.port_address", qInitiatorPortAddress); err != nil {
return err
}
}
}
if o.InitiatorWwnn != nil {
// query param initiator.wwnn
var qrInitiatorWwnn string
if o.InitiatorWwnn != nil {
qrInitiatorWwnn = *o.InitiatorWwnn
}
qInitiatorWwnn := qrInitiatorWwnn
if qInitiatorWwnn != "" {
if err := r.SetQueryParam("initiator.wwnn", qInitiatorWwnn); err != nil {
return err
}
}
}
if o.InitiatorWwpn != nil {
// query param initiator.wwpn
var qrInitiatorWwpn string
if o.InitiatorWwpn != nil {
qrInitiatorWwpn = *o.InitiatorWwpn
}
qInitiatorWwpn := qrInitiatorWwpn
if qInitiatorWwpn != "" {
if err := r.SetQueryParam("initiator.wwpn", qInitiatorWwpn); err != nil {
return err
}
}
}
if o.InterfaceName != nil {
// query param interface.name
var qrInterfaceName string
if o.InterfaceName != nil {
qrInterfaceName = *o.InterfaceName
}
qInterfaceName := qrInterfaceName
if qInterfaceName != "" {
if err := r.SetQueryParam("interface.name", qInterfaceName); err != nil {
return err
}
}
}
if o.InterfaceUUID != nil {
// query param interface.uuid
var qrInterfaceUUID string
if o.InterfaceUUID != nil {
qrInterfaceUUID = *o.InterfaceUUID
}
qInterfaceUUID := qrInterfaceUUID
if qInterfaceUUID != "" {
if err := r.SetQueryParam("interface.uuid", qInterfaceUUID); err != nil {
return err
}
}
}
if o.InterfaceWwpn != nil {
// query param interface.wwpn
var qrInterfaceWwpn string
if o.InterfaceWwpn != nil {
qrInterfaceWwpn = *o.InterfaceWwpn
}
qInterfaceWwpn := qrInterfaceWwpn
if qInterfaceWwpn != "" {
if err := r.SetQueryParam("interface.wwpn", qInterfaceWwpn); 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.Protocol != nil {
// query param protocol
var qrProtocol string
if o.Protocol != nil {
qrProtocol = *o.Protocol
}
qProtocol := qrProtocol
if qProtocol != "" {
if err := r.SetQueryParam("protocol", qProtocol); 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
}
// bindParamFcLoginCollectionGet binds the parameter fields
func (o *FcLoginCollectionGetParams) 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
}
// bindParamFcLoginCollectionGet binds the parameter order_by
func (o *FcLoginCollectionGetParams) 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/s_a_n/portset_interface_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// PortsetInterfaceGetReader is a Reader for the PortsetInterfaceGet structure.
type PortsetInterfaceGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetInterfaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPortsetInterfaceGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetInterfaceGetDefault(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
}
}
// NewPortsetInterfaceGetOK creates a PortsetInterfaceGetOK with default headers values
func NewPortsetInterfaceGetOK() *PortsetInterfaceGetOK {
return &PortsetInterfaceGetOK{}
}
/*
PortsetInterfaceGetOK describes a response with status code 200, with default header values.
OK
*/
type PortsetInterfaceGetOK struct {
Payload *models.PortsetInterface
}
// IsSuccess returns true when this portset interface get o k response has a 2xx status code
func (o *PortsetInterfaceGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset interface get o k response has a 3xx status code
func (o *PortsetInterfaceGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset interface get o k response has a 4xx status code
func (o *PortsetInterfaceGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this portset interface get o k response has a 5xx status code
func (o *PortsetInterfaceGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this portset interface get o k response a status code equal to that given
func (o *PortsetInterfaceGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PortsetInterfaceGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portsetInterfaceGetOK %+v", 200, o.Payload)
}
func (o *PortsetInterfaceGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portsetInterfaceGetOK %+v", 200, o.Payload)
}
func (o *PortsetInterfaceGetOK) GetPayload() *models.PortsetInterface {
return o.Payload
}
func (o *PortsetInterfaceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PortsetInterface)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPortsetInterfaceGetDefault creates a PortsetInterfaceGetDefault with default headers values
func NewPortsetInterfaceGetDefault(code int) *PortsetInterfaceGetDefault {
return &PortsetInterfaceGetDefault{
_statusCode: code,
}
}
/*
PortsetInterfaceGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4 | The interface is not a member of the portset. |
| 5374908 | The portset specified in the URI does not exist. |
*/
type PortsetInterfaceGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset interface get default response
func (o *PortsetInterfaceGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset interface get default response has a 2xx status code
func (o *PortsetInterfaceGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset interface get default response has a 3xx status code
func (o *PortsetInterfaceGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset interface get default response has a 4xx status code
func (o *PortsetInterfaceGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset interface get default response has a 5xx status code
func (o *PortsetInterfaceGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset interface get default response a status code equal to that given
func (o *PortsetInterfaceGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetInterfaceGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portset_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portset_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetInterfaceGetDefault) 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/s_a_n/iscsi_collection_performance_metrics_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_collection_performance_metrics_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiCollectionPerformanceMetricsGetReader is a Reader for the IscsiCollectionPerformanceMetricsGet structure.
type IscsiCollectionPerformanceMetricsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiCollectionPerformanceMetricsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiCollectionPerformanceMetricsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiCollectionPerformanceMetricsGetDefault(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
}
}
// NewIscsiCollectionPerformanceMetricsGetOK creates a IscsiCollectionPerformanceMetricsGetOK with default headers values
func NewIscsiCollectionPerformanceMetricsGetOK() *IscsiCollectionPerformanceMetricsGetOK {
return &IscsiCollectionPerformanceMetricsGetOK{}
}
/*
IscsiCollectionPerformanceMetricsGetOK describes a response with status code 200, with default header values.
OK
*/
type IscsiCollectionPerformanceMetricsGetOK struct {
Payload *models.PerformanceIscsiMetricResponse
}
// IsSuccess returns true when this iscsi collection performance metrics get o k response has a 2xx status code
func (o *IscsiCollectionPerformanceMetricsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi collection performance metrics get o k response has a 3xx status code
func (o *IscsiCollectionPerformanceMetricsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi collection performance metrics get o k response has a 4xx status code
func (o *IscsiCollectionPerformanceMetricsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi collection performance metrics get o k response has a 5xx status code
func (o *IscsiCollectionPerformanceMetricsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi collection performance metrics get o k response a status code equal to that given
func (o *IscsiCollectionPerformanceMetricsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiCollectionPerformanceMetricsGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}/metrics][%d] iscsiCollectionPerformanceMetricsGetOK %+v", 200, o.Payload)
}
func (o *IscsiCollectionPerformanceMetricsGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}/metrics][%d] iscsiCollectionPerformanceMetricsGetOK %+v", 200, o.Payload)
}
func (o *IscsiCollectionPerformanceMetricsGetOK) GetPayload() *models.PerformanceIscsiMetricResponse {
return o.Payload
}
func (o *IscsiCollectionPerformanceMetricsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PerformanceIscsiMetricResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIscsiCollectionPerformanceMetricsGetDefault creates a IscsiCollectionPerformanceMetricsGetDefault with default headers values
func NewIscsiCollectionPerformanceMetricsGetDefault(code int) *IscsiCollectionPerformanceMetricsGetDefault {
return &IscsiCollectionPerformanceMetricsGetDefault{
_statusCode: code,
}
}
/*
IscsiCollectionPerformanceMetricsGetDefault describes a response with status code -1, with default header values.
Error
*/
type IscsiCollectionPerformanceMetricsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi collection performance metrics get default response
func (o *IscsiCollectionPerformanceMetricsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi collection performance metrics get default response has a 2xx status code
func (o *IscsiCollectionPerformanceMetricsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi collection performance metrics get default response has a 3xx status code
func (o *IscsiCollectionPerformanceMetricsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi collection performance metrics get default response has a 4xx status code
func (o *IscsiCollectionPerformanceMetricsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi collection performance metrics get default response has a 5xx status code
func (o *IscsiCollectionPerformanceMetricsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi collection performance metrics get default response a status code equal to that given
func (o *IscsiCollectionPerformanceMetricsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiCollectionPerformanceMetricsGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}/metrics][%d] iscsi_collection_performance_metrics_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCollectionPerformanceMetricsGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/iscsi/services/{svm.uuid}/metrics][%d] iscsi_collection_performance_metrics_get default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCollectionPerformanceMetricsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiCollectionPerformanceMetricsGetDefault) 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/s_a_n/wwpn_alias_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewWwpnAliasCollectionGetParams creates a new WwpnAliasCollectionGetParams 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 NewWwpnAliasCollectionGetParams() *WwpnAliasCollectionGetParams {
return &WwpnAliasCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewWwpnAliasCollectionGetParamsWithTimeout creates a new WwpnAliasCollectionGetParams object
// with the ability to set a timeout on a request.
func NewWwpnAliasCollectionGetParamsWithTimeout(timeout time.Duration) *WwpnAliasCollectionGetParams {
return &WwpnAliasCollectionGetParams{
timeout: timeout,
}
}
// NewWwpnAliasCollectionGetParamsWithContext creates a new WwpnAliasCollectionGetParams object
// with the ability to set a context for a request.
func NewWwpnAliasCollectionGetParamsWithContext(ctx context.Context) *WwpnAliasCollectionGetParams {
return &WwpnAliasCollectionGetParams{
Context: ctx,
}
}
// NewWwpnAliasCollectionGetParamsWithHTTPClient creates a new WwpnAliasCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewWwpnAliasCollectionGetParamsWithHTTPClient(client *http.Client) *WwpnAliasCollectionGetParams {
return &WwpnAliasCollectionGetParams{
HTTPClient: client,
}
}
/*
WwpnAliasCollectionGetParams contains all the parameters to send to the API endpoint
for the wwpn alias collection get operation.
Typically these are written to a http.Request.
*/
type WwpnAliasCollectionGetParams struct {
/* Alias.
Filter by alias
*/
Alias *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
/* Wwpn.
Filter by wwpn
*/
Wwpn *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the wwpn alias collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasCollectionGetParams) WithDefaults() *WwpnAliasCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the wwpn alias collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := WwpnAliasCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithTimeout(timeout time.Duration) *WwpnAliasCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithContext(ctx context.Context) *WwpnAliasCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithHTTPClient(client *http.Client) *WwpnAliasCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAlias adds the alias to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithAlias(alias *string) *WwpnAliasCollectionGetParams {
o.SetAlias(alias)
return o
}
// SetAlias adds the alias to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetAlias(alias *string) {
o.Alias = alias
}
// WithFields adds the fields to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithFields(fields []string) *WwpnAliasCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithMaxRecords(maxRecords *int64) *WwpnAliasCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithOrderBy(orderBy []string) *WwpnAliasCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithReturnRecords(returnRecords *bool) *WwpnAliasCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *WwpnAliasCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithSvmName(svmName *string) *WwpnAliasCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithSvmUUID(svmUUID *string) *WwpnAliasCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithWwpn adds the wwpn to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) WithWwpn(wwpn *string) *WwpnAliasCollectionGetParams {
o.SetWwpn(wwpn)
return o
}
// SetWwpn adds the wwpn to the wwpn alias collection get params
func (o *WwpnAliasCollectionGetParams) SetWwpn(wwpn *string) {
o.Wwpn = wwpn
}
// WriteToRequest writes these params to a swagger request
func (o *WwpnAliasCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Alias != nil {
// query param alias
var qrAlias string
if o.Alias != nil {
qrAlias = *o.Alias
}
qAlias := qrAlias
if qAlias != "" {
if err := r.SetQueryParam("alias", qAlias); 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 o.Wwpn != nil {
// query param wwpn
var qrWwpn string
if o.Wwpn != nil {
qrWwpn = *o.Wwpn
}
qWwpn := qrWwpn
if qWwpn != "" {
if err := r.SetQueryParam("wwpn", qWwpn); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamWwpnAliasCollectionGet binds the parameter fields
func (o *WwpnAliasCollectionGetParams) 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
}
// bindParamWwpnAliasCollectionGet binds the parameter order_by
func (o *WwpnAliasCollectionGetParams) 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/s_a_n/lun_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunGetParams creates a new LunGetParams 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 NewLunGetParams() *LunGetParams {
return &LunGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunGetParamsWithTimeout creates a new LunGetParams object
// with the ability to set a timeout on a request.
func NewLunGetParamsWithTimeout(timeout time.Duration) *LunGetParams {
return &LunGetParams{
timeout: timeout,
}
}
// NewLunGetParamsWithContext creates a new LunGetParams object
// with the ability to set a context for a request.
func NewLunGetParamsWithContext(ctx context.Context) *LunGetParams {
return &LunGetParams{
Context: ctx,
}
}
// NewLunGetParamsWithHTTPClient creates a new LunGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunGetParamsWithHTTPClient(client *http.Client) *LunGetParams {
return &LunGetParams{
HTTPClient: client,
}
}
/*
LunGetParams contains all the parameters to send to the API endpoint
for the lun get operation.
Typically these are written to a http.Request.
*/
type LunGetParams struct {
/* DataOffset.
The offset, in bytes, at which to begin reading LUN data.<br/>
LUN data read requests are distinguished by the header entry `Accept: multipart/form-data`. When this header entry is provided, query parameters `data.offset` and `data.size` are required and used to specify the portion of the LUN's data to read; no other query parameters are allowed. Reads are limited to one megabyte (1MB) per request. Data is returned as `multipart/form-data` content with exactly one form entry containing the data. The form entry has content type `application/octet-stream`.
Format: int64
*/
DataOffset *int64
/* DataSize.
The size, in bytes, of LUN data to read.<br/>
LUN data read requests are distinguished by the header entry `Accept: multipart/form-data`. When this header entry is provided, query parameters `data.offset` and `data.size` are required and used to specify the portion of the LUN's data to read; no other query parameters are allowed. Reads are limited to one megabyte (1MB) per request. Data is returned as `multipart/form-data` content with exactly one form entry containing the data. The form entry has content type `application/octet-stream`.
Format: int64
*/
DataSize *int64
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
The unique identifier of the LUN to retrieve.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunGetParams) WithDefaults() *LunGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun get params
func (o *LunGetParams) WithTimeout(timeout time.Duration) *LunGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun get params
func (o *LunGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun get params
func (o *LunGetParams) WithContext(ctx context.Context) *LunGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun get params
func (o *LunGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun get params
func (o *LunGetParams) WithHTTPClient(client *http.Client) *LunGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun get params
func (o *LunGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDataOffset adds the dataOffset to the lun get params
func (o *LunGetParams) WithDataOffset(dataOffset *int64) *LunGetParams {
o.SetDataOffset(dataOffset)
return o
}
// SetDataOffset adds the dataOffset to the lun get params
func (o *LunGetParams) SetDataOffset(dataOffset *int64) {
o.DataOffset = dataOffset
}
// WithDataSize adds the dataSize to the lun get params
func (o *LunGetParams) WithDataSize(dataSize *int64) *LunGetParams {
o.SetDataSize(dataSize)
return o
}
// SetDataSize adds the dataSize to the lun get params
func (o *LunGetParams) SetDataSize(dataSize *int64) {
o.DataSize = dataSize
}
// WithFields adds the fields to the lun get params
func (o *LunGetParams) WithFields(fields []string) *LunGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun get params
func (o *LunGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the lun get params
func (o *LunGetParams) WithUUID(uuid string) *LunGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the lun get params
func (o *LunGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LunGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DataOffset != nil {
// query param data.offset
var qrDataOffset int64
if o.DataOffset != nil {
qrDataOffset = *o.DataOffset
}
qDataOffset := swag.FormatInt64(qrDataOffset)
if qDataOffset != "" {
if err := r.SetQueryParam("data.offset", qDataOffset); err != nil {
return err
}
}
}
if o.DataSize != nil {
// query param data.size
var qrDataSize int64
if o.DataSize != nil {
qrDataSize = *o.DataSize
}
qDataSize := swag.FormatInt64(qrDataSize)
if qDataSize != "" {
if err := r.SetQueryParam("data.size", qDataSize); 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
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamLunGet binds the parameter fields
func (o *LunGetParams) 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/s_a_n/lun_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunCollectionGetParams creates a new LunCollectionGetParams 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 NewLunCollectionGetParams() *LunCollectionGetParams {
return &LunCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunCollectionGetParamsWithTimeout creates a new LunCollectionGetParams object
// with the ability to set a timeout on a request.
func NewLunCollectionGetParamsWithTimeout(timeout time.Duration) *LunCollectionGetParams {
return &LunCollectionGetParams{
timeout: timeout,
}
}
// NewLunCollectionGetParamsWithContext creates a new LunCollectionGetParams object
// with the ability to set a context for a request.
func NewLunCollectionGetParamsWithContext(ctx context.Context) *LunCollectionGetParams {
return &LunCollectionGetParams{
Context: ctx,
}
}
// NewLunCollectionGetParamsWithHTTPClient creates a new LunCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunCollectionGetParamsWithHTTPClient(client *http.Client) *LunCollectionGetParams {
return &LunCollectionGetParams{
HTTPClient: client,
}
}
/*
LunCollectionGetParams contains all the parameters to send to the API endpoint
for the lun collection get operation.
Typically these are written to a http.Request.
*/
type LunCollectionGetParams struct {
/* AttributesName.
Filter by attributes.name
*/
AttributesName *string
/* AttributesValue.
Filter by attributes.value
*/
AttributesValue *string
/* AutoDelete.
Filter by auto_delete
*/
AutoDelete *bool
/* Class.
Filter by class
*/
Class *string
/* Comment.
Filter by comment
*/
Comment *string
/* ConsistencyGroupName.
Filter by consistency_group.name
*/
ConsistencyGroupName *string
/* ConsistencyGroupUUID.
Filter by consistency_group.uuid
*/
ConsistencyGroupUUID *string
/* CopyDestinationsMaxThroughput.
Filter by copy.destinations.max_throughput
*/
CopyDestinationsMaxThroughput *int64
/* CopyDestinationsName.
Filter by copy.destinations.name
*/
CopyDestinationsName *string
/* CopyDestinationsProgressElapsed.
Filter by copy.destinations.progress.elapsed
*/
CopyDestinationsProgressElapsed *int64
/* CopyDestinationsProgressFailureArgumentsCode.
Filter by copy.destinations.progress.failure.arguments.code
*/
CopyDestinationsProgressFailureArgumentsCode *string
/* CopyDestinationsProgressFailureArgumentsMessage.
Filter by copy.destinations.progress.failure.arguments.message
*/
CopyDestinationsProgressFailureArgumentsMessage *string
/* CopyDestinationsProgressFailureCode.
Filter by copy.destinations.progress.failure.code
*/
CopyDestinationsProgressFailureCode *string
/* CopyDestinationsProgressFailureMessage.
Filter by copy.destinations.progress.failure.message
*/
CopyDestinationsProgressFailureMessage *string
/* CopyDestinationsProgressFailureTarget.
Filter by copy.destinations.progress.failure.target
*/
CopyDestinationsProgressFailureTarget *string
/* CopyDestinationsProgressPercentComplete.
Filter by copy.destinations.progress.percent_complete
*/
CopyDestinationsProgressPercentComplete *int64
/* CopyDestinationsProgressState.
Filter by copy.destinations.progress.state
*/
CopyDestinationsProgressState *string
/* CopyDestinationsProgressVolumeSnapshotBlocked.
Filter by copy.destinations.progress.volume_snapshot_blocked
*/
CopyDestinationsProgressVolumeSnapshotBlocked *bool
/* CopyDestinationsUUID.
Filter by copy.destinations.uuid
*/
CopyDestinationsUUID *string
/* CopySourceMaxThroughput.
Filter by copy.source.max_throughput
*/
CopySourceMaxThroughput *int64
/* CopySourceName.
Filter by copy.source.name
*/
CopySourceName *string
/* CopySourceProgressElapsed.
Filter by copy.source.progress.elapsed
*/
CopySourceProgressElapsed *int64
/* CopySourceProgressFailureArgumentsCode.
Filter by copy.source.progress.failure.arguments.code
*/
CopySourceProgressFailureArgumentsCode *string
/* CopySourceProgressFailureArgumentsMessage.
Filter by copy.source.progress.failure.arguments.message
*/
CopySourceProgressFailureArgumentsMessage *string
/* CopySourceProgressFailureCode.
Filter by copy.source.progress.failure.code
*/
CopySourceProgressFailureCode *string
/* CopySourceProgressFailureMessage.
Filter by copy.source.progress.failure.message
*/
CopySourceProgressFailureMessage *string
/* CopySourceProgressFailureTarget.
Filter by copy.source.progress.failure.target
*/
CopySourceProgressFailureTarget *string
/* CopySourceProgressPercentComplete.
Filter by copy.source.progress.percent_complete
*/
CopySourceProgressPercentComplete *int64
/* CopySourceProgressState.
Filter by copy.source.progress.state
*/
CopySourceProgressState *string
/* CopySourceProgressVolumeSnapshotBlocked.
Filter by copy.source.progress.volume_snapshot_blocked
*/
CopySourceProgressVolumeSnapshotBlocked *bool
/* CopySourceUUID.
Filter by copy.source.uuid
*/
CopySourceUUID *string
/* CreateTime.
Filter by create_time
*/
CreateTime *string
/* Enabled.
Filter by enabled
*/
Enabled *bool
/* Fields.
Specify the fields to return.
*/
Fields []string
/* LocationLogicalUnit.
Filter by location.logical_unit
*/
LocationLogicalUnit *string
/* LocationNodeName.
Filter by location.node.name
*/
LocationNodeName *string
/* LocationNodeUUID.
Filter by location.node.uuid
*/
LocationNodeUUID *string
/* LocationQtreeID.
Filter by location.qtree.id
*/
LocationQtreeID *int64
/* LocationQtreeName.
Filter by location.qtree.name
*/
LocationQtreeName *string
/* LocationVolumeName.
Filter by location.volume.name
*/
LocationVolumeName *string
/* LocationVolumeUUID.
Filter by location.volume.uuid
*/
LocationVolumeUUID *string
/* LunMapsIgroupName.
Filter by lun_maps.igroup.name
*/
LunMapsIgroupName *string
/* LunMapsIgroupUUID.
Filter by lun_maps.igroup.uuid
*/
LunMapsIgroupUUID *string
/* LunMapsLogicalUnitNumber.
Filter by lun_maps.logical_unit_number
*/
LunMapsLogicalUnitNumber *int64
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* MetricDuration.
Filter by metric.duration
*/
MetricDuration *string
/* MetricIopsOther.
Filter by metric.iops.other
*/
MetricIopsOther *int64
/* MetricIopsRead.
Filter by metric.iops.read
*/
MetricIopsRead *int64
/* MetricIopsTotal.
Filter by metric.iops.total
*/
MetricIopsTotal *int64
/* MetricIopsWrite.
Filter by metric.iops.write
*/
MetricIopsWrite *int64
/* MetricLatencyOther.
Filter by metric.latency.other
*/
MetricLatencyOther *int64
/* MetricLatencyRead.
Filter by metric.latency.read
*/
MetricLatencyRead *int64
/* MetricLatencyTotal.
Filter by metric.latency.total
*/
MetricLatencyTotal *int64
/* MetricLatencyWrite.
Filter by metric.latency.write
*/
MetricLatencyWrite *int64
/* MetricStatus.
Filter by metric.status
*/
MetricStatus *string
/* MetricThroughputOther.
Filter by metric.throughput.other
*/
MetricThroughputOther *int64
/* MetricThroughputRead.
Filter by metric.throughput.read
*/
MetricThroughputRead *int64
/* MetricThroughputTotal.
Filter by metric.throughput.total
*/
MetricThroughputTotal *int64
/* MetricThroughputWrite.
Filter by metric.throughput.write
*/
MetricThroughputWrite *int64
/* MetricTimestamp.
Filter by metric.timestamp
*/
MetricTimestamp *string
/* MovementMaxThroughput.
Filter by movement.max_throughput
*/
MovementMaxThroughput *int64
/* MovementPathsDestination.
Filter by movement.paths.destination
*/
MovementPathsDestination *string
/* MovementPathsSource.
Filter by movement.paths.source
*/
MovementPathsSource *string
/* MovementProgressElapsed.
Filter by movement.progress.elapsed
*/
MovementProgressElapsed *int64
/* MovementProgressFailureArgumentsCode.
Filter by movement.progress.failure.arguments.code
*/
MovementProgressFailureArgumentsCode *string
/* MovementProgressFailureArgumentsMessage.
Filter by movement.progress.failure.arguments.message
*/
MovementProgressFailureArgumentsMessage *string
/* MovementProgressFailureCode.
Filter by movement.progress.failure.code
*/
MovementProgressFailureCode *string
/* MovementProgressFailureMessage.
Filter by movement.progress.failure.message
*/
MovementProgressFailureMessage *string
/* MovementProgressFailureTarget.
Filter by movement.progress.failure.target
*/
MovementProgressFailureTarget *string
/* MovementProgressPercentComplete.
Filter by movement.progress.percent_complete
*/
MovementProgressPercentComplete *int64
/* MovementProgressState.
Filter by movement.progress.state
*/
MovementProgressState *string
/* MovementProgressVolumeSnapshotBlocked.
Filter by movement.progress.volume_snapshot_blocked
*/
MovementProgressVolumeSnapshotBlocked *bool
/* 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
/* OsType.
Filter by os_type
*/
OsType *string
/* QosPolicyName.
Filter by qos_policy.name
*/
QosPolicyName *string
/* QosPolicyUUID.
Filter by 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
/* SerialNumber.
Filter by serial_number
*/
SerialNumber *string
/* SpaceGuaranteeRequested.
Filter by space.guarantee.requested
*/
SpaceGuaranteeRequested *bool
/* SpaceGuaranteeReserved.
Filter by space.guarantee.reserved
*/
SpaceGuaranteeReserved *bool
/* SpaceScsiThinProvisioningSupportEnabled.
Filter by space.scsi_thin_provisioning_support_enabled
*/
SpaceScsiThinProvisioningSupportEnabled *bool
/* SpaceSize.
Filter by space.size
*/
SpaceSize *int64
/* SpaceUsed.
Filter by space.used
*/
SpaceUsed *int64
/* StatisticsIopsRawOther.
Filter by statistics.iops_raw.other
*/
StatisticsIopsRawOther *int64
/* StatisticsIopsRawRead.
Filter by statistics.iops_raw.read
*/
StatisticsIopsRawRead *int64
/* StatisticsIopsRawTotal.
Filter by statistics.iops_raw.total
*/
StatisticsIopsRawTotal *int64
/* StatisticsIopsRawWrite.
Filter by statistics.iops_raw.write
*/
StatisticsIopsRawWrite *int64
/* StatisticsLatencyRawOther.
Filter by statistics.latency_raw.other
*/
StatisticsLatencyRawOther *int64
/* StatisticsLatencyRawRead.
Filter by statistics.latency_raw.read
*/
StatisticsLatencyRawRead *int64
/* StatisticsLatencyRawTotal.
Filter by statistics.latency_raw.total
*/
StatisticsLatencyRawTotal *int64
/* StatisticsLatencyRawWrite.
Filter by statistics.latency_raw.write
*/
StatisticsLatencyRawWrite *int64
/* StatisticsStatus.
Filter by statistics.status
*/
StatisticsStatus *string
/* StatisticsThroughputRawOther.
Filter by statistics.throughput_raw.other
*/
StatisticsThroughputRawOther *int64
/* StatisticsThroughputRawRead.
Filter by statistics.throughput_raw.read
*/
StatisticsThroughputRawRead *int64
/* StatisticsThroughputRawTotal.
Filter by statistics.throughput_raw.total
*/
StatisticsThroughputRawTotal *int64
/* StatisticsThroughputRawWrite.
Filter by statistics.throughput_raw.write
*/
StatisticsThroughputRawWrite *int64
/* StatisticsTimestamp.
Filter by statistics.timestamp
*/
StatisticsTimestamp *string
/* StatusContainerState.
Filter by status.container_state
*/
StatusContainerState *string
/* StatusMapped.
Filter by status.mapped
*/
StatusMapped *bool
/* StatusReadOnly.
Filter by status.read_only
*/
StatusReadOnly *bool
/* StatusState.
Filter by status.state
*/
StatusState *string
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
/* UUID.
Filter by uuid
*/
UUID *string
/* VvolBindingsID.
Filter by vvol.bindings.id
*/
VvolBindingsID *int64
/* VvolBindingsPartnerName.
Filter by vvol.bindings.partner.name
*/
VvolBindingsPartnerName *string
/* VvolBindingsPartnerUUID.
Filter by vvol.bindings.partner.uuid
*/
VvolBindingsPartnerUUID *string
/* VvolIsBound.
Filter by vvol.is_bound
*/
VvolIsBound *bool
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCollectionGetParams) WithDefaults() *LunCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := LunCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun collection get params
func (o *LunCollectionGetParams) WithTimeout(timeout time.Duration) *LunCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun collection get params
func (o *LunCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun collection get params
func (o *LunCollectionGetParams) WithContext(ctx context.Context) *LunCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun collection get params
func (o *LunCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun collection get params
func (o *LunCollectionGetParams) WithHTTPClient(client *http.Client) *LunCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun collection get params
func (o *LunCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAttributesName adds the attributesName to the lun collection get params
func (o *LunCollectionGetParams) WithAttributesName(attributesName *string) *LunCollectionGetParams {
o.SetAttributesName(attributesName)
return o
}
// SetAttributesName adds the attributesName to the lun collection get params
func (o *LunCollectionGetParams) SetAttributesName(attributesName *string) {
o.AttributesName = attributesName
}
// WithAttributesValue adds the attributesValue to the lun collection get params
func (o *LunCollectionGetParams) WithAttributesValue(attributesValue *string) *LunCollectionGetParams {
o.SetAttributesValue(attributesValue)
return o
}
// SetAttributesValue adds the attributesValue to the lun collection get params
func (o *LunCollectionGetParams) SetAttributesValue(attributesValue *string) {
o.AttributesValue = attributesValue
}
// WithAutoDelete adds the autoDelete to the lun collection get params
func (o *LunCollectionGetParams) WithAutoDelete(autoDelete *bool) *LunCollectionGetParams {
o.SetAutoDelete(autoDelete)
return o
}
// SetAutoDelete adds the autoDelete to the lun collection get params
func (o *LunCollectionGetParams) SetAutoDelete(autoDelete *bool) {
o.AutoDelete = autoDelete
}
// WithClass adds the class to the lun collection get params
func (o *LunCollectionGetParams) WithClass(class *string) *LunCollectionGetParams {
o.SetClass(class)
return o
}
// SetClass adds the class to the lun collection get params
func (o *LunCollectionGetParams) SetClass(class *string) {
o.Class = class
}
// WithComment adds the comment to the lun collection get params
func (o *LunCollectionGetParams) WithComment(comment *string) *LunCollectionGetParams {
o.SetComment(comment)
return o
}
// SetComment adds the comment to the lun collection get params
func (o *LunCollectionGetParams) SetComment(comment *string) {
o.Comment = comment
}
// WithConsistencyGroupName adds the consistencyGroupName to the lun collection get params
func (o *LunCollectionGetParams) WithConsistencyGroupName(consistencyGroupName *string) *LunCollectionGetParams {
o.SetConsistencyGroupName(consistencyGroupName)
return o
}
// SetConsistencyGroupName adds the consistencyGroupName to the lun collection get params
func (o *LunCollectionGetParams) SetConsistencyGroupName(consistencyGroupName *string) {
o.ConsistencyGroupName = consistencyGroupName
}
// WithConsistencyGroupUUID adds the consistencyGroupUUID to the lun collection get params
func (o *LunCollectionGetParams) WithConsistencyGroupUUID(consistencyGroupUUID *string) *LunCollectionGetParams {
o.SetConsistencyGroupUUID(consistencyGroupUUID)
return o
}
// SetConsistencyGroupUUID adds the consistencyGroupUuid to the lun collection get params
func (o *LunCollectionGetParams) SetConsistencyGroupUUID(consistencyGroupUUID *string) {
o.ConsistencyGroupUUID = consistencyGroupUUID
}
// WithCopyDestinationsMaxThroughput adds the copyDestinationsMaxThroughput to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsMaxThroughput(copyDestinationsMaxThroughput *int64) *LunCollectionGetParams {
o.SetCopyDestinationsMaxThroughput(copyDestinationsMaxThroughput)
return o
}
// SetCopyDestinationsMaxThroughput adds the copyDestinationsMaxThroughput to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsMaxThroughput(copyDestinationsMaxThroughput *int64) {
o.CopyDestinationsMaxThroughput = copyDestinationsMaxThroughput
}
// WithCopyDestinationsName adds the copyDestinationsName to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsName(copyDestinationsName *string) *LunCollectionGetParams {
o.SetCopyDestinationsName(copyDestinationsName)
return o
}
// SetCopyDestinationsName adds the copyDestinationsName to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsName(copyDestinationsName *string) {
o.CopyDestinationsName = copyDestinationsName
}
// WithCopyDestinationsProgressElapsed adds the copyDestinationsProgressElapsed to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressElapsed(copyDestinationsProgressElapsed *int64) *LunCollectionGetParams {
o.SetCopyDestinationsProgressElapsed(copyDestinationsProgressElapsed)
return o
}
// SetCopyDestinationsProgressElapsed adds the copyDestinationsProgressElapsed to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressElapsed(copyDestinationsProgressElapsed *int64) {
o.CopyDestinationsProgressElapsed = copyDestinationsProgressElapsed
}
// WithCopyDestinationsProgressFailureArgumentsCode adds the copyDestinationsProgressFailureArgumentsCode to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressFailureArgumentsCode(copyDestinationsProgressFailureArgumentsCode *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressFailureArgumentsCode(copyDestinationsProgressFailureArgumentsCode)
return o
}
// SetCopyDestinationsProgressFailureArgumentsCode adds the copyDestinationsProgressFailureArgumentsCode to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressFailureArgumentsCode(copyDestinationsProgressFailureArgumentsCode *string) {
o.CopyDestinationsProgressFailureArgumentsCode = copyDestinationsProgressFailureArgumentsCode
}
// WithCopyDestinationsProgressFailureArgumentsMessage adds the copyDestinationsProgressFailureArgumentsMessage to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressFailureArgumentsMessage(copyDestinationsProgressFailureArgumentsMessage *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressFailureArgumentsMessage(copyDestinationsProgressFailureArgumentsMessage)
return o
}
// SetCopyDestinationsProgressFailureArgumentsMessage adds the copyDestinationsProgressFailureArgumentsMessage to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressFailureArgumentsMessage(copyDestinationsProgressFailureArgumentsMessage *string) {
o.CopyDestinationsProgressFailureArgumentsMessage = copyDestinationsProgressFailureArgumentsMessage
}
// WithCopyDestinationsProgressFailureCode adds the copyDestinationsProgressFailureCode to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressFailureCode(copyDestinationsProgressFailureCode *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressFailureCode(copyDestinationsProgressFailureCode)
return o
}
// SetCopyDestinationsProgressFailureCode adds the copyDestinationsProgressFailureCode to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressFailureCode(copyDestinationsProgressFailureCode *string) {
o.CopyDestinationsProgressFailureCode = copyDestinationsProgressFailureCode
}
// WithCopyDestinationsProgressFailureMessage adds the copyDestinationsProgressFailureMessage to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressFailureMessage(copyDestinationsProgressFailureMessage *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressFailureMessage(copyDestinationsProgressFailureMessage)
return o
}
// SetCopyDestinationsProgressFailureMessage adds the copyDestinationsProgressFailureMessage to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressFailureMessage(copyDestinationsProgressFailureMessage *string) {
o.CopyDestinationsProgressFailureMessage = copyDestinationsProgressFailureMessage
}
// WithCopyDestinationsProgressFailureTarget adds the copyDestinationsProgressFailureTarget to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressFailureTarget(copyDestinationsProgressFailureTarget *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressFailureTarget(copyDestinationsProgressFailureTarget)
return o
}
// SetCopyDestinationsProgressFailureTarget adds the copyDestinationsProgressFailureTarget to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressFailureTarget(copyDestinationsProgressFailureTarget *string) {
o.CopyDestinationsProgressFailureTarget = copyDestinationsProgressFailureTarget
}
// WithCopyDestinationsProgressPercentComplete adds the copyDestinationsProgressPercentComplete to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressPercentComplete(copyDestinationsProgressPercentComplete *int64) *LunCollectionGetParams {
o.SetCopyDestinationsProgressPercentComplete(copyDestinationsProgressPercentComplete)
return o
}
// SetCopyDestinationsProgressPercentComplete adds the copyDestinationsProgressPercentComplete to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressPercentComplete(copyDestinationsProgressPercentComplete *int64) {
o.CopyDestinationsProgressPercentComplete = copyDestinationsProgressPercentComplete
}
// WithCopyDestinationsProgressState adds the copyDestinationsProgressState to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressState(copyDestinationsProgressState *string) *LunCollectionGetParams {
o.SetCopyDestinationsProgressState(copyDestinationsProgressState)
return o
}
// SetCopyDestinationsProgressState adds the copyDestinationsProgressState to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressState(copyDestinationsProgressState *string) {
o.CopyDestinationsProgressState = copyDestinationsProgressState
}
// WithCopyDestinationsProgressVolumeSnapshotBlocked adds the copyDestinationsProgressVolumeSnapshotBlocked to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsProgressVolumeSnapshotBlocked(copyDestinationsProgressVolumeSnapshotBlocked *bool) *LunCollectionGetParams {
o.SetCopyDestinationsProgressVolumeSnapshotBlocked(copyDestinationsProgressVolumeSnapshotBlocked)
return o
}
// SetCopyDestinationsProgressVolumeSnapshotBlocked adds the copyDestinationsProgressVolumeSnapshotBlocked to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsProgressVolumeSnapshotBlocked(copyDestinationsProgressVolumeSnapshotBlocked *bool) {
o.CopyDestinationsProgressVolumeSnapshotBlocked = copyDestinationsProgressVolumeSnapshotBlocked
}
// WithCopyDestinationsUUID adds the copyDestinationsUUID to the lun collection get params
func (o *LunCollectionGetParams) WithCopyDestinationsUUID(copyDestinationsUUID *string) *LunCollectionGetParams {
o.SetCopyDestinationsUUID(copyDestinationsUUID)
return o
}
// SetCopyDestinationsUUID adds the copyDestinationsUuid to the lun collection get params
func (o *LunCollectionGetParams) SetCopyDestinationsUUID(copyDestinationsUUID *string) {
o.CopyDestinationsUUID = copyDestinationsUUID
}
// WithCopySourceMaxThroughput adds the copySourceMaxThroughput to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceMaxThroughput(copySourceMaxThroughput *int64) *LunCollectionGetParams {
o.SetCopySourceMaxThroughput(copySourceMaxThroughput)
return o
}
// SetCopySourceMaxThroughput adds the copySourceMaxThroughput to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceMaxThroughput(copySourceMaxThroughput *int64) {
o.CopySourceMaxThroughput = copySourceMaxThroughput
}
// WithCopySourceName adds the copySourceName to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceName(copySourceName *string) *LunCollectionGetParams {
o.SetCopySourceName(copySourceName)
return o
}
// SetCopySourceName adds the copySourceName to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceName(copySourceName *string) {
o.CopySourceName = copySourceName
}
// WithCopySourceProgressElapsed adds the copySourceProgressElapsed to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressElapsed(copySourceProgressElapsed *int64) *LunCollectionGetParams {
o.SetCopySourceProgressElapsed(copySourceProgressElapsed)
return o
}
// SetCopySourceProgressElapsed adds the copySourceProgressElapsed to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressElapsed(copySourceProgressElapsed *int64) {
o.CopySourceProgressElapsed = copySourceProgressElapsed
}
// WithCopySourceProgressFailureArgumentsCode adds the copySourceProgressFailureArgumentsCode to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressFailureArgumentsCode(copySourceProgressFailureArgumentsCode *string) *LunCollectionGetParams {
o.SetCopySourceProgressFailureArgumentsCode(copySourceProgressFailureArgumentsCode)
return o
}
// SetCopySourceProgressFailureArgumentsCode adds the copySourceProgressFailureArgumentsCode to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressFailureArgumentsCode(copySourceProgressFailureArgumentsCode *string) {
o.CopySourceProgressFailureArgumentsCode = copySourceProgressFailureArgumentsCode
}
// WithCopySourceProgressFailureArgumentsMessage adds the copySourceProgressFailureArgumentsMessage to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressFailureArgumentsMessage(copySourceProgressFailureArgumentsMessage *string) *LunCollectionGetParams {
o.SetCopySourceProgressFailureArgumentsMessage(copySourceProgressFailureArgumentsMessage)
return o
}
// SetCopySourceProgressFailureArgumentsMessage adds the copySourceProgressFailureArgumentsMessage to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressFailureArgumentsMessage(copySourceProgressFailureArgumentsMessage *string) {
o.CopySourceProgressFailureArgumentsMessage = copySourceProgressFailureArgumentsMessage
}
// WithCopySourceProgressFailureCode adds the copySourceProgressFailureCode to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressFailureCode(copySourceProgressFailureCode *string) *LunCollectionGetParams {
o.SetCopySourceProgressFailureCode(copySourceProgressFailureCode)
return o
}
// SetCopySourceProgressFailureCode adds the copySourceProgressFailureCode to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressFailureCode(copySourceProgressFailureCode *string) {
o.CopySourceProgressFailureCode = copySourceProgressFailureCode
}
// WithCopySourceProgressFailureMessage adds the copySourceProgressFailureMessage to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressFailureMessage(copySourceProgressFailureMessage *string) *LunCollectionGetParams {
o.SetCopySourceProgressFailureMessage(copySourceProgressFailureMessage)
return o
}
// SetCopySourceProgressFailureMessage adds the copySourceProgressFailureMessage to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressFailureMessage(copySourceProgressFailureMessage *string) {
o.CopySourceProgressFailureMessage = copySourceProgressFailureMessage
}
// WithCopySourceProgressFailureTarget adds the copySourceProgressFailureTarget to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressFailureTarget(copySourceProgressFailureTarget *string) *LunCollectionGetParams {
o.SetCopySourceProgressFailureTarget(copySourceProgressFailureTarget)
return o
}
// SetCopySourceProgressFailureTarget adds the copySourceProgressFailureTarget to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressFailureTarget(copySourceProgressFailureTarget *string) {
o.CopySourceProgressFailureTarget = copySourceProgressFailureTarget
}
// WithCopySourceProgressPercentComplete adds the copySourceProgressPercentComplete to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressPercentComplete(copySourceProgressPercentComplete *int64) *LunCollectionGetParams {
o.SetCopySourceProgressPercentComplete(copySourceProgressPercentComplete)
return o
}
// SetCopySourceProgressPercentComplete adds the copySourceProgressPercentComplete to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressPercentComplete(copySourceProgressPercentComplete *int64) {
o.CopySourceProgressPercentComplete = copySourceProgressPercentComplete
}
// WithCopySourceProgressState adds the copySourceProgressState to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressState(copySourceProgressState *string) *LunCollectionGetParams {
o.SetCopySourceProgressState(copySourceProgressState)
return o
}
// SetCopySourceProgressState adds the copySourceProgressState to the lun collection get params
func (o *LunCollectionGetParams) SetCopySourceProgressState(copySourceProgressState *string) {
o.CopySourceProgressState = copySourceProgressState
}
// WithCopySourceProgressVolumeSnapshotBlocked adds the copySourceProgressVolumeSnapshotBlocked to the lun collection get params
func (o *LunCollectionGetParams) WithCopySourceProgressVolumeSnapshotBlocked(copySourceProgressVolumeSnapshotBlocked *bool) *LunCollectionGetParams {
o.SetCopySourceProgressVolumeSnapshotBlocked(copySourceProgressVolumeSnapshotBlocked)
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/s_a_n/lun_attribute_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunAttributeCreateParams creates a new LunAttributeCreateParams 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 NewLunAttributeCreateParams() *LunAttributeCreateParams {
return &LunAttributeCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunAttributeCreateParamsWithTimeout creates a new LunAttributeCreateParams object
// with the ability to set a timeout on a request.
func NewLunAttributeCreateParamsWithTimeout(timeout time.Duration) *LunAttributeCreateParams {
return &LunAttributeCreateParams{
timeout: timeout,
}
}
// NewLunAttributeCreateParamsWithContext creates a new LunAttributeCreateParams object
// with the ability to set a context for a request.
func NewLunAttributeCreateParamsWithContext(ctx context.Context) *LunAttributeCreateParams {
return &LunAttributeCreateParams{
Context: ctx,
}
}
// NewLunAttributeCreateParamsWithHTTPClient creates a new LunAttributeCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunAttributeCreateParamsWithHTTPClient(client *http.Client) *LunAttributeCreateParams {
return &LunAttributeCreateParams{
HTTPClient: client,
}
}
/*
LunAttributeCreateParams contains all the parameters to send to the API endpoint
for the lun attribute create operation.
Typically these are written to a http.Request.
*/
type LunAttributeCreateParams struct {
/* Info.
The attribute name and value to add to the LUN.
*/
Info *models.LunAttribute
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
/* 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 lun attribute create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeCreateParams) WithDefaults() *LunAttributeCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun attribute create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := LunAttributeCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun attribute create params
func (o *LunAttributeCreateParams) WithTimeout(timeout time.Duration) *LunAttributeCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun attribute create params
func (o *LunAttributeCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun attribute create params
func (o *LunAttributeCreateParams) WithContext(ctx context.Context) *LunAttributeCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun attribute create params
func (o *LunAttributeCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun attribute create params
func (o *LunAttributeCreateParams) WithHTTPClient(client *http.Client) *LunAttributeCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun attribute create params
func (o *LunAttributeCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the lun attribute create params
func (o *LunAttributeCreateParams) WithInfo(info *models.LunAttribute) *LunAttributeCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun attribute create params
func (o *LunAttributeCreateParams) SetInfo(info *models.LunAttribute) {
o.Info = info
}
// WithLunUUID adds the lunUUID to the lun attribute create params
func (o *LunAttributeCreateParams) WithLunUUID(lunUUID string) *LunAttributeCreateParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun attribute create params
func (o *LunAttributeCreateParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithReturnRecords adds the returnRecords to the lun attribute create params
func (o *LunAttributeCreateParams) WithReturnRecords(returnRecords *bool) *LunAttributeCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun attribute create params
func (o *LunAttributeCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *LunAttributeCreateParams) 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 lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); 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/s_a_n/fcp_service_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcpServiceCreateParams creates a new FcpServiceCreateParams 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 NewFcpServiceCreateParams() *FcpServiceCreateParams {
return &FcpServiceCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcpServiceCreateParamsWithTimeout creates a new FcpServiceCreateParams object
// with the ability to set a timeout on a request.
func NewFcpServiceCreateParamsWithTimeout(timeout time.Duration) *FcpServiceCreateParams {
return &FcpServiceCreateParams{
timeout: timeout,
}
}
// NewFcpServiceCreateParamsWithContext creates a new FcpServiceCreateParams object
// with the ability to set a context for a request.
func NewFcpServiceCreateParamsWithContext(ctx context.Context) *FcpServiceCreateParams {
return &FcpServiceCreateParams{
Context: ctx,
}
}
// NewFcpServiceCreateParamsWithHTTPClient creates a new FcpServiceCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcpServiceCreateParamsWithHTTPClient(client *http.Client) *FcpServiceCreateParams {
return &FcpServiceCreateParams{
HTTPClient: client,
}
}
/*
FcpServiceCreateParams contains all the parameters to send to the API endpoint
for the fcp service create operation.
Typically these are written to a http.Request.
*/
type FcpServiceCreateParams struct {
/* Info.
The property values for the new FC Protocol service.
*/
Info *models.FcpService
/* 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 fcp service create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceCreateParams) WithDefaults() *FcpServiceCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fcp service create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := FcpServiceCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fcp service create params
func (o *FcpServiceCreateParams) WithTimeout(timeout time.Duration) *FcpServiceCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fcp service create params
func (o *FcpServiceCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fcp service create params
func (o *FcpServiceCreateParams) WithContext(ctx context.Context) *FcpServiceCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fcp service create params
func (o *FcpServiceCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fcp service create params
func (o *FcpServiceCreateParams) WithHTTPClient(client *http.Client) *FcpServiceCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fcp service create params
func (o *FcpServiceCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the fcp service create params
func (o *FcpServiceCreateParams) WithInfo(info *models.FcpService) *FcpServiceCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the fcp service create params
func (o *FcpServiceCreateParams) SetInfo(info *models.FcpService) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the fcp service create params
func (o *FcpServiceCreateParams) WithReturnRecords(returnRecords *bool) *FcpServiceCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fcp service create params
func (o *FcpServiceCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *FcpServiceCreateParams) 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/s_a_n/fc_login_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fc_login_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcLoginGetParams creates a new FcLoginGetParams 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 NewFcLoginGetParams() *FcLoginGetParams {
return &FcLoginGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcLoginGetParamsWithTimeout creates a new FcLoginGetParams object
// with the ability to set a timeout on a request.
func NewFcLoginGetParamsWithTimeout(timeout time.Duration) *FcLoginGetParams {
return &FcLoginGetParams{
timeout: timeout,
}
}
// NewFcLoginGetParamsWithContext creates a new FcLoginGetParams object
// with the ability to set a context for a request.
func NewFcLoginGetParamsWithContext(ctx context.Context) *FcLoginGetParams {
return &FcLoginGetParams{
Context: ctx,
}
}
// NewFcLoginGetParamsWithHTTPClient creates a new FcLoginGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcLoginGetParamsWithHTTPClient(client *http.Client) *FcLoginGetParams {
return &FcLoginGetParams{
HTTPClient: client,
}
}
/*
FcLoginGetParams contains all the parameters to send to the API endpoint
for the fc login get operation.
Typically these are written to a http.Request.
*/
type FcLoginGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* InitiatorWwpn.
The world wide port name (WWPN) of the initiator.
*/
InitiatorWwpn string
/* InterfaceUUID.
The unique identifier of the FC interface through which the initiator logged in.
*/
InterfaceUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc login get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcLoginGetParams) WithDefaults() *FcLoginGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc login get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcLoginGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fc login get params
func (o *FcLoginGetParams) WithTimeout(timeout time.Duration) *FcLoginGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc login get params
func (o *FcLoginGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc login get params
func (o *FcLoginGetParams) WithContext(ctx context.Context) *FcLoginGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc login get params
func (o *FcLoginGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc login get params
func (o *FcLoginGetParams) WithHTTPClient(client *http.Client) *FcLoginGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc login get params
func (o *FcLoginGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the fc login get params
func (o *FcLoginGetParams) WithFields(fields []string) *FcLoginGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc login get params
func (o *FcLoginGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInitiatorWwpn adds the initiatorWwpn to the fc login get params
func (o *FcLoginGetParams) WithInitiatorWwpn(initiatorWwpn string) *FcLoginGetParams {
o.SetInitiatorWwpn(initiatorWwpn)
return o
}
// SetInitiatorWwpn adds the initiatorWwpn to the fc login get params
func (o *FcLoginGetParams) SetInitiatorWwpn(initiatorWwpn string) {
o.InitiatorWwpn = initiatorWwpn
}
// WithInterfaceUUID adds the interfaceUUID to the fc login get params
func (o *FcLoginGetParams) WithInterfaceUUID(interfaceUUID string) *FcLoginGetParams {
o.SetInterfaceUUID(interfaceUUID)
return o
}
// SetInterfaceUUID adds the interfaceUuid to the fc login get params
func (o *FcLoginGetParams) SetInterfaceUUID(interfaceUUID string) {
o.InterfaceUUID = interfaceUUID
}
// WriteToRequest writes these params to a swagger request
func (o *FcLoginGetParams) 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 initiator.wwpn
if err := r.SetPathParam("initiator.wwpn", o.InitiatorWwpn); err != nil {
return err
}
// path param interface.uuid
if err := r.SetPathParam("interface.uuid", o.InterfaceUUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcLoginGet binds the parameter fields
func (o *FcLoginGetParams) 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/s_a_n/iscsi_service_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiServiceModifyParams creates a new IscsiServiceModifyParams 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 NewIscsiServiceModifyParams() *IscsiServiceModifyParams {
return &IscsiServiceModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiServiceModifyParamsWithTimeout creates a new IscsiServiceModifyParams object
// with the ability to set a timeout on a request.
func NewIscsiServiceModifyParamsWithTimeout(timeout time.Duration) *IscsiServiceModifyParams {
return &IscsiServiceModifyParams{
timeout: timeout,
}
}
// NewIscsiServiceModifyParamsWithContext creates a new IscsiServiceModifyParams object
// with the ability to set a context for a request.
func NewIscsiServiceModifyParamsWithContext(ctx context.Context) *IscsiServiceModifyParams {
return &IscsiServiceModifyParams{
Context: ctx,
}
}
// NewIscsiServiceModifyParamsWithHTTPClient creates a new IscsiServiceModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiServiceModifyParamsWithHTTPClient(client *http.Client) *IscsiServiceModifyParams {
return &IscsiServiceModifyParams{
HTTPClient: client,
}
}
/*
IscsiServiceModifyParams contains all the parameters to send to the API endpoint
for the iscsi service modify operation.
Typically these are written to a http.Request.
*/
type IscsiServiceModifyParams struct {
/* Info.
The new property values for the iSCSI service.
*/
Info *models.IscsiService
/* SvmUUID.
The unique identifier of the SVM for which to update the iSCSI service.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi service modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceModifyParams) WithDefaults() *IscsiServiceModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi service modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi service modify params
func (o *IscsiServiceModifyParams) WithTimeout(timeout time.Duration) *IscsiServiceModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi service modify params
func (o *IscsiServiceModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi service modify params
func (o *IscsiServiceModifyParams) WithContext(ctx context.Context) *IscsiServiceModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi service modify params
func (o *IscsiServiceModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi service modify params
func (o *IscsiServiceModifyParams) WithHTTPClient(client *http.Client) *IscsiServiceModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi service modify params
func (o *IscsiServiceModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the iscsi service modify params
func (o *IscsiServiceModifyParams) WithInfo(info *models.IscsiService) *IscsiServiceModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the iscsi service modify params
func (o *IscsiServiceModifyParams) SetInfo(info *models.IscsiService) {
o.Info = info
}
// WithSvmUUID adds the svmUUID to the iscsi service modify params
func (o *IscsiServiceModifyParams) WithSvmUUID(svmUUID string) *IscsiServiceModifyParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi service modify params
func (o *IscsiServiceModifyParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiServiceModifyParams) 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 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/s_a_n/fc_login_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fc_login_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// FcLoginCollectionGetReader is a Reader for the FcLoginCollectionGet structure.
type FcLoginCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcLoginCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcLoginCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcLoginCollectionGetDefault(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
}
}
// NewFcLoginCollectionGetOK creates a FcLoginCollectionGetOK with default headers values
func NewFcLoginCollectionGetOK() *FcLoginCollectionGetOK {
return &FcLoginCollectionGetOK{}
}
/*
FcLoginCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type FcLoginCollectionGetOK struct {
Payload *models.FcLoginResponse
}
// IsSuccess returns true when this fc login collection get o k response has a 2xx status code
func (o *FcLoginCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc login collection get o k response has a 3xx status code
func (o *FcLoginCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc login collection get o k response has a 4xx status code
func (o *FcLoginCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc login collection get o k response has a 5xx status code
func (o *FcLoginCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc login collection get o k response a status code equal to that given
func (o *FcLoginCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *FcLoginCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/logins][%d] fcLoginCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcLoginCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/logins][%d] fcLoginCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcLoginCollectionGetOK) GetPayload() *models.FcLoginResponse {
return o.Payload
}
func (o *FcLoginCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.FcLoginResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcLoginCollectionGetDefault creates a FcLoginCollectionGetDefault with default headers values
func NewFcLoginCollectionGetDefault(code int) *FcLoginCollectionGetDefault {
return &FcLoginCollectionGetDefault{
_statusCode: code,
}
}
/*
FcLoginCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type FcLoginCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc login collection get default response
func (o *FcLoginCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc login collection get default response has a 2xx status code
func (o *FcLoginCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc login collection get default response has a 3xx status code
func (o *FcLoginCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc login collection get default response has a 4xx status code
func (o *FcLoginCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc login collection get default response has a 5xx status code
func (o *FcLoginCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc login collection get default response a status code equal to that given
func (o *FcLoginCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcLoginCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/logins][%d] fc_login_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcLoginCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/logins][%d] fc_login_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcLoginCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcLoginCollectionGetDefault) 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/s_a_n/lun_map_reporting_node_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_reporting_node_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunMapReportingNodeCreateParams creates a new LunMapReportingNodeCreateParams 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 NewLunMapReportingNodeCreateParams() *LunMapReportingNodeCreateParams {
return &LunMapReportingNodeCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapReportingNodeCreateParamsWithTimeout creates a new LunMapReportingNodeCreateParams object
// with the ability to set a timeout on a request.
func NewLunMapReportingNodeCreateParamsWithTimeout(timeout time.Duration) *LunMapReportingNodeCreateParams {
return &LunMapReportingNodeCreateParams{
timeout: timeout,
}
}
// NewLunMapReportingNodeCreateParamsWithContext creates a new LunMapReportingNodeCreateParams object
// with the ability to set a context for a request.
func NewLunMapReportingNodeCreateParamsWithContext(ctx context.Context) *LunMapReportingNodeCreateParams {
return &LunMapReportingNodeCreateParams{
Context: ctx,
}
}
// NewLunMapReportingNodeCreateParamsWithHTTPClient creates a new LunMapReportingNodeCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapReportingNodeCreateParamsWithHTTPClient(client *http.Client) *LunMapReportingNodeCreateParams {
return &LunMapReportingNodeCreateParams{
HTTPClient: client,
}
}
/*
LunMapReportingNodeCreateParams contains all the parameters to send to the API endpoint
for the lun map reporting node create operation.
Typically these are written to a http.Request.
*/
type LunMapReportingNodeCreateParams struct {
/* IgroupUUID.
The unique identifier of the igroup.
*/
IgroupUUID string
/* Info.
The property values for the new LUN map reporting node.
*/
Info *models.LunMapReportingNode
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
/* 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 lun map reporting node create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeCreateParams) WithDefaults() *LunMapReportingNodeCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map reporting node create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := LunMapReportingNodeCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithTimeout(timeout time.Duration) *LunMapReportingNodeCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithContext(ctx context.Context) *LunMapReportingNodeCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithHTTPClient(client *http.Client) *LunMapReportingNodeCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIgroupUUID adds the igroupUUID to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithIgroupUUID(igroupUUID string) *LunMapReportingNodeCreateParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithInfo adds the info to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithInfo(info *models.LunMapReportingNode) *LunMapReportingNodeCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetInfo(info *models.LunMapReportingNode) {
o.Info = info
}
// WithLunUUID adds the lunUUID to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithLunUUID(lunUUID string) *LunMapReportingNodeCreateParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithReturnRecords adds the returnRecords to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) WithReturnRecords(returnRecords *bool) *LunMapReportingNodeCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun map reporting node create params
func (o *LunMapReportingNodeCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapReportingNodeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
// path param lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); 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/s_a_n/igroup_nested_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupNestedCollectionGetReader is a Reader for the IgroupNestedCollectionGet structure.
type IgroupNestedCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupNestedCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupNestedCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupNestedCollectionGetDefault(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
}
}
// NewIgroupNestedCollectionGetOK creates a IgroupNestedCollectionGetOK with default headers values
func NewIgroupNestedCollectionGetOK() *IgroupNestedCollectionGetOK {
return &IgroupNestedCollectionGetOK{}
}
/*
IgroupNestedCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupNestedCollectionGetOK struct {
Payload *models.IgroupNestedResponse
}
// IsSuccess returns true when this igroup nested collection get o k response has a 2xx status code
func (o *IgroupNestedCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup nested collection get o k response has a 3xx status code
func (o *IgroupNestedCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup nested collection get o k response has a 4xx status code
func (o *IgroupNestedCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup nested collection get o k response has a 5xx status code
func (o *IgroupNestedCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup nested collection get o k response a status code equal to that given
func (o *IgroupNestedCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupNestedCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroupNestedCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupNestedCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroupNestedCollectionGetOK %+v", 200, o.Payload)
}
func (o *IgroupNestedCollectionGetOK) GetPayload() *models.IgroupNestedResponse {
return o.Payload
}
func (o *IgroupNestedCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IgroupNestedResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupNestedCollectionGetDefault creates a IgroupNestedCollectionGetDefault with default headers values
func NewIgroupNestedCollectionGetDefault(code int) *IgroupNestedCollectionGetDefault {
return &IgroupNestedCollectionGetDefault{
_statusCode: code,
}
}
/*
IgroupNestedCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupNestedCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup nested collection get default response
func (o *IgroupNestedCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup nested collection get default response has a 2xx status code
func (o *IgroupNestedCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup nested collection get default response has a 3xx status code
func (o *IgroupNestedCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup nested collection get default response has a 4xx status code
func (o *IgroupNestedCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup nested collection get default response has a 5xx status code
func (o *IgroupNestedCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup nested collection get default response a status code equal to that given
func (o *IgroupNestedCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupNestedCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroup_nested_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroup_nested_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupNestedCollectionGetDefault) 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/s_a_n/iscsi_service_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiServiceDeleteParams creates a new IscsiServiceDeleteParams 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 NewIscsiServiceDeleteParams() *IscsiServiceDeleteParams {
return &IscsiServiceDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiServiceDeleteParamsWithTimeout creates a new IscsiServiceDeleteParams object
// with the ability to set a timeout on a request.
func NewIscsiServiceDeleteParamsWithTimeout(timeout time.Duration) *IscsiServiceDeleteParams {
return &IscsiServiceDeleteParams{
timeout: timeout,
}
}
// NewIscsiServiceDeleteParamsWithContext creates a new IscsiServiceDeleteParams object
// with the ability to set a context for a request.
func NewIscsiServiceDeleteParamsWithContext(ctx context.Context) *IscsiServiceDeleteParams {
return &IscsiServiceDeleteParams{
Context: ctx,
}
}
// NewIscsiServiceDeleteParamsWithHTTPClient creates a new IscsiServiceDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiServiceDeleteParamsWithHTTPClient(client *http.Client) *IscsiServiceDeleteParams {
return &IscsiServiceDeleteParams{
HTTPClient: client,
}
}
/*
IscsiServiceDeleteParams contains all the parameters to send to the API endpoint
for the iscsi service delete operation.
Typically these are written to a http.Request.
*/
type IscsiServiceDeleteParams struct {
/* SvmUUID.
The unique identifier of the SVM for which to delete the iSCSI service.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi service delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceDeleteParams) WithDefaults() *IscsiServiceDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi service delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi service delete params
func (o *IscsiServiceDeleteParams) WithTimeout(timeout time.Duration) *IscsiServiceDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi service delete params
func (o *IscsiServiceDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi service delete params
func (o *IscsiServiceDeleteParams) WithContext(ctx context.Context) *IscsiServiceDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi service delete params
func (o *IscsiServiceDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi service delete params
func (o *IscsiServiceDeleteParams) WithHTTPClient(client *http.Client) *IscsiServiceDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi service delete params
func (o *IscsiServiceDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithSvmUUID adds the svmUUID to the iscsi service delete params
func (o *IscsiServiceDeleteParams) WithSvmUUID(svmUUID string) *IscsiServiceDeleteParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi service delete params
func (o *IscsiServiceDeleteParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiServiceDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/s_a_n/fcp_service_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// FcpServiceCollectionGetReader is a Reader for the FcpServiceCollectionGet structure.
type FcpServiceCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcpServiceCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcpServiceCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcpServiceCollectionGetDefault(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
}
}
// NewFcpServiceCollectionGetOK creates a FcpServiceCollectionGetOK with default headers values
func NewFcpServiceCollectionGetOK() *FcpServiceCollectionGetOK {
return &FcpServiceCollectionGetOK{}
}
/*
FcpServiceCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type FcpServiceCollectionGetOK struct {
Payload *models.FcpServiceResponse
}
// IsSuccess returns true when this fcp service collection get o k response has a 2xx status code
func (o *FcpServiceCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fcp service collection get o k response has a 3xx status code
func (o *FcpServiceCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fcp service collection get o k response has a 4xx status code
func (o *FcpServiceCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fcp service collection get o k response has a 5xx status code
func (o *FcpServiceCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this fcp service collection get o k response a status code equal to that given
func (o *FcpServiceCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *FcpServiceCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/fcp/services][%d] fcpServiceCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcpServiceCollectionGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/fcp/services][%d] fcpServiceCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcpServiceCollectionGetOK) GetPayload() *models.FcpServiceResponse {
return o.Payload
}
func (o *FcpServiceCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.FcpServiceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcpServiceCollectionGetDefault creates a FcpServiceCollectionGetDefault with default headers values
func NewFcpServiceCollectionGetDefault(code int) *FcpServiceCollectionGetDefault {
return &FcpServiceCollectionGetDefault{
_statusCode: code,
}
}
/*
FcpServiceCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type FcpServiceCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fcp service collection get default response
func (o *FcpServiceCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fcp service collection get default response has a 2xx status code
func (o *FcpServiceCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fcp service collection get default response has a 3xx status code
func (o *FcpServiceCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fcp service collection get default response has a 4xx status code
func (o *FcpServiceCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fcp service collection get default response has a 5xx status code
func (o *FcpServiceCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fcp service collection get default response a status code equal to that given
func (o *FcpServiceCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcpServiceCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/fcp/services][%d] fcp_service_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/fcp/services][%d] fcp_service_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcpServiceCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcpServiceCollectionGetDefault) 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/s_a_n/lun_map_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunMapCreateParams creates a new LunMapCreateParams 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 NewLunMapCreateParams() *LunMapCreateParams {
return &LunMapCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapCreateParamsWithTimeout creates a new LunMapCreateParams object
// with the ability to set a timeout on a request.
func NewLunMapCreateParamsWithTimeout(timeout time.Duration) *LunMapCreateParams {
return &LunMapCreateParams{
timeout: timeout,
}
}
// NewLunMapCreateParamsWithContext creates a new LunMapCreateParams object
// with the ability to set a context for a request.
func NewLunMapCreateParamsWithContext(ctx context.Context) *LunMapCreateParams {
return &LunMapCreateParams{
Context: ctx,
}
}
// NewLunMapCreateParamsWithHTTPClient creates a new LunMapCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapCreateParamsWithHTTPClient(client *http.Client) *LunMapCreateParams {
return &LunMapCreateParams{
HTTPClient: client,
}
}
/*
LunMapCreateParams contains all the parameters to send to the API endpoint
for the lun map create operation.
Typically these are written to a http.Request.
*/
type LunMapCreateParams struct {
/* AdditionalReportingNodeName.
The name of an ONTAP cluster node to add to the default reporting nodes for the LUN map. The HA partner for the node is also added.
*/
AdditionalReportingNodeName *string
/* AdditionalReportingNodeUUID.
The unique identifier of an ONTAP cluster node to add to the default reporting nodes for the LUN map. The HA partner for the node is also added.
*/
AdditionalReportingNodeUUID *string
/* Info.
The property values for the new LUN map.
*/
Info *models.LunMap
/* 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 lun map create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapCreateParams) WithDefaults() *LunMapCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := LunMapCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the lun map create params
func (o *LunMapCreateParams) WithTimeout(timeout time.Duration) *LunMapCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map create params
func (o *LunMapCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map create params
func (o *LunMapCreateParams) WithContext(ctx context.Context) *LunMapCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map create params
func (o *LunMapCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map create params
func (o *LunMapCreateParams) WithHTTPClient(client *http.Client) *LunMapCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map create params
func (o *LunMapCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAdditionalReportingNodeName adds the additionalReportingNodeName to the lun map create params
func (o *LunMapCreateParams) WithAdditionalReportingNodeName(additionalReportingNodeName *string) *LunMapCreateParams {
o.SetAdditionalReportingNodeName(additionalReportingNodeName)
return o
}
// SetAdditionalReportingNodeName adds the additionalReportingNodeName to the lun map create params
func (o *LunMapCreateParams) SetAdditionalReportingNodeName(additionalReportingNodeName *string) {
o.AdditionalReportingNodeName = additionalReportingNodeName
}
// WithAdditionalReportingNodeUUID adds the additionalReportingNodeUUID to the lun map create params
func (o *LunMapCreateParams) WithAdditionalReportingNodeUUID(additionalReportingNodeUUID *string) *LunMapCreateParams {
o.SetAdditionalReportingNodeUUID(additionalReportingNodeUUID)
return o
}
// SetAdditionalReportingNodeUUID adds the additionalReportingNodeUuid to the lun map create params
func (o *LunMapCreateParams) SetAdditionalReportingNodeUUID(additionalReportingNodeUUID *string) {
o.AdditionalReportingNodeUUID = additionalReportingNodeUUID
}
// WithInfo adds the info to the lun map create params
func (o *LunMapCreateParams) WithInfo(info *models.LunMap) *LunMapCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun map create params
func (o *LunMapCreateParams) SetInfo(info *models.LunMap) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the lun map create params
func (o *LunMapCreateParams) WithReturnRecords(returnRecords *bool) *LunMapCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun map create params
func (o *LunMapCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AdditionalReportingNodeName != nil {
// query param additional_reporting_node.name
var qrAdditionalReportingNodeName string
if o.AdditionalReportingNodeName != nil {
qrAdditionalReportingNodeName = *o.AdditionalReportingNodeName
}
qAdditionalReportingNodeName := qrAdditionalReportingNodeName
if qAdditionalReportingNodeName != "" {
if err := r.SetQueryParam("additional_reporting_node.name", qAdditionalReportingNodeName); err != nil {
return err
}
}
}
if o.AdditionalReportingNodeUUID != nil {
// query param additional_reporting_node.uuid
var qrAdditionalReportingNodeUUID string
if o.AdditionalReportingNodeUUID != nil {
qrAdditionalReportingNodeUUID = *o.AdditionalReportingNodeUUID
}
qAdditionalReportingNodeUUID := qrAdditionalReportingNodeUUID
if qAdditionalReportingNodeUUID != "" {
if err := r.SetQueryParam("additional_reporting_node.uuid", qAdditionalReportingNodeUUID); err != nil {
return err
}
}
}
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/s_a_n/igroup_nested_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupNestedGetReader is a Reader for the IgroupNestedGet structure.
type IgroupNestedGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupNestedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupNestedGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupNestedGetDefault(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
}
}
// NewIgroupNestedGetOK creates a IgroupNestedGetOK with default headers values
func NewIgroupNestedGetOK() *IgroupNestedGetOK {
return &IgroupNestedGetOK{}
}
/*
IgroupNestedGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupNestedGetOK struct {
Payload *models.IgroupNested
}
// IsSuccess returns true when this igroup nested get o k response has a 2xx status code
func (o *IgroupNestedGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup nested get o k response has a 3xx status code
func (o *IgroupNestedGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup nested get o k response has a 4xx status code
func (o *IgroupNestedGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup nested get o k response has a 5xx status code
func (o *IgroupNestedGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup nested get o k response a status code equal to that given
func (o *IgroupNestedGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupNestedGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroupNestedGetOK %+v", 200, o.Payload)
}
func (o *IgroupNestedGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroupNestedGetOK %+v", 200, o.Payload)
}
func (o *IgroupNestedGetOK) GetPayload() *models.IgroupNested {
return o.Payload
}
func (o *IgroupNestedGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IgroupNested)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupNestedGetDefault creates a IgroupNestedGetDefault with default headers values
func NewIgroupNestedGetDefault(code int) *IgroupNestedGetDefault {
return &IgroupNestedGetDefault{
_statusCode: code,
}
}
/*
IgroupNestedGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4 | The nested initiator group is not a member of the initiator group. |
| 5374852 | The parent initiator group specified in the URI does not exist. |
*/
type IgroupNestedGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup nested get default response
func (o *IgroupNestedGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup nested get default response has a 2xx status code
func (o *IgroupNestedGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup nested get default response has a 3xx status code
func (o *IgroupNestedGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup nested get default response has a 4xx status code
func (o *IgroupNestedGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup nested get default response has a 5xx status code
func (o *IgroupNestedGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup nested get default response a status code equal to that given
func (o *IgroupNestedGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupNestedGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroup_nested_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{igroup.uuid}/igroups/{uuid}][%d] igroup_nested_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupNestedGetDefault) 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/s_a_n/iscsi_credentials_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCredentialsModifyParams creates a new IscsiCredentialsModifyParams 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 NewIscsiCredentialsModifyParams() *IscsiCredentialsModifyParams {
return &IscsiCredentialsModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCredentialsModifyParamsWithTimeout creates a new IscsiCredentialsModifyParams object
// with the ability to set a timeout on a request.
func NewIscsiCredentialsModifyParamsWithTimeout(timeout time.Duration) *IscsiCredentialsModifyParams {
return &IscsiCredentialsModifyParams{
timeout: timeout,
}
}
// NewIscsiCredentialsModifyParamsWithContext creates a new IscsiCredentialsModifyParams object
// with the ability to set a context for a request.
func NewIscsiCredentialsModifyParamsWithContext(ctx context.Context) *IscsiCredentialsModifyParams {
return &IscsiCredentialsModifyParams{
Context: ctx,
}
}
// NewIscsiCredentialsModifyParamsWithHTTPClient creates a new IscsiCredentialsModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCredentialsModifyParamsWithHTTPClient(client *http.Client) *IscsiCredentialsModifyParams {
return &IscsiCredentialsModifyParams{
HTTPClient: client,
}
}
/*
IscsiCredentialsModifyParams contains all the parameters to send to the API endpoint
for the iscsi credentials modify operation.
Typically these are written to a http.Request.
*/
type IscsiCredentialsModifyParams struct {
/* AddInitiatorAddresses.
If _true_, the initiator addresses in the body merge into the existing addresses in the iSCSI security object rather than replace the existing addresses.
*/
AddInitiatorAddresses *bool
/* Info.
The new property values for the iSCSI credentials object.
*/
Info *models.IscsiCredentials
/* Initiator.
The iSCSI initiator of the credentials object.
*/
Initiator string
/* RemoveInitiatorAddresses.
If _true_, the initiator addresses in the body are removed from the existing addresses in the iSCSI security object rather than replace the existing addresses.
*/
RemoveInitiatorAddresses *bool
/* SvmUUID.
The unique identifier of an SVM.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi credentials modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsModifyParams) WithDefaults() *IscsiCredentialsModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi credentials modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsModifyParams) SetDefaults() {
var (
addInitiatorAddressesDefault = bool(false)
removeInitiatorAddressesDefault = bool(false)
)
val := IscsiCredentialsModifyParams{
AddInitiatorAddresses: &addInitiatorAddressesDefault,
RemoveInitiatorAddresses: &removeInitiatorAddressesDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithTimeout(timeout time.Duration) *IscsiCredentialsModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithContext(ctx context.Context) *IscsiCredentialsModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithHTTPClient(client *http.Client) *IscsiCredentialsModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAddInitiatorAddresses adds the addInitiatorAddresses to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithAddInitiatorAddresses(addInitiatorAddresses *bool) *IscsiCredentialsModifyParams {
o.SetAddInitiatorAddresses(addInitiatorAddresses)
return o
}
// SetAddInitiatorAddresses adds the addInitiatorAddresses to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetAddInitiatorAddresses(addInitiatorAddresses *bool) {
o.AddInitiatorAddresses = addInitiatorAddresses
}
// WithInfo adds the info to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithInfo(info *models.IscsiCredentials) *IscsiCredentialsModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetInfo(info *models.IscsiCredentials) {
o.Info = info
}
// WithInitiator adds the initiator to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithInitiator(initiator string) *IscsiCredentialsModifyParams {
o.SetInitiator(initiator)
return o
}
// SetInitiator adds the initiator to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetInitiator(initiator string) {
o.Initiator = initiator
}
// WithRemoveInitiatorAddresses adds the removeInitiatorAddresses to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithRemoveInitiatorAddresses(removeInitiatorAddresses *bool) *IscsiCredentialsModifyParams {
o.SetRemoveInitiatorAddresses(removeInitiatorAddresses)
return o
}
// SetRemoveInitiatorAddresses adds the removeInitiatorAddresses to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetRemoveInitiatorAddresses(removeInitiatorAddresses *bool) {
o.RemoveInitiatorAddresses = removeInitiatorAddresses
}
// WithSvmUUID adds the svmUUID to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) WithSvmUUID(svmUUID string) *IscsiCredentialsModifyParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi credentials modify params
func (o *IscsiCredentialsModifyParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCredentialsModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AddInitiatorAddresses != nil {
// query param add_initiator_addresses
var qrAddInitiatorAddresses bool
if o.AddInitiatorAddresses != nil {
qrAddInitiatorAddresses = *o.AddInitiatorAddresses
}
qAddInitiatorAddresses := swag.FormatBool(qrAddInitiatorAddresses)
if qAddInitiatorAddresses != "" {
if err := r.SetQueryParam("add_initiator_addresses", qAddInitiatorAddresses); err != nil {
return err
}
}
}
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
// path param initiator
if err := r.SetPathParam("initiator", o.Initiator); err != nil {
return err
}
if o.RemoveInitiatorAddresses != nil {
// query param remove_initiator_addresses
var qrRemoveInitiatorAddresses bool
if o.RemoveInitiatorAddresses != nil {
qrRemoveInitiatorAddresses = *o.RemoveInitiatorAddresses
}
qRemoveInitiatorAddresses := swag.FormatBool(qrRemoveInitiatorAddresses)
if qRemoveInitiatorAddresses != "" {
if err := r.SetQueryParam("remove_initiator_addresses", qRemoveInitiatorAddresses); 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/s_a_n/iscsi_credentials_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiCredentialsDeleteReader is a Reader for the IscsiCredentialsDelete structure.
type IscsiCredentialsDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiCredentialsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiCredentialsDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiCredentialsDeleteDefault(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
}
}
// NewIscsiCredentialsDeleteOK creates a IscsiCredentialsDeleteOK with default headers values
func NewIscsiCredentialsDeleteOK() *IscsiCredentialsDeleteOK {
return &IscsiCredentialsDeleteOK{}
}
/*
IscsiCredentialsDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IscsiCredentialsDeleteOK struct {
}
// IsSuccess returns true when this iscsi credentials delete o k response has a 2xx status code
func (o *IscsiCredentialsDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi credentials delete o k response has a 3xx status code
func (o *IscsiCredentialsDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi credentials delete o k response has a 4xx status code
func (o *IscsiCredentialsDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi credentials delete o k response has a 5xx status code
func (o *IscsiCredentialsDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi credentials delete o k response a status code equal to that given
func (o *IscsiCredentialsDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiCredentialsDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsiCredentialsDeleteOK ", 200)
}
func (o *IscsiCredentialsDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsiCredentialsDeleteOK ", 200)
}
func (o *IscsiCredentialsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIscsiCredentialsDeleteDefault creates a IscsiCredentialsDeleteDefault with default headers values
func NewIscsiCredentialsDeleteDefault(code int) *IscsiCredentialsDeleteDefault {
return &IscsiCredentialsDeleteDefault{
_statusCode: code,
}
}
/*
IscsiCredentialsDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 2621706 | Both the SVM UUID and SVM name were supplied, but they do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5374148 | The default security credential cannot be deleted for an SVM. |
| 5374895 | The iSCSI security credential does not exist on the specified SVM. |
*/
type IscsiCredentialsDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi credentials delete default response
func (o *IscsiCredentialsDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi credentials delete default response has a 2xx status code
func (o *IscsiCredentialsDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi credentials delete default response has a 3xx status code
func (o *IscsiCredentialsDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi credentials delete default response has a 4xx status code
func (o *IscsiCredentialsDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi credentials delete default response has a 5xx status code
func (o *IscsiCredentialsDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi credentials delete default response a status code equal to that given
func (o *IscsiCredentialsDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiCredentialsDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsi_credentials_delete default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/credentials/{svm.uuid}/{initiator}][%d] iscsi_credentials_delete default %+v", o._statusCode, o.Payload)
}
func (o *IscsiCredentialsDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiCredentialsDeleteDefault) 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/s_a_n/igroup_nested_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupNestedCreateReader is a Reader for the IgroupNestedCreate structure.
type IgroupNestedCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupNestedCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewIgroupNestedCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupNestedCreateDefault(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
}
}
// NewIgroupNestedCreateCreated creates a IgroupNestedCreateCreated with default headers values
func NewIgroupNestedCreateCreated() *IgroupNestedCreateCreated {
return &IgroupNestedCreateCreated{}
}
/*
IgroupNestedCreateCreated describes a response with status code 201, with default header values.
Created
*/
type IgroupNestedCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.IgroupNestedResponse
}
// IsSuccess returns true when this igroup nested create created response has a 2xx status code
func (o *IgroupNestedCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup nested create created response has a 3xx status code
func (o *IgroupNestedCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup nested create created response has a 4xx status code
func (o *IgroupNestedCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup nested create created response has a 5xx status code
func (o *IgroupNestedCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this igroup nested create created response a status code equal to that given
func (o *IgroupNestedCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *IgroupNestedCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroupNestedCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupNestedCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroupNestedCreateCreated %+v", 201, o.Payload)
}
func (o *IgroupNestedCreateCreated) GetPayload() *models.IgroupNestedResponse {
return o.Payload
}
func (o *IgroupNestedCreateCreated) 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.IgroupNestedResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupNestedCreateDefault creates a IgroupNestedCreateDefault with default headers values
func NewIgroupNestedCreateDefault(code int) *IgroupNestedCreateDefault {
return &IgroupNestedCreateDefault{
_statusCode: code,
}
}
/*
IgroupNestedCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374735 | An attempt was made to add a child igroup that would exceed the maximum allowable depth. |
| 5374736 | A supplied child initiator group already exists in the parent initiator group's hierarchy. |
| 5374737 | A supplied child initiator group already exists in another initiator group's hierarchy. |
| 5374739 | A supplied child initiator group has an operating system type that differs from the parent initiator group. |
| 5374740 | A supplied child initiator group has an protocol that differs from the parent initiator group. |
| 5374741 | A supplied child initiator group is already owned by a different child in the initiator group's hierarchy. |
| 5374742 | A supplied child initiator group contains an initiator that is already owned by another initiator group in the hierarchy. |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupNestedCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup nested create default response
func (o *IgroupNestedCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup nested create default response has a 2xx status code
func (o *IgroupNestedCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup nested create default response has a 3xx status code
func (o *IgroupNestedCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup nested create default response has a 4xx status code
func (o *IgroupNestedCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup nested create default response has a 5xx status code
func (o *IgroupNestedCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup nested create default response a status code equal to that given
func (o *IgroupNestedCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupNestedCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroup_nested_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/igroups/{igroup.uuid}/igroups][%d] igroup_nested_create default %+v", o._statusCode, o.Payload)
}
func (o *IgroupNestedCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupNestedCreateDefault) 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/s_a_n/igroup_initiator_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupInitiatorCollectionGetParams creates a new IgroupInitiatorCollectionGetParams 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 NewIgroupInitiatorCollectionGetParams() *IgroupInitiatorCollectionGetParams {
return &IgroupInitiatorCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupInitiatorCollectionGetParamsWithTimeout creates a new IgroupInitiatorCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIgroupInitiatorCollectionGetParamsWithTimeout(timeout time.Duration) *IgroupInitiatorCollectionGetParams {
return &IgroupInitiatorCollectionGetParams{
timeout: timeout,
}
}
// NewIgroupInitiatorCollectionGetParamsWithContext creates a new IgroupInitiatorCollectionGetParams object
// with the ability to set a context for a request.
func NewIgroupInitiatorCollectionGetParamsWithContext(ctx context.Context) *IgroupInitiatorCollectionGetParams {
return &IgroupInitiatorCollectionGetParams{
Context: ctx,
}
}
// NewIgroupInitiatorCollectionGetParamsWithHTTPClient creates a new IgroupInitiatorCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupInitiatorCollectionGetParamsWithHTTPClient(client *http.Client) *IgroupInitiatorCollectionGetParams {
return &IgroupInitiatorCollectionGetParams{
HTTPClient: client,
}
}
/*
IgroupInitiatorCollectionGetParams contains all the parameters to send to the API endpoint
for the igroup initiator collection get operation.
Typically these are written to a http.Request.
*/
type IgroupInitiatorCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupUUID.
The unique identifier of the initiator group.
*/
IgroupUUID 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
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup initiator collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorCollectionGetParams) WithDefaults() *IgroupInitiatorCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup initiator collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IgroupInitiatorCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithTimeout(timeout time.Duration) *IgroupInitiatorCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithContext(ctx context.Context) *IgroupInitiatorCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithHTTPClient(client *http.Client) *IgroupInitiatorCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithFields(fields []string) *IgroupInitiatorCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithIgroupUUID(igroupUUID string) *IgroupInitiatorCollectionGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithMaxRecords adds the maxRecords to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithMaxRecords(maxRecords *int64) *IgroupInitiatorCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithOrderBy(orderBy []string) *IgroupInitiatorCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithReturnRecords(returnRecords *bool) *IgroupInitiatorCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IgroupInitiatorCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the igroup initiator collection get params
func (o *IgroupInitiatorCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupInitiatorCollectionGetParams) 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 igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); 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 len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIgroupInitiatorCollectionGet binds the parameter fields
func (o *IgroupInitiatorCollectionGetParams) 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
}
// bindParamIgroupInitiatorCollectionGet binds the parameter order_by
func (o *IgroupInitiatorCollectionGetParams) 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/s_a_n/igroup_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupDeleteReader is a Reader for the IgroupDelete structure.
type IgroupDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupDeleteDefault(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
}
}
// NewIgroupDeleteOK creates a IgroupDeleteOK with default headers values
func NewIgroupDeleteOK() *IgroupDeleteOK {
return &IgroupDeleteOK{}
}
/*
IgroupDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IgroupDeleteOK struct {
}
// IsSuccess returns true when this igroup delete o k response has a 2xx status code
func (o *IgroupDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup delete o k response has a 3xx status code
func (o *IgroupDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup delete o k response has a 4xx status code
func (o *IgroupDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup delete o k response has a 5xx status code
func (o *IgroupDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup delete o k response a status code equal to that given
func (o *IgroupDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{uuid}][%d] igroupDeleteOK ", 200)
}
func (o *IgroupDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{uuid}][%d] igroupDeleteOK ", 200)
}
func (o *IgroupDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIgroupDeleteDefault creates a IgroupDeleteDefault with default headers values
func NewIgroupDeleteDefault(code int) *IgroupDeleteDefault {
return &IgroupDeleteDefault{
_statusCode: code,
}
}
/*
IgroupDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254213 | The initiator group is mapped to one or more LUNs and `allow_delete_while_mapped` has not been specified. |
| 5374852 | The initiator group does not exist. |
*/
type IgroupDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup delete default response
func (o *IgroupDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup delete default response has a 2xx status code
func (o *IgroupDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup delete default response has a 3xx status code
func (o *IgroupDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup delete default response has a 4xx status code
func (o *IgroupDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup delete default response has a 5xx status code
func (o *IgroupDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup delete default response a status code equal to that given
func (o *IgroupDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{uuid}][%d] igroup_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{uuid}][%d] igroup_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupDeleteDefault) 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/s_a_n/iscsi_collection_performance_metrics_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_collection_performance_metrics_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCollectionPerformanceMetricsGetParams creates a new IscsiCollectionPerformanceMetricsGetParams 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 NewIscsiCollectionPerformanceMetricsGetParams() *IscsiCollectionPerformanceMetricsGetParams {
return &IscsiCollectionPerformanceMetricsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCollectionPerformanceMetricsGetParamsWithTimeout creates a new IscsiCollectionPerformanceMetricsGetParams object
// with the ability to set a timeout on a request.
func NewIscsiCollectionPerformanceMetricsGetParamsWithTimeout(timeout time.Duration) *IscsiCollectionPerformanceMetricsGetParams {
return &IscsiCollectionPerformanceMetricsGetParams{
timeout: timeout,
}
}
// NewIscsiCollectionPerformanceMetricsGetParamsWithContext creates a new IscsiCollectionPerformanceMetricsGetParams object
// with the ability to set a context for a request.
func NewIscsiCollectionPerformanceMetricsGetParamsWithContext(ctx context.Context) *IscsiCollectionPerformanceMetricsGetParams {
return &IscsiCollectionPerformanceMetricsGetParams{
Context: ctx,
}
}
// NewIscsiCollectionPerformanceMetricsGetParamsWithHTTPClient creates a new IscsiCollectionPerformanceMetricsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCollectionPerformanceMetricsGetParamsWithHTTPClient(client *http.Client) *IscsiCollectionPerformanceMetricsGetParams {
return &IscsiCollectionPerformanceMetricsGetParams{
HTTPClient: client,
}
}
/*
IscsiCollectionPerformanceMetricsGetParams contains all the parameters to send to the API endpoint
for the iscsi collection performance metrics get operation.
Typically these are written to a http.Request.
*/
type IscsiCollectionPerformanceMetricsGetParams struct {
/* Duration.
Filter by duration
*/
Duration *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Interval.
The time range for the data. Examples can be 1h, 1d, 1m, 1w, 1y.
The period for each time range is as follows:
* 1h: Metrics over the most recent hour sampled over 15 seconds.
* 1d: Metrics over the most recent day sampled over 5 minutes.
* 1w: Metrics over the most recent week sampled over 30 minutes.
* 1m: Metrics over the most recent month sampled over 2 hours.
* 1y: Metrics over the most recent year sampled over a day.
Default: "1h"
*/
Interval *string
/* IopsOther.
Filter by iops.other
*/
IopsOther *int64
/* IopsRead.
Filter by iops.read
*/
IopsRead *int64
/* IopsTotal.
Filter by iops.total
*/
IopsTotal *int64
/* IopsWrite.
Filter by iops.write
*/
IopsWrite *int64
/* LatencyOther.
Filter by latency.other
*/
LatencyOther *int64
/* LatencyRead.
Filter by latency.read
*/
LatencyRead *int64
/* LatencyTotal.
Filter by latency.total
*/
LatencyTotal *int64
/* LatencyWrite.
Filter by latency.write
*/
LatencyWrite *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
/* Status.
Filter by status
*/
Status *string
/* SvmUUID.
The unique identifier of the SVM.
*/
SvmUUID string
/* ThroughputRead.
Filter by throughput.read
*/
ThroughputRead *int64
/* ThroughputTotal.
Filter by throughput.total
*/
ThroughputTotal *int64
/* ThroughputWrite.
Filter by throughput.write
*/
ThroughputWrite *int64
/* Timestamp.
Filter by timestamp
*/
Timestamp *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCollectionPerformanceMetricsGetParams) WithDefaults() *IscsiCollectionPerformanceMetricsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCollectionPerformanceMetricsGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IscsiCollectionPerformanceMetricsGetParams{
Interval: &intervalDefault,
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithTimeout(timeout time.Duration) *IscsiCollectionPerformanceMetricsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithContext(ctx context.Context) *IscsiCollectionPerformanceMetricsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithHTTPClient(client *http.Client) *IscsiCollectionPerformanceMetricsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithDuration(duration *string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithFields(fields []string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithInterval(interval *string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithIopsOther(iopsOther *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithIopsRead(iopsRead *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithIopsTotal(iopsTotal *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithIopsWrite(iopsWrite *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithLatencyOther(latencyOther *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithLatencyRead(latencyRead *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithLatencyTotal(latencyTotal *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithLatencyWrite(latencyWrite *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithMaxRecords(maxRecords *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithOrderBy(orderBy []string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithReturnRecords(returnRecords *bool) *IscsiCollectionPerformanceMetricsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithReturnTimeout(returnTimeout *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithStatus(status *string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetStatus(status *string) {
o.Status = status
}
// WithSvmUUID adds the svmUUID to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithSvmUUID(svmUUID string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WithThroughputRead adds the throughputRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithThroughputRead(throughputRead *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithThroughputTotal(throughputTotal *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithThroughputWrite(throughputWrite *int64) *IscsiCollectionPerformanceMetricsGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) WithTimestamp(timestamp *string) *IscsiCollectionPerformanceMetricsGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the iscsi collection performance metrics get params
func (o *IscsiCollectionPerformanceMetricsGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCollectionPerformanceMetricsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Duration != nil {
// query param duration
var qrDuration string
if o.Duration != nil {
qrDuration = *o.Duration
}
qDuration := qrDuration
if qDuration != "" {
if err := r.SetQueryParam("duration", qDuration); 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.Interval != nil {
// query param interval
var qrInterval string
if o.Interval != nil {
qrInterval = *o.Interval
}
qInterval := qrInterval
if qInterval != "" {
if err := r.SetQueryParam("interval", qInterval); err != nil {
return err
}
}
}
if o.IopsOther != nil {
// query param iops.other
var qrIopsOther int64
if o.IopsOther != nil {
qrIopsOther = *o.IopsOther
}
qIopsOther := swag.FormatInt64(qrIopsOther)
if qIopsOther != "" {
if err := r.SetQueryParam("iops.other", qIopsOther); 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.IopsTotal != nil {
// query param iops.total
var qrIopsTotal int64
if o.IopsTotal != nil {
qrIopsTotal = *o.IopsTotal
}
qIopsTotal := swag.FormatInt64(qrIopsTotal)
if qIopsTotal != "" {
if err := r.SetQueryParam("iops.total", qIopsTotal); 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.LatencyOther != nil {
// query param latency.other
var qrLatencyOther int64
if o.LatencyOther != nil {
qrLatencyOther = *o.LatencyOther
}
qLatencyOther := swag.FormatInt64(qrLatencyOther)
if qLatencyOther != "" {
if err := r.SetQueryParam("latency.other", qLatencyOther); err != nil {
return err
}
}
}
if o.LatencyRead != nil {
// query param latency.read
var qrLatencyRead int64
if o.LatencyRead != nil {
qrLatencyRead = *o.LatencyRead
}
qLatencyRead := swag.FormatInt64(qrLatencyRead)
if qLatencyRead != "" {
if err := r.SetQueryParam("latency.read", qLatencyRead); err != nil {
return err
}
}
}
if o.LatencyTotal != nil {
// query param latency.total
var qrLatencyTotal int64
if o.LatencyTotal != nil {
qrLatencyTotal = *o.LatencyTotal
}
qLatencyTotal := swag.FormatInt64(qrLatencyTotal)
if qLatencyTotal != "" {
if err := r.SetQueryParam("latency.total", qLatencyTotal); err != nil {
return err
}
}
}
if o.LatencyWrite != nil {
// query param latency.write
var qrLatencyWrite int64
if o.LatencyWrite != nil {
qrLatencyWrite = *o.LatencyWrite
}
qLatencyWrite := swag.FormatInt64(qrLatencyWrite)
if qLatencyWrite != "" {
if err := r.SetQueryParam("latency.write", qLatencyWrite); 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.Status != nil {
// query param status
var qrStatus string
if o.Status != nil {
qrStatus = *o.Status
}
qStatus := qrStatus
if qStatus != "" {
if err := r.SetQueryParam("status", qStatus); err != nil {
return err
}
}
}
// path param svm.uuid
if err := r.SetPathParam("svm.uuid", o.SvmUUID); 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.ThroughputTotal != nil {
// query param throughput.total
var qrThroughputTotal int64
if o.ThroughputTotal != nil {
qrThroughputTotal = *o.ThroughputTotal
}
qThroughputTotal := swag.FormatInt64(qrThroughputTotal)
if qThroughputTotal != "" {
if err := r.SetQueryParam("throughput.total", qThroughputTotal); 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.Timestamp != nil {
// query param timestamp
var qrTimestamp string
if o.Timestamp != nil {
qrTimestamp = *o.Timestamp
}
qTimestamp := qrTimestamp
if qTimestamp != "" {
if err := r.SetQueryParam("timestamp", qTimestamp); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIscsiCollectionPerformanceMetricsGet binds the parameter fields
func (o *IscsiCollectionPerformanceMetricsGetParams) 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
}
// bindParamIscsiCollectionPerformanceMetricsGet binds the parameter order_by
func (o *IscsiCollectionPerformanceMetricsGetParams) 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/s_a_n/lun_attribute_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunAttributeGetParams creates a new LunAttributeGetParams 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 NewLunAttributeGetParams() *LunAttributeGetParams {
return &LunAttributeGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunAttributeGetParamsWithTimeout creates a new LunAttributeGetParams object
// with the ability to set a timeout on a request.
func NewLunAttributeGetParamsWithTimeout(timeout time.Duration) *LunAttributeGetParams {
return &LunAttributeGetParams{
timeout: timeout,
}
}
// NewLunAttributeGetParamsWithContext creates a new LunAttributeGetParams object
// with the ability to set a context for a request.
func NewLunAttributeGetParamsWithContext(ctx context.Context) *LunAttributeGetParams {
return &LunAttributeGetParams{
Context: ctx,
}
}
// NewLunAttributeGetParamsWithHTTPClient creates a new LunAttributeGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunAttributeGetParamsWithHTTPClient(client *http.Client) *LunAttributeGetParams {
return &LunAttributeGetParams{
HTTPClient: client,
}
}
/*
LunAttributeGetParams contains all the parameters to send to the API endpoint
for the lun attribute get operation.
Typically these are written to a http.Request.
*/
type LunAttributeGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
/* Name.
The name of the attribute.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun attribute get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeGetParams) WithDefaults() *LunAttributeGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun attribute get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun attribute get params
func (o *LunAttributeGetParams) WithTimeout(timeout time.Duration) *LunAttributeGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun attribute get params
func (o *LunAttributeGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun attribute get params
func (o *LunAttributeGetParams) WithContext(ctx context.Context) *LunAttributeGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun attribute get params
func (o *LunAttributeGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun attribute get params
func (o *LunAttributeGetParams) WithHTTPClient(client *http.Client) *LunAttributeGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun attribute get params
func (o *LunAttributeGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the lun attribute get params
func (o *LunAttributeGetParams) WithFields(fields []string) *LunAttributeGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun attribute get params
func (o *LunAttributeGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithLunUUID adds the lunUUID to the lun attribute get params
func (o *LunAttributeGetParams) WithLunUUID(lunUUID string) *LunAttributeGetParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun attribute get params
func (o *LunAttributeGetParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithName adds the name to the lun attribute get params
func (o *LunAttributeGetParams) WithName(name string) *LunAttributeGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the lun attribute get params
func (o *LunAttributeGetParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *LunAttributeGetParams) 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 lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); err != nil {
return err
}
// path param name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamLunAttributeGet binds the parameter fields
func (o *LunAttributeGetParams) 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/s_a_n/lun_attribute_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewLunAttributeModifyParams creates a new LunAttributeModifyParams 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 NewLunAttributeModifyParams() *LunAttributeModifyParams {
return &LunAttributeModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunAttributeModifyParamsWithTimeout creates a new LunAttributeModifyParams object
// with the ability to set a timeout on a request.
func NewLunAttributeModifyParamsWithTimeout(timeout time.Duration) *LunAttributeModifyParams {
return &LunAttributeModifyParams{
timeout: timeout,
}
}
// NewLunAttributeModifyParamsWithContext creates a new LunAttributeModifyParams object
// with the ability to set a context for a request.
func NewLunAttributeModifyParamsWithContext(ctx context.Context) *LunAttributeModifyParams {
return &LunAttributeModifyParams{
Context: ctx,
}
}
// NewLunAttributeModifyParamsWithHTTPClient creates a new LunAttributeModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunAttributeModifyParamsWithHTTPClient(client *http.Client) *LunAttributeModifyParams {
return &LunAttributeModifyParams{
HTTPClient: client,
}
}
/*
LunAttributeModifyParams contains all the parameters to send to the API endpoint
for the lun attribute modify operation.
Typically these are written to a http.Request.
*/
type LunAttributeModifyParams struct {
/* Info.
The new property values for the LUN.
*/
Info *models.LunAttribute
/* LunUUID.
The unique identifier of the LUN.
*/
LunUUID string
/* Name.
The name of the attribute.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun attribute modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeModifyParams) WithDefaults() *LunAttributeModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun attribute modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunAttributeModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun attribute modify params
func (o *LunAttributeModifyParams) WithTimeout(timeout time.Duration) *LunAttributeModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun attribute modify params
func (o *LunAttributeModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun attribute modify params
func (o *LunAttributeModifyParams) WithContext(ctx context.Context) *LunAttributeModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun attribute modify params
func (o *LunAttributeModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun attribute modify params
func (o *LunAttributeModifyParams) WithHTTPClient(client *http.Client) *LunAttributeModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun attribute modify params
func (o *LunAttributeModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the lun attribute modify params
func (o *LunAttributeModifyParams) WithInfo(info *models.LunAttribute) *LunAttributeModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun attribute modify params
func (o *LunAttributeModifyParams) SetInfo(info *models.LunAttribute) {
o.Info = info
}
// WithLunUUID adds the lunUUID to the lun attribute modify params
func (o *LunAttributeModifyParams) WithLunUUID(lunUUID string) *LunAttributeModifyParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun attribute modify params
func (o *LunAttributeModifyParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithName adds the name to the lun attribute modify params
func (o *LunAttributeModifyParams) WithName(name string) *LunAttributeModifyParams {
o.SetName(name)
return o
}
// SetName adds the name to the lun attribute modify params
func (o *LunAttributeModifyParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *LunAttributeModifyParams) 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 lun.uuid
if err := r.SetPathParam("lun.uuid", o.LunUUID); err != nil {
return err
}
// path param name
if err := r.SetPathParam("name", o.Name); 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/s_a_n/lun_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunCreateReader is a Reader for the LunCreate structure.
type LunCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewLunCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunCreateDefault(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
}
}
// NewLunCreateCreated creates a LunCreateCreated with default headers values
func NewLunCreateCreated() *LunCreateCreated {
return &LunCreateCreated{}
}
/*
LunCreateCreated describes a response with status code 201, with default header values.
Created
*/
type LunCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.LunResponse
}
// IsSuccess returns true when this lun create created response has a 2xx status code
func (o *LunCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun create created response has a 3xx status code
func (o *LunCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun create created response has a 4xx status code
func (o *LunCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this lun create created response has a 5xx status code
func (o *LunCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this lun create created response a status code equal to that given
func (o *LunCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *LunCreateCreated) Error() string {
return fmt.Sprintf("[POST /storage/luns][%d] lunCreateCreated %+v", 201, o.Payload)
}
func (o *LunCreateCreated) String() string {
return fmt.Sprintf("[POST /storage/luns][%d] lunCreateCreated %+v", 201, o.Payload)
}
func (o *LunCreateCreated) GetPayload() *models.LunResponse {
return o.Payload
}
func (o *LunCreateCreated) 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.LunResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunCreateDefault creates a LunCreateDefault with default headers values
func NewLunCreateDefault(code int) *LunCreateDefault {
return &LunCreateDefault{
_statusCode: code,
}
}
/*
LunCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 917927 | The specified volume was not found. |
| 918236 | The specified `location.volume.uuid` and `location.volume.name` do not refer to the same volume. |
| 2621462 | The specified SVM does not exist. |
| 2621706 | The specified `svm.uuid` and `svm.name` do not refer to the same SVM. |
| 2621707 | No SVM was specified. Either `svm.name` or `svm.uuid` must be supplied. |
| 5242927 | The specified qtree was not found. |
| 5242950 | The specified `location.qtree.id` and `location.qtree.name` do not refer to the same qtree. |
| 5374121 | A LUN name can only contain characters A-Z, a-z, 0-9, "-", ".", "_", "{" and "}". |
| 5374123 | A negative size was provided for the LUN. |
| 5374124 | The specified size is too small for the LUN. |
| 5374125 | The specified size is too large for the LUN. |
| 5374129 | LUNs cannot be created on a load sharing mirror volume. |
| 5374130 | An invalid size value was provided. |
| 5374237 | LUNs cannot be created on an SVM root volume. |
| 5374238 | LUNs cannot be created in Snapshot copies. |
| 5374241 | A size value with invalid units was provided. |
| 5374242 | A LUN or NVMe namespace already exists at the specified path. |
| 5374352 | An invalid name was provided for the LUN. |
| 5374707 | Creating a LUN in the specific volume is not allowed because the volume is reserved for an application. |
| 5374858 | The volume specified by `name` is not the same as that specified by `location.volume`. |
| 5374859 | No volume was specified for the LUN. |
| 5374860 | The qtree specified by `name` is not the same as that specified by `location.qtree`. |
| 5374861 | The LUN base name specified by `name` is not the same as that specified by `location.logical_unit`. |
| 5374862 | No LUN path base name was provided for the LUN. |
| 5374863 | An error occurred after successfully creating the LUN. Some properties were not set. |
| 5374874 | The specified `clone.source.uuid` and `clone.source.name` do not refer to the same LUN. |
| 5374875 | The specified `clone.source` was not found. |
| 5374876 | The specified `clone.source` was not found. |
| 5374883 | The property cannot be specified when creating a LUN clone. The `target` property of the error object identifies the property. |
| 5374884 | A property that is required when creating a new LUN that is not a LUN clone or LUN copy was not supplied. The `target` property of the error object identifies the property. |
| 5374886 | An error occurred after successfully creating the LUN preventing the retrieval of its properties. |
| 5374899 | The `clone.source.uuid` property is not supported when specifying a source LUN from a Snapshot copy. |
| 5374928 | An incomplete attribute name/value pair was supplied. |
| 5374929 | The combined sizes of an attribute name and value are too large. |
| 5374932 | A name for an attribute was duplicated. |
| 5374942 | The property cannot be specified at the same time when creating a LUN as a clone. The `target` property of the error object identifies the other property given with clone. |
| 5374943 | The property cannot be specified at the same time when creating a LUN as a copy. The `target` property of the error object identifies the other property given with copy. |
| 5374944 | The property cannot be specified when converting an NVMe namespace into a LUN. The `target` property of the error object identifies the property. |
| 7018877 | Maximum combined total (50) of file and LUN copy and move operations reached. When one or more of the operations has completed, try the command again. |
| 13565952 | The LUN clone request failed. |
| 72089755 | NVMe namespace with a block size of 4096 bytes cannot be converted to a LUN. |
| 72089756 | Namespace is currently mapped to subsystem. |
| 72089757 | NVMe namespace in a Snapshot copy cannot be converted to a LUN. |
*/
type LunCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun create default response
func (o *LunCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun create default response has a 2xx status code
func (o *LunCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun create default response has a 3xx status code
func (o *LunCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun create default response has a 4xx status code
func (o *LunCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun create default response has a 5xx status code
func (o *LunCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun create default response a status code equal to that given
func (o *LunCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunCreateDefault) Error() string {
return fmt.Sprintf("[POST /storage/luns][%d] lun_create default %+v", o._statusCode, o.Payload)
}
func (o *LunCreateDefault) String() string {
return fmt.Sprintf("[POST /storage/luns][%d] lun_create default %+v", o._statusCode, o.Payload)
}
func (o *LunCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunCreateDefault) 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/s_a_n/fcp_service_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcpServiceCollectionGetParams creates a new FcpServiceCollectionGetParams 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 NewFcpServiceCollectionGetParams() *FcpServiceCollectionGetParams {
return &FcpServiceCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcpServiceCollectionGetParamsWithTimeout creates a new FcpServiceCollectionGetParams object
// with the ability to set a timeout on a request.
func NewFcpServiceCollectionGetParamsWithTimeout(timeout time.Duration) *FcpServiceCollectionGetParams {
return &FcpServiceCollectionGetParams{
timeout: timeout,
}
}
// NewFcpServiceCollectionGetParamsWithContext creates a new FcpServiceCollectionGetParams object
// with the ability to set a context for a request.
func NewFcpServiceCollectionGetParamsWithContext(ctx context.Context) *FcpServiceCollectionGetParams {
return &FcpServiceCollectionGetParams{
Context: ctx,
}
}
// NewFcpServiceCollectionGetParamsWithHTTPClient creates a new FcpServiceCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcpServiceCollectionGetParamsWithHTTPClient(client *http.Client) *FcpServiceCollectionGetParams {
return &FcpServiceCollectionGetParams{
HTTPClient: client,
}
}
/*
FcpServiceCollectionGetParams contains all the parameters to send to the API endpoint
for the fcp service collection get operation.
Typically these are written to a http.Request.
*/
type FcpServiceCollectionGetParams struct {
/* Enabled.
Filter by enabled
*/
Enabled *bool
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* MetricDuration.
Filter by metric.duration
*/
MetricDuration *string
/* MetricIopsOther.
Filter by metric.iops.other
*/
MetricIopsOther *int64
/* MetricIopsRead.
Filter by metric.iops.read
*/
MetricIopsRead *int64
/* MetricIopsTotal.
Filter by metric.iops.total
*/
MetricIopsTotal *int64
/* MetricIopsWrite.
Filter by metric.iops.write
*/
MetricIopsWrite *int64
/* MetricLatencyOther.
Filter by metric.latency.other
*/
MetricLatencyOther *int64
/* MetricLatencyRead.
Filter by metric.latency.read
*/
MetricLatencyRead *int64
/* MetricLatencyTotal.
Filter by metric.latency.total
*/
MetricLatencyTotal *int64
/* MetricLatencyWrite.
Filter by metric.latency.write
*/
MetricLatencyWrite *int64
/* MetricStatus.
Filter by metric.status
*/
MetricStatus *string
/* MetricThroughputRead.
Filter by metric.throughput.read
*/
MetricThroughputRead *int64
/* MetricThroughputTotal.
Filter by metric.throughput.total
*/
MetricThroughputTotal *int64
/* MetricThroughputWrite.
Filter by metric.throughput.write
*/
MetricThroughputWrite *int64
/* MetricTimestamp.
Filter by metric.timestamp
*/
MetricTimestamp *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
/* StatisticsIopsRawOther.
Filter by statistics.iops_raw.other
*/
StatisticsIopsRawOther *int64
/* StatisticsIopsRawRead.
Filter by statistics.iops_raw.read
*/
StatisticsIopsRawRead *int64
/* StatisticsIopsRawTotal.
Filter by statistics.iops_raw.total
*/
StatisticsIopsRawTotal *int64
/* StatisticsIopsRawWrite.
Filter by statistics.iops_raw.write
*/
StatisticsIopsRawWrite *int64
/* StatisticsLatencyRawOther.
Filter by statistics.latency_raw.other
*/
StatisticsLatencyRawOther *int64
/* StatisticsLatencyRawRead.
Filter by statistics.latency_raw.read
*/
StatisticsLatencyRawRead *int64
/* StatisticsLatencyRawTotal.
Filter by statistics.latency_raw.total
*/
StatisticsLatencyRawTotal *int64
/* StatisticsLatencyRawWrite.
Filter by statistics.latency_raw.write
*/
StatisticsLatencyRawWrite *int64
/* StatisticsStatus.
Filter by statistics.status
*/
StatisticsStatus *string
/* StatisticsThroughputRawRead.
Filter by statistics.throughput_raw.read
*/
StatisticsThroughputRawRead *int64
/* StatisticsThroughputRawTotal.
Filter by statistics.throughput_raw.total
*/
StatisticsThroughputRawTotal *int64
/* StatisticsThroughputRawWrite.
Filter by statistics.throughput_raw.write
*/
StatisticsThroughputRawWrite *int64
/* StatisticsTimestamp.
Filter by statistics.timestamp
*/
StatisticsTimestamp *string
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
/* TargetName.
Filter by target.name
*/
TargetName *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fcp service collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceCollectionGetParams) WithDefaults() *FcpServiceCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fcp service collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FcpServiceCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithTimeout(timeout time.Duration) *FcpServiceCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithContext(ctx context.Context) *FcpServiceCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithHTTPClient(client *http.Client) *FcpServiceCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEnabled adds the enabled to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithEnabled(enabled *bool) *FcpServiceCollectionGetParams {
o.SetEnabled(enabled)
return o
}
// SetEnabled adds the enabled to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetEnabled(enabled *bool) {
o.Enabled = enabled
}
// WithFields adds the fields to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithFields(fields []string) *FcpServiceCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMaxRecords(maxRecords *int64) *FcpServiceCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMetricDuration adds the metricDuration to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricDuration(metricDuration *string) *FcpServiceCollectionGetParams {
o.SetMetricDuration(metricDuration)
return o
}
// SetMetricDuration adds the metricDuration to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricDuration(metricDuration *string) {
o.MetricDuration = metricDuration
}
// WithMetricIopsOther adds the metricIopsOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricIopsOther(metricIopsOther *int64) *FcpServiceCollectionGetParams {
o.SetMetricIopsOther(metricIopsOther)
return o
}
// SetMetricIopsOther adds the metricIopsOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricIopsOther(metricIopsOther *int64) {
o.MetricIopsOther = metricIopsOther
}
// WithMetricIopsRead adds the metricIopsRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricIopsRead(metricIopsRead *int64) *FcpServiceCollectionGetParams {
o.SetMetricIopsRead(metricIopsRead)
return o
}
// SetMetricIopsRead adds the metricIopsRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricIopsRead(metricIopsRead *int64) {
o.MetricIopsRead = metricIopsRead
}
// WithMetricIopsTotal adds the metricIopsTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricIopsTotal(metricIopsTotal *int64) *FcpServiceCollectionGetParams {
o.SetMetricIopsTotal(metricIopsTotal)
return o
}
// SetMetricIopsTotal adds the metricIopsTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricIopsTotal(metricIopsTotal *int64) {
o.MetricIopsTotal = metricIopsTotal
}
// WithMetricIopsWrite adds the metricIopsWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricIopsWrite(metricIopsWrite *int64) *FcpServiceCollectionGetParams {
o.SetMetricIopsWrite(metricIopsWrite)
return o
}
// SetMetricIopsWrite adds the metricIopsWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricIopsWrite(metricIopsWrite *int64) {
o.MetricIopsWrite = metricIopsWrite
}
// WithMetricLatencyOther adds the metricLatencyOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricLatencyOther(metricLatencyOther *int64) *FcpServiceCollectionGetParams {
o.SetMetricLatencyOther(metricLatencyOther)
return o
}
// SetMetricLatencyOther adds the metricLatencyOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricLatencyOther(metricLatencyOther *int64) {
o.MetricLatencyOther = metricLatencyOther
}
// WithMetricLatencyRead adds the metricLatencyRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricLatencyRead(metricLatencyRead *int64) *FcpServiceCollectionGetParams {
o.SetMetricLatencyRead(metricLatencyRead)
return o
}
// SetMetricLatencyRead adds the metricLatencyRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricLatencyRead(metricLatencyRead *int64) {
o.MetricLatencyRead = metricLatencyRead
}
// WithMetricLatencyTotal adds the metricLatencyTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricLatencyTotal(metricLatencyTotal *int64) *FcpServiceCollectionGetParams {
o.SetMetricLatencyTotal(metricLatencyTotal)
return o
}
// SetMetricLatencyTotal adds the metricLatencyTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricLatencyTotal(metricLatencyTotal *int64) {
o.MetricLatencyTotal = metricLatencyTotal
}
// WithMetricLatencyWrite adds the metricLatencyWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricLatencyWrite(metricLatencyWrite *int64) *FcpServiceCollectionGetParams {
o.SetMetricLatencyWrite(metricLatencyWrite)
return o
}
// SetMetricLatencyWrite adds the metricLatencyWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricLatencyWrite(metricLatencyWrite *int64) {
o.MetricLatencyWrite = metricLatencyWrite
}
// WithMetricStatus adds the metricStatus to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricStatus(metricStatus *string) *FcpServiceCollectionGetParams {
o.SetMetricStatus(metricStatus)
return o
}
// SetMetricStatus adds the metricStatus to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricStatus(metricStatus *string) {
o.MetricStatus = metricStatus
}
// WithMetricThroughputRead adds the metricThroughputRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricThroughputRead(metricThroughputRead *int64) *FcpServiceCollectionGetParams {
o.SetMetricThroughputRead(metricThroughputRead)
return o
}
// SetMetricThroughputRead adds the metricThroughputRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricThroughputRead(metricThroughputRead *int64) {
o.MetricThroughputRead = metricThroughputRead
}
// WithMetricThroughputTotal adds the metricThroughputTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricThroughputTotal(metricThroughputTotal *int64) *FcpServiceCollectionGetParams {
o.SetMetricThroughputTotal(metricThroughputTotal)
return o
}
// SetMetricThroughputTotal adds the metricThroughputTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricThroughputTotal(metricThroughputTotal *int64) {
o.MetricThroughputTotal = metricThroughputTotal
}
// WithMetricThroughputWrite adds the metricThroughputWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricThroughputWrite(metricThroughputWrite *int64) *FcpServiceCollectionGetParams {
o.SetMetricThroughputWrite(metricThroughputWrite)
return o
}
// SetMetricThroughputWrite adds the metricThroughputWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricThroughputWrite(metricThroughputWrite *int64) {
o.MetricThroughputWrite = metricThroughputWrite
}
// WithMetricTimestamp adds the metricTimestamp to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithMetricTimestamp(metricTimestamp *string) *FcpServiceCollectionGetParams {
o.SetMetricTimestamp(metricTimestamp)
return o
}
// SetMetricTimestamp adds the metricTimestamp to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetMetricTimestamp(metricTimestamp *string) {
o.MetricTimestamp = metricTimestamp
}
// WithOrderBy adds the orderBy to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithOrderBy(orderBy []string) *FcpServiceCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithReturnRecords(returnRecords *bool) *FcpServiceCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *FcpServiceCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatisticsIopsRawOther adds the statisticsIopsRawOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsIopsRawOther(statisticsIopsRawOther *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsIopsRawOther(statisticsIopsRawOther)
return o
}
// SetStatisticsIopsRawOther adds the statisticsIopsRawOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsIopsRawOther(statisticsIopsRawOther *int64) {
o.StatisticsIopsRawOther = statisticsIopsRawOther
}
// WithStatisticsIopsRawRead adds the statisticsIopsRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsIopsRawRead(statisticsIopsRawRead *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsIopsRawRead(statisticsIopsRawRead)
return o
}
// SetStatisticsIopsRawRead adds the statisticsIopsRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsIopsRawRead(statisticsIopsRawRead *int64) {
o.StatisticsIopsRawRead = statisticsIopsRawRead
}
// WithStatisticsIopsRawTotal adds the statisticsIopsRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsIopsRawTotal(statisticsIopsRawTotal *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsIopsRawTotal(statisticsIopsRawTotal)
return o
}
// SetStatisticsIopsRawTotal adds the statisticsIopsRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsIopsRawTotal(statisticsIopsRawTotal *int64) {
o.StatisticsIopsRawTotal = statisticsIopsRawTotal
}
// WithStatisticsIopsRawWrite adds the statisticsIopsRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsIopsRawWrite(statisticsIopsRawWrite *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsIopsRawWrite(statisticsIopsRawWrite)
return o
}
// SetStatisticsIopsRawWrite adds the statisticsIopsRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsIopsRawWrite(statisticsIopsRawWrite *int64) {
o.StatisticsIopsRawWrite = statisticsIopsRawWrite
}
// WithStatisticsLatencyRawOther adds the statisticsLatencyRawOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsLatencyRawOther(statisticsLatencyRawOther *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsLatencyRawOther(statisticsLatencyRawOther)
return o
}
// SetStatisticsLatencyRawOther adds the statisticsLatencyRawOther to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsLatencyRawOther(statisticsLatencyRawOther *int64) {
o.StatisticsLatencyRawOther = statisticsLatencyRawOther
}
// WithStatisticsLatencyRawRead adds the statisticsLatencyRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsLatencyRawRead(statisticsLatencyRawRead *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsLatencyRawRead(statisticsLatencyRawRead)
return o
}
// SetStatisticsLatencyRawRead adds the statisticsLatencyRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsLatencyRawRead(statisticsLatencyRawRead *int64) {
o.StatisticsLatencyRawRead = statisticsLatencyRawRead
}
// WithStatisticsLatencyRawTotal adds the statisticsLatencyRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsLatencyRawTotal(statisticsLatencyRawTotal *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsLatencyRawTotal(statisticsLatencyRawTotal)
return o
}
// SetStatisticsLatencyRawTotal adds the statisticsLatencyRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsLatencyRawTotal(statisticsLatencyRawTotal *int64) {
o.StatisticsLatencyRawTotal = statisticsLatencyRawTotal
}
// WithStatisticsLatencyRawWrite adds the statisticsLatencyRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsLatencyRawWrite(statisticsLatencyRawWrite *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsLatencyRawWrite(statisticsLatencyRawWrite)
return o
}
// SetStatisticsLatencyRawWrite adds the statisticsLatencyRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsLatencyRawWrite(statisticsLatencyRawWrite *int64) {
o.StatisticsLatencyRawWrite = statisticsLatencyRawWrite
}
// WithStatisticsStatus adds the statisticsStatus to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsStatus(statisticsStatus *string) *FcpServiceCollectionGetParams {
o.SetStatisticsStatus(statisticsStatus)
return o
}
// SetStatisticsStatus adds the statisticsStatus to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsStatus(statisticsStatus *string) {
o.StatisticsStatus = statisticsStatus
}
// WithStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsThroughputRawRead(statisticsThroughputRawRead)
return o
}
// SetStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) {
o.StatisticsThroughputRawRead = statisticsThroughputRawRead
}
// WithStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal)
return o
}
// SetStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) {
o.StatisticsThroughputRawTotal = statisticsThroughputRawTotal
}
// WithStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) *FcpServiceCollectionGetParams {
o.SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite)
return o
}
// SetStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) {
o.StatisticsThroughputRawWrite = statisticsThroughputRawWrite
}
// WithStatisticsTimestamp adds the statisticsTimestamp to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithStatisticsTimestamp(statisticsTimestamp *string) *FcpServiceCollectionGetParams {
o.SetStatisticsTimestamp(statisticsTimestamp)
return o
}
// SetStatisticsTimestamp adds the statisticsTimestamp to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetStatisticsTimestamp(statisticsTimestamp *string) {
o.StatisticsTimestamp = statisticsTimestamp
}
// WithSvmName adds the svmName to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithSvmName(svmName *string) *FcpServiceCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithSvmUUID(svmUUID *string) *FcpServiceCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithTargetName adds the targetName to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) WithTargetName(targetName *string) *FcpServiceCollectionGetParams {
o.SetTargetName(targetName)
return o
}
// SetTargetName adds the targetName to the fcp service collection get params
func (o *FcpServiceCollectionGetParams) SetTargetName(targetName *string) {
o.TargetName = targetName
}
// WriteToRequest writes these params to a swagger request
func (o *FcpServiceCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Enabled != nil {
// query param enabled
var qrEnabled bool
if o.Enabled != nil {
qrEnabled = *o.Enabled
}
qEnabled := swag.FormatBool(qrEnabled)
if qEnabled != "" {
if err := r.SetQueryParam("enabled", qEnabled); 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.MetricDuration != nil {
// query param metric.duration
var qrMetricDuration string
if o.MetricDuration != nil {
qrMetricDuration = *o.MetricDuration
}
qMetricDuration := qrMetricDuration
if qMetricDuration != "" {
if err := r.SetQueryParam("metric.duration", qMetricDuration); err != nil {
return err
}
}
}
if o.MetricIopsOther != nil {
// query param metric.iops.other
var qrMetricIopsOther int64
if o.MetricIopsOther != nil {
qrMetricIopsOther = *o.MetricIopsOther
}
qMetricIopsOther := swag.FormatInt64(qrMetricIopsOther)
if qMetricIopsOther != "" {
if err := r.SetQueryParam("metric.iops.other", qMetricIopsOther); err != nil {
return err
}
}
}
if o.MetricIopsRead != nil {
// query param metric.iops.read
var qrMetricIopsRead int64
if o.MetricIopsRead != nil {
qrMetricIopsRead = *o.MetricIopsRead
}
qMetricIopsRead := swag.FormatInt64(qrMetricIopsRead)
if qMetricIopsRead != "" {
if err := r.SetQueryParam("metric.iops.read", qMetricIopsRead); err != nil {
return err
}
}
}
if o.MetricIopsTotal != nil {
// query param metric.iops.total
var qrMetricIopsTotal int64
if o.MetricIopsTotal != nil {
qrMetricIopsTotal = *o.MetricIopsTotal
}
qMetricIopsTotal := swag.FormatInt64(qrMetricIopsTotal)
if qMetricIopsTotal != "" {
if err := r.SetQueryParam("metric.iops.total", qMetricIopsTotal); err != nil {
return err
}
}
}
if o.MetricIopsWrite != nil {
// query param metric.iops.write
var qrMetricIopsWrite int64
if o.MetricIopsWrite != nil {
qrMetricIopsWrite = *o.MetricIopsWrite
}
qMetricIopsWrite := swag.FormatInt64(qrMetricIopsWrite)
if qMetricIopsWrite != "" {
if err := r.SetQueryParam("metric.iops.write", qMetricIopsWrite); err != nil {
return err
}
}
}
if o.MetricLatencyOther != nil {
// query param metric.latency.other
var qrMetricLatencyOther int64
if o.MetricLatencyOther != nil {
qrMetricLatencyOther = *o.MetricLatencyOther
}
qMetricLatencyOther := swag.FormatInt64(qrMetricLatencyOther)
if qMetricLatencyOther != "" {
if err := r.SetQueryParam("metric.latency.other", qMetricLatencyOther); err != nil {
return err
}
}
}
if o.MetricLatencyRead != nil {
// query param metric.latency.read
var qrMetricLatencyRead int64
if o.MetricLatencyRead != nil {
qrMetricLatencyRead = *o.MetricLatencyRead
}
qMetricLatencyRead := swag.FormatInt64(qrMetricLatencyRead)
if qMetricLatencyRead != "" {
if err := r.SetQueryParam("metric.latency.read", qMetricLatencyRead); err != nil {
return err
}
}
}
if o.MetricLatencyTotal != nil {
// query param metric.latency.total
var qrMetricLatencyTotal int64
if o.MetricLatencyTotal != nil {
qrMetricLatencyTotal = *o.MetricLatencyTotal
}
qMetricLatencyTotal := swag.FormatInt64(qrMetricLatencyTotal)
if qMetricLatencyTotal != "" {
if err := r.SetQueryParam("metric.latency.total", qMetricLatencyTotal); err != nil {
return err
}
}
}
if o.MetricLatencyWrite != nil {
// query param metric.latency.write
var qrMetricLatencyWrite int64
if o.MetricLatencyWrite != nil {
qrMetricLatencyWrite = *o.MetricLatencyWrite
}
qMetricLatencyWrite := swag.FormatInt64(qrMetricLatencyWrite)
if qMetricLatencyWrite != "" {
if err := r.SetQueryParam("metric.latency.write", qMetricLatencyWrite); err != nil {
return err
}
}
}
if o.MetricStatus != nil {
// query param metric.status
var qrMetricStatus string
if o.MetricStatus != nil {
qrMetricStatus = *o.MetricStatus
}
qMetricStatus := qrMetricStatus
if qMetricStatus != "" {
if err := r.SetQueryParam("metric.status", qMetricStatus); err != nil {
return err
}
}
}
if o.MetricThroughputRead != nil {
// query param metric.throughput.read
var qrMetricThroughputRead int64
if o.MetricThroughputRead != nil {
qrMetricThroughputRead = *o.MetricThroughputRead
}
qMetricThroughputRead := swag.FormatInt64(qrMetricThroughputRead)
if qMetricThroughputRead != "" {
if err := r.SetQueryParam("metric.throughput.read", qMetricThroughputRead); err != nil {
return err
}
}
}
if o.MetricThroughputTotal != nil {
// query param metric.throughput.total
var qrMetricThroughputTotal int64
if o.MetricThroughputTotal != nil {
qrMetricThroughputTotal = *o.MetricThroughputTotal
}
qMetricThroughputTotal := swag.FormatInt64(qrMetricThroughputTotal)
if qMetricThroughputTotal != "" {
if err := r.SetQueryParam("metric.throughput.total", qMetricThroughputTotal); err != nil {
return err
}
}
}
if o.MetricThroughputWrite != nil {
// query param metric.throughput.write
var qrMetricThroughputWrite int64
if o.MetricThroughputWrite != nil {
qrMetricThroughputWrite = *o.MetricThroughputWrite
}
qMetricThroughputWrite := swag.FormatInt64(qrMetricThroughputWrite)
if qMetricThroughputWrite != "" {
if err := r.SetQueryParam("metric.throughput.write", qMetricThroughputWrite); err != nil {
return err
}
}
}
if o.MetricTimestamp != nil {
// query param metric.timestamp
var qrMetricTimestamp string
if o.MetricTimestamp != nil {
qrMetricTimestamp = *o.MetricTimestamp
}
qMetricTimestamp := qrMetricTimestamp
if qMetricTimestamp != "" {
if err := r.SetQueryParam("metric.timestamp", qMetricTimestamp); 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
}
}
}
| 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/s_a_n/vvol_binding_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// VvolBindingGetReader is a Reader for the VvolBindingGet structure.
type VvolBindingGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *VvolBindingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewVvolBindingGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewVvolBindingGetDefault(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
}
}
// NewVvolBindingGetOK creates a VvolBindingGetOK with default headers values
func NewVvolBindingGetOK() *VvolBindingGetOK {
return &VvolBindingGetOK{}
}
/*
VvolBindingGetOK describes a response with status code 200, with default header values.
OK
*/
type VvolBindingGetOK struct {
Payload *models.VvolBinding
}
// IsSuccess returns true when this vvol binding get o k response has a 2xx status code
func (o *VvolBindingGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this vvol binding get o k response has a 3xx status code
func (o *VvolBindingGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this vvol binding get o k response has a 4xx status code
func (o *VvolBindingGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this vvol binding get o k response has a 5xx status code
func (o *VvolBindingGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this vvol binding get o k response a status code equal to that given
func (o *VvolBindingGetOK) IsCode(code int) bool {
return code == 200
}
func (o *VvolBindingGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvolBindingGetOK %+v", 200, o.Payload)
}
func (o *VvolBindingGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvolBindingGetOK %+v", 200, o.Payload)
}
func (o *VvolBindingGetOK) GetPayload() *models.VvolBinding {
return o.Payload
}
func (o *VvolBindingGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.VvolBinding)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewVvolBindingGetDefault creates a VvolBindingGetDefault with default headers values
func NewVvolBindingGetDefault(code int) *VvolBindingGetDefault {
return &VvolBindingGetDefault{
_statusCode: code,
}
}
/*
VvolBindingGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4 | The vVol binding was not found. |
*/
type VvolBindingGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the vvol binding get default response
func (o *VvolBindingGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this vvol binding get default response has a 2xx status code
func (o *VvolBindingGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this vvol binding get default response has a 3xx status code
func (o *VvolBindingGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this vvol binding get default response has a 4xx status code
func (o *VvolBindingGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this vvol binding get default response has a 5xx status code
func (o *VvolBindingGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this vvol binding get default response a status code equal to that given
func (o *VvolBindingGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *VvolBindingGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvol_binding_get default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvol_binding_get default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *VvolBindingGetDefault) 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/s_a_n/lun_map_reporting_node_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_reporting_node_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunMapReportingNodeGetReader is a Reader for the LunMapReportingNodeGet structure.
type LunMapReportingNodeGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunMapReportingNodeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunMapReportingNodeGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunMapReportingNodeGetDefault(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
}
}
// NewLunMapReportingNodeGetOK creates a LunMapReportingNodeGetOK with default headers values
func NewLunMapReportingNodeGetOK() *LunMapReportingNodeGetOK {
return &LunMapReportingNodeGetOK{}
}
/*
LunMapReportingNodeGetOK describes a response with status code 200, with default header values.
OK
*/
type LunMapReportingNodeGetOK struct {
Payload *models.LunMapReportingNode
}
// IsSuccess returns true when this lun map reporting node get o k response has a 2xx status code
func (o *LunMapReportingNodeGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun map reporting node get o k response has a 3xx status code
func (o *LunMapReportingNodeGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun map reporting node get o k response has a 4xx status code
func (o *LunMapReportingNodeGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun map reporting node get o k response has a 5xx status code
func (o *LunMapReportingNodeGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun map reporting node get o k response a status code equal to that given
func (o *LunMapReportingNodeGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunMapReportingNodeGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lunMapReportingNodeGetOK %+v", 200, o.Payload)
}
func (o *LunMapReportingNodeGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lunMapReportingNodeGetOK %+v", 200, o.Payload)
}
func (o *LunMapReportingNodeGetOK) GetPayload() *models.LunMapReportingNode {
return o.Payload
}
func (o *LunMapReportingNodeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LunMapReportingNode)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunMapReportingNodeGetDefault creates a LunMapReportingNodeGetDefault with default headers values
func NewLunMapReportingNodeGetDefault(code int) *LunMapReportingNodeGetDefault {
return &LunMapReportingNodeGetDefault{
_statusCode: code,
}
}
/*
LunMapReportingNodeGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The specified LUN does not exist or is not accessible to the caller. |
| 5374878 | The specified initiator group does not exist, is not accessible to the caller, or is not in the same SVM as the specified LUN. |
| 5374922 | The specified LUN map does not exist. |
*/
type LunMapReportingNodeGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun map reporting node get default response
func (o *LunMapReportingNodeGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun map reporting node get default response has a 2xx status code
func (o *LunMapReportingNodeGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun map reporting node get default response has a 3xx status code
func (o *LunMapReportingNodeGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun map reporting node get default response has a 4xx status code
func (o *LunMapReportingNodeGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun map reporting node get default response has a 5xx status code
func (o *LunMapReportingNodeGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun map reporting node get default response a status code equal to that given
func (o *LunMapReportingNodeGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunMapReportingNodeGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lun_map_reporting_node_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes/{uuid}][%d] lun_map_reporting_node_get default %+v", o._statusCode, o.Payload)
}
func (o *LunMapReportingNodeGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunMapReportingNodeGetDefault) 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/s_a_n/iscsi_credentials_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCredentialsDeleteParams creates a new IscsiCredentialsDeleteParams 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 NewIscsiCredentialsDeleteParams() *IscsiCredentialsDeleteParams {
return &IscsiCredentialsDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCredentialsDeleteParamsWithTimeout creates a new IscsiCredentialsDeleteParams object
// with the ability to set a timeout on a request.
func NewIscsiCredentialsDeleteParamsWithTimeout(timeout time.Duration) *IscsiCredentialsDeleteParams {
return &IscsiCredentialsDeleteParams{
timeout: timeout,
}
}
// NewIscsiCredentialsDeleteParamsWithContext creates a new IscsiCredentialsDeleteParams object
// with the ability to set a context for a request.
func NewIscsiCredentialsDeleteParamsWithContext(ctx context.Context) *IscsiCredentialsDeleteParams {
return &IscsiCredentialsDeleteParams{
Context: ctx,
}
}
// NewIscsiCredentialsDeleteParamsWithHTTPClient creates a new IscsiCredentialsDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCredentialsDeleteParamsWithHTTPClient(client *http.Client) *IscsiCredentialsDeleteParams {
return &IscsiCredentialsDeleteParams{
HTTPClient: client,
}
}
/*
IscsiCredentialsDeleteParams contains all the parameters to send to the API endpoint
for the iscsi credentials delete operation.
Typically these are written to a http.Request.
*/
type IscsiCredentialsDeleteParams struct {
/* Initiator.
The iSCSI initiator of the credentials object.
*/
Initiator string
/* SvmUUID.
The unique identifier of an SVM.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi credentials delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsDeleteParams) WithDefaults() *IscsiCredentialsDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi credentials delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) WithTimeout(timeout time.Duration) *IscsiCredentialsDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) WithContext(ctx context.Context) *IscsiCredentialsDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) WithHTTPClient(client *http.Client) *IscsiCredentialsDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInitiator adds the initiator to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) WithInitiator(initiator string) *IscsiCredentialsDeleteParams {
o.SetInitiator(initiator)
return o
}
// SetInitiator adds the initiator to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) SetInitiator(initiator string) {
o.Initiator = initiator
}
// WithSvmUUID adds the svmUUID to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) WithSvmUUID(svmUUID string) *IscsiCredentialsDeleteParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi credentials delete params
func (o *IscsiCredentialsDeleteParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCredentialsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param initiator
if err := r.SetPathParam("initiator", o.Initiator); 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/s_a_n/iscsi_credentials_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_credentials_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiCredentialsCollectionGetParams creates a new IscsiCredentialsCollectionGetParams 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 NewIscsiCredentialsCollectionGetParams() *IscsiCredentialsCollectionGetParams {
return &IscsiCredentialsCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiCredentialsCollectionGetParamsWithTimeout creates a new IscsiCredentialsCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIscsiCredentialsCollectionGetParamsWithTimeout(timeout time.Duration) *IscsiCredentialsCollectionGetParams {
return &IscsiCredentialsCollectionGetParams{
timeout: timeout,
}
}
// NewIscsiCredentialsCollectionGetParamsWithContext creates a new IscsiCredentialsCollectionGetParams object
// with the ability to set a context for a request.
func NewIscsiCredentialsCollectionGetParamsWithContext(ctx context.Context) *IscsiCredentialsCollectionGetParams {
return &IscsiCredentialsCollectionGetParams{
Context: ctx,
}
}
// NewIscsiCredentialsCollectionGetParamsWithHTTPClient creates a new IscsiCredentialsCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiCredentialsCollectionGetParamsWithHTTPClient(client *http.Client) *IscsiCredentialsCollectionGetParams {
return &IscsiCredentialsCollectionGetParams{
HTTPClient: client,
}
}
/*
IscsiCredentialsCollectionGetParams contains all the parameters to send to the API endpoint
for the iscsi credentials collection get operation.
Typically these are written to a http.Request.
*/
type IscsiCredentialsCollectionGetParams struct {
/* AuthenticationType.
Filter by authentication_type
*/
AuthenticationType *string
/* ChapInboundUser.
Filter by chap.inbound.user
*/
ChapInboundUser *string
/* ChapOutboundUser.
Filter by chap.outbound.user
*/
ChapOutboundUser *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Initiator.
Filter by initiator
*/
Initiator *string
/* InitiatorAddressMasksAddress.
Filter by initiator_address.masks.address
*/
InitiatorAddressMasksAddress *string
/* InitiatorAddressMasksFamily.
Filter by initiator_address.masks.family
*/
InitiatorAddressMasksFamily *string
/* InitiatorAddressMasksNetmask.
Filter by initiator_address.masks.netmask
*/
InitiatorAddressMasksNetmask *string
/* InitiatorAddressRangesEnd.
Filter by initiator_address.ranges.end
*/
InitiatorAddressRangesEnd *string
/* InitiatorAddressRangesFamily.
Filter by initiator_address.ranges.family
*/
InitiatorAddressRangesFamily *string
/* InitiatorAddressRangesStart.
Filter by initiator_address.ranges.start
*/
InitiatorAddressRangesStart *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 iscsi credentials collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsCollectionGetParams) WithDefaults() *IscsiCredentialsCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi credentials collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiCredentialsCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IscsiCredentialsCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithTimeout(timeout time.Duration) *IscsiCredentialsCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithContext(ctx context.Context) *IscsiCredentialsCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithHTTPClient(client *http.Client) *IscsiCredentialsCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAuthenticationType adds the authenticationType to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithAuthenticationType(authenticationType *string) *IscsiCredentialsCollectionGetParams {
o.SetAuthenticationType(authenticationType)
return o
}
// SetAuthenticationType adds the authenticationType to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetAuthenticationType(authenticationType *string) {
o.AuthenticationType = authenticationType
}
// WithChapInboundUser adds the chapInboundUser to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithChapInboundUser(chapInboundUser *string) *IscsiCredentialsCollectionGetParams {
o.SetChapInboundUser(chapInboundUser)
return o
}
// SetChapInboundUser adds the chapInboundUser to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetChapInboundUser(chapInboundUser *string) {
o.ChapInboundUser = chapInboundUser
}
// WithChapOutboundUser adds the chapOutboundUser to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithChapOutboundUser(chapOutboundUser *string) *IscsiCredentialsCollectionGetParams {
o.SetChapOutboundUser(chapOutboundUser)
return o
}
// SetChapOutboundUser adds the chapOutboundUser to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetChapOutboundUser(chapOutboundUser *string) {
o.ChapOutboundUser = chapOutboundUser
}
// WithFields adds the fields to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithFields(fields []string) *IscsiCredentialsCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInitiator adds the initiator to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiator(initiator *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiator(initiator)
return o
}
// SetInitiator adds the initiator to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiator(initiator *string) {
o.Initiator = initiator
}
// WithInitiatorAddressMasksAddress adds the initiatorAddressMasksAddress to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressMasksAddress(initiatorAddressMasksAddress *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressMasksAddress(initiatorAddressMasksAddress)
return o
}
// SetInitiatorAddressMasksAddress adds the initiatorAddressMasksAddress to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressMasksAddress(initiatorAddressMasksAddress *string) {
o.InitiatorAddressMasksAddress = initiatorAddressMasksAddress
}
// WithInitiatorAddressMasksFamily adds the initiatorAddressMasksFamily to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressMasksFamily(initiatorAddressMasksFamily *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressMasksFamily(initiatorAddressMasksFamily)
return o
}
// SetInitiatorAddressMasksFamily adds the initiatorAddressMasksFamily to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressMasksFamily(initiatorAddressMasksFamily *string) {
o.InitiatorAddressMasksFamily = initiatorAddressMasksFamily
}
// WithInitiatorAddressMasksNetmask adds the initiatorAddressMasksNetmask to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressMasksNetmask(initiatorAddressMasksNetmask *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressMasksNetmask(initiatorAddressMasksNetmask)
return o
}
// SetInitiatorAddressMasksNetmask adds the initiatorAddressMasksNetmask to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressMasksNetmask(initiatorAddressMasksNetmask *string) {
o.InitiatorAddressMasksNetmask = initiatorAddressMasksNetmask
}
// WithInitiatorAddressRangesEnd adds the initiatorAddressRangesEnd to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressRangesEnd(initiatorAddressRangesEnd *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressRangesEnd(initiatorAddressRangesEnd)
return o
}
// SetInitiatorAddressRangesEnd adds the initiatorAddressRangesEnd to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressRangesEnd(initiatorAddressRangesEnd *string) {
o.InitiatorAddressRangesEnd = initiatorAddressRangesEnd
}
// WithInitiatorAddressRangesFamily adds the initiatorAddressRangesFamily to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressRangesFamily(initiatorAddressRangesFamily *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressRangesFamily(initiatorAddressRangesFamily)
return o
}
// SetInitiatorAddressRangesFamily adds the initiatorAddressRangesFamily to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressRangesFamily(initiatorAddressRangesFamily *string) {
o.InitiatorAddressRangesFamily = initiatorAddressRangesFamily
}
// WithInitiatorAddressRangesStart adds the initiatorAddressRangesStart to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithInitiatorAddressRangesStart(initiatorAddressRangesStart *string) *IscsiCredentialsCollectionGetParams {
o.SetInitiatorAddressRangesStart(initiatorAddressRangesStart)
return o
}
// SetInitiatorAddressRangesStart adds the initiatorAddressRangesStart to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetInitiatorAddressRangesStart(initiatorAddressRangesStart *string) {
o.InitiatorAddressRangesStart = initiatorAddressRangesStart
}
// WithMaxRecords adds the maxRecords to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithMaxRecords(maxRecords *int64) *IscsiCredentialsCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithOrderBy(orderBy []string) *IscsiCredentialsCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithReturnRecords(returnRecords *bool) *IscsiCredentialsCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IscsiCredentialsCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithSvmName(svmName *string) *IscsiCredentialsCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) WithSvmUUID(svmUUID *string) *IscsiCredentialsCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi credentials collection get params
func (o *IscsiCredentialsCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiCredentialsCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AuthenticationType != nil {
// query param authentication_type
var qrAuthenticationType string
if o.AuthenticationType != nil {
qrAuthenticationType = *o.AuthenticationType
}
qAuthenticationType := qrAuthenticationType
if qAuthenticationType != "" {
if err := r.SetQueryParam("authentication_type", qAuthenticationType); err != nil {
return err
}
}
}
if o.ChapInboundUser != nil {
// query param chap.inbound.user
var qrChapInboundUser string
if o.ChapInboundUser != nil {
qrChapInboundUser = *o.ChapInboundUser
}
qChapInboundUser := qrChapInboundUser
if qChapInboundUser != "" {
if err := r.SetQueryParam("chap.inbound.user", qChapInboundUser); err != nil {
return err
}
}
}
if o.ChapOutboundUser != nil {
// query param chap.outbound.user
var qrChapOutboundUser string
if o.ChapOutboundUser != nil {
qrChapOutboundUser = *o.ChapOutboundUser
}
qChapOutboundUser := qrChapOutboundUser
if qChapOutboundUser != "" {
if err := r.SetQueryParam("chap.outbound.user", qChapOutboundUser); 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.Initiator != nil {
// query param initiator
var qrInitiator string
if o.Initiator != nil {
qrInitiator = *o.Initiator
}
qInitiator := qrInitiator
if qInitiator != "" {
if err := r.SetQueryParam("initiator", qInitiator); err != nil {
return err
}
}
}
if o.InitiatorAddressMasksAddress != nil {
// query param initiator_address.masks.address
var qrInitiatorAddressMasksAddress string
if o.InitiatorAddressMasksAddress != nil {
qrInitiatorAddressMasksAddress = *o.InitiatorAddressMasksAddress
}
qInitiatorAddressMasksAddress := qrInitiatorAddressMasksAddress
if qInitiatorAddressMasksAddress != "" {
if err := r.SetQueryParam("initiator_address.masks.address", qInitiatorAddressMasksAddress); err != nil {
return err
}
}
}
if o.InitiatorAddressMasksFamily != nil {
// query param initiator_address.masks.family
var qrInitiatorAddressMasksFamily string
if o.InitiatorAddressMasksFamily != nil {
qrInitiatorAddressMasksFamily = *o.InitiatorAddressMasksFamily
}
qInitiatorAddressMasksFamily := qrInitiatorAddressMasksFamily
if qInitiatorAddressMasksFamily != "" {
if err := r.SetQueryParam("initiator_address.masks.family", qInitiatorAddressMasksFamily); err != nil {
return err
}
}
}
if o.InitiatorAddressMasksNetmask != nil {
// query param initiator_address.masks.netmask
var qrInitiatorAddressMasksNetmask string
if o.InitiatorAddressMasksNetmask != nil {
qrInitiatorAddressMasksNetmask = *o.InitiatorAddressMasksNetmask
}
qInitiatorAddressMasksNetmask := qrInitiatorAddressMasksNetmask
if qInitiatorAddressMasksNetmask != "" {
if err := r.SetQueryParam("initiator_address.masks.netmask", qInitiatorAddressMasksNetmask); err != nil {
return err
}
}
}
if o.InitiatorAddressRangesEnd != nil {
// query param initiator_address.ranges.end
var qrInitiatorAddressRangesEnd string
if o.InitiatorAddressRangesEnd != nil {
qrInitiatorAddressRangesEnd = *o.InitiatorAddressRangesEnd
}
qInitiatorAddressRangesEnd := qrInitiatorAddressRangesEnd
if qInitiatorAddressRangesEnd != "" {
if err := r.SetQueryParam("initiator_address.ranges.end", qInitiatorAddressRangesEnd); err != nil {
return err
}
}
}
if o.InitiatorAddressRangesFamily != nil {
// query param initiator_address.ranges.family
var qrInitiatorAddressRangesFamily string
if o.InitiatorAddressRangesFamily != nil {
qrInitiatorAddressRangesFamily = *o.InitiatorAddressRangesFamily
}
qInitiatorAddressRangesFamily := qrInitiatorAddressRangesFamily
if qInitiatorAddressRangesFamily != "" {
if err := r.SetQueryParam("initiator_address.ranges.family", qInitiatorAddressRangesFamily); err != nil {
return err
}
}
}
if o.InitiatorAddressRangesStart != nil {
// query param initiator_address.ranges.start
var qrInitiatorAddressRangesStart string
if o.InitiatorAddressRangesStart != nil {
qrInitiatorAddressRangesStart = *o.InitiatorAddressRangesStart
}
qInitiatorAddressRangesStart := qrInitiatorAddressRangesStart
if qInitiatorAddressRangesStart != "" {
if err := r.SetQueryParam("initiator_address.ranges.start", qInitiatorAddressRangesStart); 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
}
// bindParamIscsiCredentialsCollectionGet binds the parameter fields
func (o *IscsiCredentialsCollectionGetParams) 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
}
// bindParamIscsiCredentialsCollectionGet binds the parameter order_by
func (o *IscsiCredentialsCollectionGetParams) 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/s_a_n/iscsi_service_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IscsiServiceDeleteReader is a Reader for the IscsiServiceDelete structure.
type IscsiServiceDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IscsiServiceDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIscsiServiceDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIscsiServiceDeleteDefault(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
}
}
// NewIscsiServiceDeleteOK creates a IscsiServiceDeleteOK with default headers values
func NewIscsiServiceDeleteOK() *IscsiServiceDeleteOK {
return &IscsiServiceDeleteOK{}
}
/*
IscsiServiceDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IscsiServiceDeleteOK struct {
}
// IsSuccess returns true when this iscsi service delete o k response has a 2xx status code
func (o *IscsiServiceDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this iscsi service delete o k response has a 3xx status code
func (o *IscsiServiceDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this iscsi service delete o k response has a 4xx status code
func (o *IscsiServiceDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this iscsi service delete o k response has a 5xx status code
func (o *IscsiServiceDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this iscsi service delete o k response a status code equal to that given
func (o *IscsiServiceDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IscsiServiceDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceDeleteOK ", 200)
}
func (o *IscsiServiceDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/services/{svm.uuid}][%d] iscsiServiceDeleteOK ", 200)
}
func (o *IscsiServiceDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIscsiServiceDeleteDefault creates a IscsiServiceDeleteDefault with default headers values
func NewIscsiServiceDeleteDefault(code int) *IscsiServiceDeleteDefault {
return &IscsiServiceDeleteDefault{
_statusCode: code,
}
}
/*
IscsiServiceDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2621462 | An SVM with the specified UUID does not exist. |
| 5373960 | The iSCSI service is enabled. The iSCSI service must be disabled before it can be deleted. |
| 5374078 | The SVM does not have an iSCSI service. |
*/
type IscsiServiceDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the iscsi service delete default response
func (o *IscsiServiceDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this iscsi service delete default response has a 2xx status code
func (o *IscsiServiceDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this iscsi service delete default response has a 3xx status code
func (o *IscsiServiceDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this iscsi service delete default response has a 4xx status code
func (o *IscsiServiceDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this iscsi service delete default response has a 5xx status code
func (o *IscsiServiceDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this iscsi service delete default response a status code equal to that given
func (o *IscsiServiceDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IscsiServiceDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_delete default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/iscsi/services/{svm.uuid}][%d] iscsi_service_delete default %+v", o._statusCode, o.Payload)
}
func (o *IscsiServiceDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IscsiServiceDeleteDefault) 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/s_a_n/igroup_initiator_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupInitiatorModifyParams creates a new IgroupInitiatorModifyParams 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 NewIgroupInitiatorModifyParams() *IgroupInitiatorModifyParams {
return &IgroupInitiatorModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupInitiatorModifyParamsWithTimeout creates a new IgroupInitiatorModifyParams object
// with the ability to set a timeout on a request.
func NewIgroupInitiatorModifyParamsWithTimeout(timeout time.Duration) *IgroupInitiatorModifyParams {
return &IgroupInitiatorModifyParams{
timeout: timeout,
}
}
// NewIgroupInitiatorModifyParamsWithContext creates a new IgroupInitiatorModifyParams object
// with the ability to set a context for a request.
func NewIgroupInitiatorModifyParamsWithContext(ctx context.Context) *IgroupInitiatorModifyParams {
return &IgroupInitiatorModifyParams{
Context: ctx,
}
}
// NewIgroupInitiatorModifyParamsWithHTTPClient creates a new IgroupInitiatorModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupInitiatorModifyParamsWithHTTPClient(client *http.Client) *IgroupInitiatorModifyParams {
return &IgroupInitiatorModifyParams{
HTTPClient: client,
}
}
/*
IgroupInitiatorModifyParams contains all the parameters to send to the API endpoint
for the igroup initiator modify operation.
Typically these are written to a http.Request.
*/
type IgroupInitiatorModifyParams struct {
/* IgroupUUID.
The unique identifier of the initiator group.
*/
IgroupUUID string
/* Info.
The new property values for the initiator.
*/
Info *models.IgroupInitiator
/* Name.
The initiator name.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup initiator modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorModifyParams) WithDefaults() *IgroupInitiatorModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup initiator modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithTimeout(timeout time.Duration) *IgroupInitiatorModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithContext(ctx context.Context) *IgroupInitiatorModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithHTTPClient(client *http.Client) *IgroupInitiatorModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIgroupUUID adds the igroupUUID to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithIgroupUUID(igroupUUID string) *IgroupInitiatorModifyParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithInfo adds the info to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithInfo(info *models.IgroupInitiator) *IgroupInitiatorModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetInfo(info *models.IgroupInitiator) {
o.Info = info
}
// WithName adds the name to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) WithName(name string) *IgroupInitiatorModifyParams {
o.SetName(name)
return o
}
// SetName adds the name to the igroup initiator modify params
func (o *IgroupInitiatorModifyParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupInitiatorModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
// path param name
if err := r.SetPathParam("name", o.Name); 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/s_a_n/vvol_binding_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewVvolBindingDeleteParams creates a new VvolBindingDeleteParams 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 NewVvolBindingDeleteParams() *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewVvolBindingDeleteParamsWithTimeout creates a new VvolBindingDeleteParams object
// with the ability to set a timeout on a request.
func NewVvolBindingDeleteParamsWithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: timeout,
}
}
// NewVvolBindingDeleteParamsWithContext creates a new VvolBindingDeleteParams object
// with the ability to set a context for a request.
func NewVvolBindingDeleteParamsWithContext(ctx context.Context) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
Context: ctx,
}
}
// NewVvolBindingDeleteParamsWithHTTPClient creates a new VvolBindingDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewVvolBindingDeleteParamsWithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
HTTPClient: client,
}
}
/*
VvolBindingDeleteParams contains all the parameters to send to the API endpoint
for the vvol binding delete operation.
Typically these are written to a http.Request.
*/
type VvolBindingDeleteParams struct {
/* DeleteAllReferences.
Forces deletion of the binding regardless of the reference count value.
*/
DeleteAllReferences *bool
/* ProtocolEndpointUUID.
The unique identifier of the class `protocol_endpoint` LUN.
*/
ProtocolEndpointUUID string
/* VvolUUID.
The unique identifier of the class `vvol` LUN.
*/
VvolUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the vvol binding delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingDeleteParams) WithDefaults() *VvolBindingDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the vvol binding delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VvolBindingDeleteParams) SetDefaults() {
var (
deleteAllReferencesDefault = bool(false)
)
val := VvolBindingDeleteParams{
DeleteAllReferences: &deleteAllReferencesDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithContext(ctx context.Context) *VvolBindingDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDeleteAllReferences adds the deleteAllReferences to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithDeleteAllReferences(deleteAllReferences *bool) *VvolBindingDeleteParams {
o.SetDeleteAllReferences(deleteAllReferences)
return o
}
// SetDeleteAllReferences adds the deleteAllReferences to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetDeleteAllReferences(deleteAllReferences *bool) {
o.DeleteAllReferences = deleteAllReferences
}
// WithProtocolEndpointUUID adds the protocolEndpointUUID to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingDeleteParams {
o.SetProtocolEndpointUUID(protocolEndpointUUID)
return o
}
// SetProtocolEndpointUUID adds the protocolEndpointUuid to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetProtocolEndpointUUID(protocolEndpointUUID string) {
o.ProtocolEndpointUUID = protocolEndpointUUID
}
// WithVvolUUID adds the vvolUUID to the vvol binding delete params
func (o *VvolBindingDeleteParams) WithVvolUUID(vvolUUID string) *VvolBindingDeleteParams {
o.SetVvolUUID(vvolUUID)
return o
}
// SetVvolUUID adds the vvolUuid to the vvol binding delete params
func (o *VvolBindingDeleteParams) SetVvolUUID(vvolUUID string) {
o.VvolUUID = vvolUUID
}
// WriteToRequest writes these params to a swagger request
func (o *VvolBindingDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DeleteAllReferences != nil {
// query param delete_all_references
var qrDeleteAllReferences bool
if o.DeleteAllReferences != nil {
qrDeleteAllReferences = *o.DeleteAllReferences
}
qDeleteAllReferences := swag.FormatBool(qrDeleteAllReferences)
if qDeleteAllReferences != "" {
if err := r.SetQueryParam("delete_all_references", qDeleteAllReferences); err != nil {
return err
}
}
}
// path param protocol_endpoint.uuid
if err := r.SetPathParam("protocol_endpoint.uuid", o.ProtocolEndpointUUID); err != nil {
return err
}
// path param vvol.uuid
if err := r.SetPathParam("vvol.uuid", o.VvolUUID); 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/s_a_n/iscsi_service_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiServiceCreateParams creates a new IscsiServiceCreateParams 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 NewIscsiServiceCreateParams() *IscsiServiceCreateParams {
return &IscsiServiceCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiServiceCreateParamsWithTimeout creates a new IscsiServiceCreateParams object
// with the ability to set a timeout on a request.
func NewIscsiServiceCreateParamsWithTimeout(timeout time.Duration) *IscsiServiceCreateParams {
return &IscsiServiceCreateParams{
timeout: timeout,
}
}
// NewIscsiServiceCreateParamsWithContext creates a new IscsiServiceCreateParams object
// with the ability to set a context for a request.
func NewIscsiServiceCreateParamsWithContext(ctx context.Context) *IscsiServiceCreateParams {
return &IscsiServiceCreateParams{
Context: ctx,
}
}
// NewIscsiServiceCreateParamsWithHTTPClient creates a new IscsiServiceCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiServiceCreateParamsWithHTTPClient(client *http.Client) *IscsiServiceCreateParams {
return &IscsiServiceCreateParams{
HTTPClient: client,
}
}
/*
IscsiServiceCreateParams contains all the parameters to send to the API endpoint
for the iscsi service create operation.
Typically these are written to a http.Request.
*/
type IscsiServiceCreateParams struct {
/* Info.
The property values for the new iSCSI service.
*/
Info *models.IscsiService
/* 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 iscsi service create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceCreateParams) WithDefaults() *IscsiServiceCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi service create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IscsiServiceCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi service create params
func (o *IscsiServiceCreateParams) WithTimeout(timeout time.Duration) *IscsiServiceCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi service create params
func (o *IscsiServiceCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi service create params
func (o *IscsiServiceCreateParams) WithContext(ctx context.Context) *IscsiServiceCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi service create params
func (o *IscsiServiceCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi service create params
func (o *IscsiServiceCreateParams) WithHTTPClient(client *http.Client) *IscsiServiceCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi service create params
func (o *IscsiServiceCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the iscsi service create params
func (o *IscsiServiceCreateParams) WithInfo(info *models.IscsiService) *IscsiServiceCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the iscsi service create params
func (o *IscsiServiceCreateParams) SetInfo(info *models.IscsiService) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the iscsi service create params
func (o *IscsiServiceCreateParams) WithReturnRecords(returnRecords *bool) *IscsiServiceCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi service create params
func (o *IscsiServiceCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiServiceCreateParams) 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/s_a_n/fcp_service_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/fcp_service_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewFcpServiceDeleteParams creates a new FcpServiceDeleteParams 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 NewFcpServiceDeleteParams() *FcpServiceDeleteParams {
return &FcpServiceDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcpServiceDeleteParamsWithTimeout creates a new FcpServiceDeleteParams object
// with the ability to set a timeout on a request.
func NewFcpServiceDeleteParamsWithTimeout(timeout time.Duration) *FcpServiceDeleteParams {
return &FcpServiceDeleteParams{
timeout: timeout,
}
}
// NewFcpServiceDeleteParamsWithContext creates a new FcpServiceDeleteParams object
// with the ability to set a context for a request.
func NewFcpServiceDeleteParamsWithContext(ctx context.Context) *FcpServiceDeleteParams {
return &FcpServiceDeleteParams{
Context: ctx,
}
}
// NewFcpServiceDeleteParamsWithHTTPClient creates a new FcpServiceDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcpServiceDeleteParamsWithHTTPClient(client *http.Client) *FcpServiceDeleteParams {
return &FcpServiceDeleteParams{
HTTPClient: client,
}
}
/*
FcpServiceDeleteParams contains all the parameters to send to the API endpoint
for the fcp service delete operation.
Typically these are written to a http.Request.
*/
type FcpServiceDeleteParams struct {
/* SvmUUID.
The unique identifier of the SVM for which to delete the FC Protocol service.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fcp service delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceDeleteParams) WithDefaults() *FcpServiceDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fcp service delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcpServiceDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fcp service delete params
func (o *FcpServiceDeleteParams) WithTimeout(timeout time.Duration) *FcpServiceDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fcp service delete params
func (o *FcpServiceDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fcp service delete params
func (o *FcpServiceDeleteParams) WithContext(ctx context.Context) *FcpServiceDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fcp service delete params
func (o *FcpServiceDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fcp service delete params
func (o *FcpServiceDeleteParams) WithHTTPClient(client *http.Client) *FcpServiceDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fcp service delete params
func (o *FcpServiceDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithSvmUUID adds the svmUUID to the fcp service delete params
func (o *FcpServiceDeleteParams) WithSvmUUID(svmUUID string) *FcpServiceDeleteParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the fcp service delete params
func (o *FcpServiceDeleteParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *FcpServiceDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/s_a_n/igroup_initiator_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIgroupInitiatorCreateParams creates a new IgroupInitiatorCreateParams 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 NewIgroupInitiatorCreateParams() *IgroupInitiatorCreateParams {
return &IgroupInitiatorCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupInitiatorCreateParamsWithTimeout creates a new IgroupInitiatorCreateParams object
// with the ability to set a timeout on a request.
func NewIgroupInitiatorCreateParamsWithTimeout(timeout time.Duration) *IgroupInitiatorCreateParams {
return &IgroupInitiatorCreateParams{
timeout: timeout,
}
}
// NewIgroupInitiatorCreateParamsWithContext creates a new IgroupInitiatorCreateParams object
// with the ability to set a context for a request.
func NewIgroupInitiatorCreateParamsWithContext(ctx context.Context) *IgroupInitiatorCreateParams {
return &IgroupInitiatorCreateParams{
Context: ctx,
}
}
// NewIgroupInitiatorCreateParamsWithHTTPClient creates a new IgroupInitiatorCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupInitiatorCreateParamsWithHTTPClient(client *http.Client) *IgroupInitiatorCreateParams {
return &IgroupInitiatorCreateParams{
HTTPClient: client,
}
}
/*
IgroupInitiatorCreateParams contains all the parameters to send to the API endpoint
for the igroup initiator create operation.
Typically these are written to a http.Request.
*/
type IgroupInitiatorCreateParams struct {
/* IgroupUUID.
The unique identifier of the initiator group.
*/
IgroupUUID string
/* Info.
The properties of the initiator to add to the initiator group.
*/
Info *models.IgroupInitiator
/* 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 igroup initiator create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorCreateParams) WithDefaults() *IgroupInitiatorCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup initiator create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupInitiatorCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IgroupInitiatorCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithTimeout(timeout time.Duration) *IgroupInitiatorCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithContext(ctx context.Context) *IgroupInitiatorCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithHTTPClient(client *http.Client) *IgroupInitiatorCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIgroupUUID adds the igroupUUID to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithIgroupUUID(igroupUUID string) *IgroupInitiatorCreateParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithInfo adds the info to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithInfo(info *models.IgroupInitiator) *IgroupInitiatorCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetInfo(info *models.IgroupInitiator) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) WithReturnRecords(returnRecords *bool) *IgroupInitiatorCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup initiator create params
func (o *IgroupInitiatorCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupInitiatorCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param igroup.uuid
if err := r.SetPathParam("igroup.uuid", o.IgroupUUID); err != nil {
return err
}
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/s_a_n/lun_attribute_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_attribute_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// LunAttributeCollectionGetReader is a Reader for the LunAttributeCollectionGet structure.
type LunAttributeCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunAttributeCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunAttributeCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunAttributeCollectionGetDefault(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
}
}
// NewLunAttributeCollectionGetOK creates a LunAttributeCollectionGetOK with default headers values
func NewLunAttributeCollectionGetOK() *LunAttributeCollectionGetOK {
return &LunAttributeCollectionGetOK{}
}
/*
LunAttributeCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type LunAttributeCollectionGetOK struct {
Payload *models.LunAttributeResponse
}
// IsSuccess returns true when this lun attribute collection get o k response has a 2xx status code
func (o *LunAttributeCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun attribute collection get o k response has a 3xx status code
func (o *LunAttributeCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun attribute collection get o k response has a 4xx status code
func (o *LunAttributeCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun attribute collection get o k response has a 5xx status code
func (o *LunAttributeCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun attribute collection get o k response a status code equal to that given
func (o *LunAttributeCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunAttributeCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes][%d] lunAttributeCollectionGetOK %+v", 200, o.Payload)
}
func (o *LunAttributeCollectionGetOK) String() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes][%d] lunAttributeCollectionGetOK %+v", 200, o.Payload)
}
func (o *LunAttributeCollectionGetOK) GetPayload() *models.LunAttributeResponse {
return o.Payload
}
func (o *LunAttributeCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LunAttributeResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunAttributeCollectionGetDefault creates a LunAttributeCollectionGetDefault with default headers values
func NewLunAttributeCollectionGetDefault(code int) *LunAttributeCollectionGetDefault {
return &LunAttributeCollectionGetDefault{
_statusCode: code,
}
}
/*
LunAttributeCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type LunAttributeCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun attribute collection get default response
func (o *LunAttributeCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun attribute collection get default response has a 2xx status code
func (o *LunAttributeCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun attribute collection get default response has a 3xx status code
func (o *LunAttributeCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun attribute collection get default response has a 4xx status code
func (o *LunAttributeCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun attribute collection get default response has a 5xx status code
func (o *LunAttributeCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun attribute collection get default response a status code equal to that given
func (o *LunAttributeCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunAttributeCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes][%d] lun_attribute_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /storage/luns/{lun.uuid}/attributes][%d] lun_attribute_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LunAttributeCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunAttributeCollectionGetDefault) 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/s_a_n/iscsi_service_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_service_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// NewIscsiServiceCollectionGetParams creates a new IscsiServiceCollectionGetParams 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 NewIscsiServiceCollectionGetParams() *IscsiServiceCollectionGetParams {
return &IscsiServiceCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiServiceCollectionGetParamsWithTimeout creates a new IscsiServiceCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIscsiServiceCollectionGetParamsWithTimeout(timeout time.Duration) *IscsiServiceCollectionGetParams {
return &IscsiServiceCollectionGetParams{
timeout: timeout,
}
}
// NewIscsiServiceCollectionGetParamsWithContext creates a new IscsiServiceCollectionGetParams object
// with the ability to set a context for a request.
func NewIscsiServiceCollectionGetParamsWithContext(ctx context.Context) *IscsiServiceCollectionGetParams {
return &IscsiServiceCollectionGetParams{
Context: ctx,
}
}
// NewIscsiServiceCollectionGetParamsWithHTTPClient creates a new IscsiServiceCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiServiceCollectionGetParamsWithHTTPClient(client *http.Client) *IscsiServiceCollectionGetParams {
return &IscsiServiceCollectionGetParams{
HTTPClient: client,
}
}
/*
IscsiServiceCollectionGetParams contains all the parameters to send to the API endpoint
for the iscsi service collection get operation.
Typically these are written to a http.Request.
*/
type IscsiServiceCollectionGetParams struct {
/* Enabled.
Filter by enabled
*/
Enabled *bool
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* MetricDuration.
Filter by metric.duration
*/
MetricDuration *string
/* MetricIopsOther.
Filter by metric.iops.other
*/
MetricIopsOther *int64
/* MetricIopsRead.
Filter by metric.iops.read
*/
MetricIopsRead *int64
/* MetricIopsTotal.
Filter by metric.iops.total
*/
MetricIopsTotal *int64
/* MetricIopsWrite.
Filter by metric.iops.write
*/
MetricIopsWrite *int64
/* MetricLatencyOther.
Filter by metric.latency.other
*/
MetricLatencyOther *int64
/* MetricLatencyRead.
Filter by metric.latency.read
*/
MetricLatencyRead *int64
/* MetricLatencyTotal.
Filter by metric.latency.total
*/
MetricLatencyTotal *int64
/* MetricLatencyWrite.
Filter by metric.latency.write
*/
MetricLatencyWrite *int64
/* MetricStatus.
Filter by metric.status
*/
MetricStatus *string
/* MetricThroughputRead.
Filter by metric.throughput.read
*/
MetricThroughputRead *int64
/* MetricThroughputTotal.
Filter by metric.throughput.total
*/
MetricThroughputTotal *int64
/* MetricThroughputWrite.
Filter by metric.throughput.write
*/
MetricThroughputWrite *int64
/* MetricTimestamp.
Filter by metric.timestamp
*/
MetricTimestamp *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
/* StatisticsIopsRawOther.
Filter by statistics.iops_raw.other
*/
StatisticsIopsRawOther *int64
/* StatisticsIopsRawRead.
Filter by statistics.iops_raw.read
*/
StatisticsIopsRawRead *int64
/* StatisticsIopsRawTotal.
Filter by statistics.iops_raw.total
*/
StatisticsIopsRawTotal *int64
/* StatisticsIopsRawWrite.
Filter by statistics.iops_raw.write
*/
StatisticsIopsRawWrite *int64
/* StatisticsLatencyRawOther.
Filter by statistics.latency_raw.other
*/
StatisticsLatencyRawOther *int64
/* StatisticsLatencyRawRead.
Filter by statistics.latency_raw.read
*/
StatisticsLatencyRawRead *int64
/* StatisticsLatencyRawTotal.
Filter by statistics.latency_raw.total
*/
StatisticsLatencyRawTotal *int64
/* StatisticsLatencyRawWrite.
Filter by statistics.latency_raw.write
*/
StatisticsLatencyRawWrite *int64
/* StatisticsStatus.
Filter by statistics.status
*/
StatisticsStatus *string
/* StatisticsThroughputRawRead.
Filter by statistics.throughput_raw.read
*/
StatisticsThroughputRawRead *int64
/* StatisticsThroughputRawTotal.
Filter by statistics.throughput_raw.total
*/
StatisticsThroughputRawTotal *int64
/* StatisticsThroughputRawWrite.
Filter by statistics.throughput_raw.write
*/
StatisticsThroughputRawWrite *int64
/* StatisticsTimestamp.
Filter by statistics.timestamp
*/
StatisticsTimestamp *string
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
/* TargetAlias.
Filter by target.alias
*/
TargetAlias *string
/* TargetName.
Filter by target.name
*/
TargetName *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi service collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceCollectionGetParams) WithDefaults() *IscsiServiceCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi service collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiServiceCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IscsiServiceCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithTimeout(timeout time.Duration) *IscsiServiceCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithContext(ctx context.Context) *IscsiServiceCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithHTTPClient(client *http.Client) *IscsiServiceCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEnabled adds the enabled to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithEnabled(enabled *bool) *IscsiServiceCollectionGetParams {
o.SetEnabled(enabled)
return o
}
// SetEnabled adds the enabled to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetEnabled(enabled *bool) {
o.Enabled = enabled
}
// WithFields adds the fields to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithFields(fields []string) *IscsiServiceCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMaxRecords(maxRecords *int64) *IscsiServiceCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMetricDuration adds the metricDuration to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricDuration(metricDuration *string) *IscsiServiceCollectionGetParams {
o.SetMetricDuration(metricDuration)
return o
}
// SetMetricDuration adds the metricDuration to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricDuration(metricDuration *string) {
o.MetricDuration = metricDuration
}
// WithMetricIopsOther adds the metricIopsOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricIopsOther(metricIopsOther *int64) *IscsiServiceCollectionGetParams {
o.SetMetricIopsOther(metricIopsOther)
return o
}
// SetMetricIopsOther adds the metricIopsOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricIopsOther(metricIopsOther *int64) {
o.MetricIopsOther = metricIopsOther
}
// WithMetricIopsRead adds the metricIopsRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricIopsRead(metricIopsRead *int64) *IscsiServiceCollectionGetParams {
o.SetMetricIopsRead(metricIopsRead)
return o
}
// SetMetricIopsRead adds the metricIopsRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricIopsRead(metricIopsRead *int64) {
o.MetricIopsRead = metricIopsRead
}
// WithMetricIopsTotal adds the metricIopsTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricIopsTotal(metricIopsTotal *int64) *IscsiServiceCollectionGetParams {
o.SetMetricIopsTotal(metricIopsTotal)
return o
}
// SetMetricIopsTotal adds the metricIopsTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricIopsTotal(metricIopsTotal *int64) {
o.MetricIopsTotal = metricIopsTotal
}
// WithMetricIopsWrite adds the metricIopsWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricIopsWrite(metricIopsWrite *int64) *IscsiServiceCollectionGetParams {
o.SetMetricIopsWrite(metricIopsWrite)
return o
}
// SetMetricIopsWrite adds the metricIopsWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricIopsWrite(metricIopsWrite *int64) {
o.MetricIopsWrite = metricIopsWrite
}
// WithMetricLatencyOther adds the metricLatencyOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricLatencyOther(metricLatencyOther *int64) *IscsiServiceCollectionGetParams {
o.SetMetricLatencyOther(metricLatencyOther)
return o
}
// SetMetricLatencyOther adds the metricLatencyOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricLatencyOther(metricLatencyOther *int64) {
o.MetricLatencyOther = metricLatencyOther
}
// WithMetricLatencyRead adds the metricLatencyRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricLatencyRead(metricLatencyRead *int64) *IscsiServiceCollectionGetParams {
o.SetMetricLatencyRead(metricLatencyRead)
return o
}
// SetMetricLatencyRead adds the metricLatencyRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricLatencyRead(metricLatencyRead *int64) {
o.MetricLatencyRead = metricLatencyRead
}
// WithMetricLatencyTotal adds the metricLatencyTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricLatencyTotal(metricLatencyTotal *int64) *IscsiServiceCollectionGetParams {
o.SetMetricLatencyTotal(metricLatencyTotal)
return o
}
// SetMetricLatencyTotal adds the metricLatencyTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricLatencyTotal(metricLatencyTotal *int64) {
o.MetricLatencyTotal = metricLatencyTotal
}
// WithMetricLatencyWrite adds the metricLatencyWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricLatencyWrite(metricLatencyWrite *int64) *IscsiServiceCollectionGetParams {
o.SetMetricLatencyWrite(metricLatencyWrite)
return o
}
// SetMetricLatencyWrite adds the metricLatencyWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricLatencyWrite(metricLatencyWrite *int64) {
o.MetricLatencyWrite = metricLatencyWrite
}
// WithMetricStatus adds the metricStatus to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricStatus(metricStatus *string) *IscsiServiceCollectionGetParams {
o.SetMetricStatus(metricStatus)
return o
}
// SetMetricStatus adds the metricStatus to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricStatus(metricStatus *string) {
o.MetricStatus = metricStatus
}
// WithMetricThroughputRead adds the metricThroughputRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricThroughputRead(metricThroughputRead *int64) *IscsiServiceCollectionGetParams {
o.SetMetricThroughputRead(metricThroughputRead)
return o
}
// SetMetricThroughputRead adds the metricThroughputRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricThroughputRead(metricThroughputRead *int64) {
o.MetricThroughputRead = metricThroughputRead
}
// WithMetricThroughputTotal adds the metricThroughputTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricThroughputTotal(metricThroughputTotal *int64) *IscsiServiceCollectionGetParams {
o.SetMetricThroughputTotal(metricThroughputTotal)
return o
}
// SetMetricThroughputTotal adds the metricThroughputTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricThroughputTotal(metricThroughputTotal *int64) {
o.MetricThroughputTotal = metricThroughputTotal
}
// WithMetricThroughputWrite adds the metricThroughputWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricThroughputWrite(metricThroughputWrite *int64) *IscsiServiceCollectionGetParams {
o.SetMetricThroughputWrite(metricThroughputWrite)
return o
}
// SetMetricThroughputWrite adds the metricThroughputWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricThroughputWrite(metricThroughputWrite *int64) {
o.MetricThroughputWrite = metricThroughputWrite
}
// WithMetricTimestamp adds the metricTimestamp to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithMetricTimestamp(metricTimestamp *string) *IscsiServiceCollectionGetParams {
o.SetMetricTimestamp(metricTimestamp)
return o
}
// SetMetricTimestamp adds the metricTimestamp to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetMetricTimestamp(metricTimestamp *string) {
o.MetricTimestamp = metricTimestamp
}
// WithOrderBy adds the orderBy to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithOrderBy(orderBy []string) *IscsiServiceCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithReturnRecords(returnRecords *bool) *IscsiServiceCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IscsiServiceCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatisticsIopsRawOther adds the statisticsIopsRawOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsIopsRawOther(statisticsIopsRawOther *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsIopsRawOther(statisticsIopsRawOther)
return o
}
// SetStatisticsIopsRawOther adds the statisticsIopsRawOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsIopsRawOther(statisticsIopsRawOther *int64) {
o.StatisticsIopsRawOther = statisticsIopsRawOther
}
// WithStatisticsIopsRawRead adds the statisticsIopsRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsIopsRawRead(statisticsIopsRawRead *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsIopsRawRead(statisticsIopsRawRead)
return o
}
// SetStatisticsIopsRawRead adds the statisticsIopsRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsIopsRawRead(statisticsIopsRawRead *int64) {
o.StatisticsIopsRawRead = statisticsIopsRawRead
}
// WithStatisticsIopsRawTotal adds the statisticsIopsRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsIopsRawTotal(statisticsIopsRawTotal *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsIopsRawTotal(statisticsIopsRawTotal)
return o
}
// SetStatisticsIopsRawTotal adds the statisticsIopsRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsIopsRawTotal(statisticsIopsRawTotal *int64) {
o.StatisticsIopsRawTotal = statisticsIopsRawTotal
}
// WithStatisticsIopsRawWrite adds the statisticsIopsRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsIopsRawWrite(statisticsIopsRawWrite *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsIopsRawWrite(statisticsIopsRawWrite)
return o
}
// SetStatisticsIopsRawWrite adds the statisticsIopsRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsIopsRawWrite(statisticsIopsRawWrite *int64) {
o.StatisticsIopsRawWrite = statisticsIopsRawWrite
}
// WithStatisticsLatencyRawOther adds the statisticsLatencyRawOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsLatencyRawOther(statisticsLatencyRawOther *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsLatencyRawOther(statisticsLatencyRawOther)
return o
}
// SetStatisticsLatencyRawOther adds the statisticsLatencyRawOther to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsLatencyRawOther(statisticsLatencyRawOther *int64) {
o.StatisticsLatencyRawOther = statisticsLatencyRawOther
}
// WithStatisticsLatencyRawRead adds the statisticsLatencyRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsLatencyRawRead(statisticsLatencyRawRead *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsLatencyRawRead(statisticsLatencyRawRead)
return o
}
// SetStatisticsLatencyRawRead adds the statisticsLatencyRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsLatencyRawRead(statisticsLatencyRawRead *int64) {
o.StatisticsLatencyRawRead = statisticsLatencyRawRead
}
// WithStatisticsLatencyRawTotal adds the statisticsLatencyRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsLatencyRawTotal(statisticsLatencyRawTotal *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsLatencyRawTotal(statisticsLatencyRawTotal)
return o
}
// SetStatisticsLatencyRawTotal adds the statisticsLatencyRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsLatencyRawTotal(statisticsLatencyRawTotal *int64) {
o.StatisticsLatencyRawTotal = statisticsLatencyRawTotal
}
// WithStatisticsLatencyRawWrite adds the statisticsLatencyRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsLatencyRawWrite(statisticsLatencyRawWrite *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsLatencyRawWrite(statisticsLatencyRawWrite)
return o
}
// SetStatisticsLatencyRawWrite adds the statisticsLatencyRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsLatencyRawWrite(statisticsLatencyRawWrite *int64) {
o.StatisticsLatencyRawWrite = statisticsLatencyRawWrite
}
// WithStatisticsStatus adds the statisticsStatus to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsStatus(statisticsStatus *string) *IscsiServiceCollectionGetParams {
o.SetStatisticsStatus(statisticsStatus)
return o
}
// SetStatisticsStatus adds the statisticsStatus to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsStatus(statisticsStatus *string) {
o.StatisticsStatus = statisticsStatus
}
// WithStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsThroughputRawRead(statisticsThroughputRawRead)
return o
}
// SetStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) {
o.StatisticsThroughputRawRead = statisticsThroughputRawRead
}
// WithStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal)
return o
}
// SetStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) {
o.StatisticsThroughputRawTotal = statisticsThroughputRawTotal
}
// WithStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) *IscsiServiceCollectionGetParams {
o.SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite)
return o
}
// SetStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) {
o.StatisticsThroughputRawWrite = statisticsThroughputRawWrite
}
// WithStatisticsTimestamp adds the statisticsTimestamp to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithStatisticsTimestamp(statisticsTimestamp *string) *IscsiServiceCollectionGetParams {
o.SetStatisticsTimestamp(statisticsTimestamp)
return o
}
// SetStatisticsTimestamp adds the statisticsTimestamp to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetStatisticsTimestamp(statisticsTimestamp *string) {
o.StatisticsTimestamp = statisticsTimestamp
}
// WithSvmName adds the svmName to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithSvmName(svmName *string) *IscsiServiceCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithSvmUUID(svmUUID *string) *IscsiServiceCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithTargetAlias adds the targetAlias to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithTargetAlias(targetAlias *string) *IscsiServiceCollectionGetParams {
o.SetTargetAlias(targetAlias)
return o
}
// SetTargetAlias adds the targetAlias to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetTargetAlias(targetAlias *string) {
o.TargetAlias = targetAlias
}
// WithTargetName adds the targetName to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) WithTargetName(targetName *string) *IscsiServiceCollectionGetParams {
o.SetTargetName(targetName)
return o
}
// SetTargetName adds the targetName to the iscsi service collection get params
func (o *IscsiServiceCollectionGetParams) SetTargetName(targetName *string) {
o.TargetName = targetName
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiServiceCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Enabled != nil {
// query param enabled
var qrEnabled bool
if o.Enabled != nil {
qrEnabled = *o.Enabled
}
qEnabled := swag.FormatBool(qrEnabled)
if qEnabled != "" {
if err := r.SetQueryParam("enabled", qEnabled); 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.MetricDuration != nil {
// query param metric.duration
var qrMetricDuration string
if o.MetricDuration != nil {
qrMetricDuration = *o.MetricDuration
}
qMetricDuration := qrMetricDuration
if qMetricDuration != "" {
if err := r.SetQueryParam("metric.duration", qMetricDuration); err != nil {
return err
}
}
}
if o.MetricIopsOther != nil {
// query param metric.iops.other
var qrMetricIopsOther int64
if o.MetricIopsOther != nil {
qrMetricIopsOther = *o.MetricIopsOther
}
qMetricIopsOther := swag.FormatInt64(qrMetricIopsOther)
if qMetricIopsOther != "" {
if err := r.SetQueryParam("metric.iops.other", qMetricIopsOther); err != nil {
return err
}
}
}
if o.MetricIopsRead != nil {
// query param metric.iops.read
var qrMetricIopsRead int64
if o.MetricIopsRead != nil {
qrMetricIopsRead = *o.MetricIopsRead
}
qMetricIopsRead := swag.FormatInt64(qrMetricIopsRead)
if qMetricIopsRead != "" {
if err := r.SetQueryParam("metric.iops.read", qMetricIopsRead); err != nil {
return err
}
}
}
if o.MetricIopsTotal != nil {
// query param metric.iops.total
var qrMetricIopsTotal int64
if o.MetricIopsTotal != nil {
qrMetricIopsTotal = *o.MetricIopsTotal
}
qMetricIopsTotal := swag.FormatInt64(qrMetricIopsTotal)
if qMetricIopsTotal != "" {
if err := r.SetQueryParam("metric.iops.total", qMetricIopsTotal); err != nil {
return err
}
}
}
if o.MetricIopsWrite != nil {
// query param metric.iops.write
var qrMetricIopsWrite int64
if o.MetricIopsWrite != nil {
qrMetricIopsWrite = *o.MetricIopsWrite
}
qMetricIopsWrite := swag.FormatInt64(qrMetricIopsWrite)
if qMetricIopsWrite != "" {
if err := r.SetQueryParam("metric.iops.write", qMetricIopsWrite); err != nil {
return err
}
}
}
if o.MetricLatencyOther != nil {
// query param metric.latency.other
var qrMetricLatencyOther int64
if o.MetricLatencyOther != nil {
qrMetricLatencyOther = *o.MetricLatencyOther
}
qMetricLatencyOther := swag.FormatInt64(qrMetricLatencyOther)
if qMetricLatencyOther != "" {
if err := r.SetQueryParam("metric.latency.other", qMetricLatencyOther); err != nil {
return err
}
}
}
if o.MetricLatencyRead != nil {
// query param metric.latency.read
var qrMetricLatencyRead int64
if o.MetricLatencyRead != nil {
qrMetricLatencyRead = *o.MetricLatencyRead
}
qMetricLatencyRead := swag.FormatInt64(qrMetricLatencyRead)
if qMetricLatencyRead != "" {
if err := r.SetQueryParam("metric.latency.read", qMetricLatencyRead); err != nil {
return err
}
}
}
if o.MetricLatencyTotal != nil {
// query param metric.latency.total
var qrMetricLatencyTotal int64
if o.MetricLatencyTotal != nil {
qrMetricLatencyTotal = *o.MetricLatencyTotal
}
qMetricLatencyTotal := swag.FormatInt64(qrMetricLatencyTotal)
if qMetricLatencyTotal != "" {
if err := r.SetQueryParam("metric.latency.total", qMetricLatencyTotal); err != nil {
return err
}
}
}
if o.MetricLatencyWrite != nil {
// query param metric.latency.write
var qrMetricLatencyWrite int64
if o.MetricLatencyWrite != nil {
qrMetricLatencyWrite = *o.MetricLatencyWrite
}
qMetricLatencyWrite := swag.FormatInt64(qrMetricLatencyWrite)
if qMetricLatencyWrite != "" {
if err := r.SetQueryParam("metric.latency.write", qMetricLatencyWrite); err != nil {
return err
}
}
}
if o.MetricStatus != nil {
// query param metric.status
var qrMetricStatus string
if o.MetricStatus != nil {
qrMetricStatus = *o.MetricStatus
}
qMetricStatus := qrMetricStatus
if qMetricStatus != "" {
if err := r.SetQueryParam("metric.status", qMetricStatus); err != nil {
return err
}
}
}
if o.MetricThroughputRead != nil {
// query param metric.throughput.read
var qrMetricThroughputRead int64
if o.MetricThroughputRead != nil {
qrMetricThroughputRead = *o.MetricThroughputRead
}
qMetricThroughputRead := swag.FormatInt64(qrMetricThroughputRead)
if qMetricThroughputRead != "" {
if err := r.SetQueryParam("metric.throughput.read", qMetricThroughputRead); err != nil {
return err
}
}
}
if o.MetricThroughputTotal != nil {
// query param metric.throughput.total
var qrMetricThroughputTotal int64
if o.MetricThroughputTotal != nil {
qrMetricThroughputTotal = *o.MetricThroughputTotal
}
qMetricThroughputTotal := swag.FormatInt64(qrMetricThroughputTotal)
if qMetricThroughputTotal != "" {
if err := r.SetQueryParam("metric.throughput.total", qMetricThroughputTotal); err != nil {
return err
}
}
}
if o.MetricThroughputWrite != nil {
// query param metric.throughput.write
var qrMetricThroughputWrite int64
if o.MetricThroughputWrite != nil {
qrMetricThroughputWrite = *o.MetricThroughputWrite
}
qMetricThroughputWrite := swag.FormatInt64(qrMetricThroughputWrite)
if qMetricThroughputWrite != "" {
if err := r.SetQueryParam("metric.throughput.write", qMetricThroughputWrite); err != nil {
| 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/s_a_n/portset_interface_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// PortsetInterfaceCreateReader is a Reader for the PortsetInterfaceCreate structure.
type PortsetInterfaceCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetInterfaceCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPortsetInterfaceCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetInterfaceCreateDefault(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
}
}
// NewPortsetInterfaceCreateCreated creates a PortsetInterfaceCreateCreated with default headers values
func NewPortsetInterfaceCreateCreated() *PortsetInterfaceCreateCreated {
return &PortsetInterfaceCreateCreated{}
}
/*
PortsetInterfaceCreateCreated describes a response with status code 201, with default header values.
Created
*/
type PortsetInterfaceCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.PortsetInterfaceResponse
}
// IsSuccess returns true when this portset interface create created response has a 2xx status code
func (o *PortsetInterfaceCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset interface create created response has a 3xx status code
func (o *PortsetInterfaceCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset interface create created response has a 4xx status code
func (o *PortsetInterfaceCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this portset interface create created response has a 5xx status code
func (o *PortsetInterfaceCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this portset interface create created response a status code equal to that given
func (o *PortsetInterfaceCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *PortsetInterfaceCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/portsets/{portset.uuid}/interfaces][%d] portsetInterfaceCreateCreated %+v", 201, o.Payload)
}
func (o *PortsetInterfaceCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/portsets/{portset.uuid}/interfaces][%d] portsetInterfaceCreateCreated %+v", 201, o.Payload)
}
func (o *PortsetInterfaceCreateCreated) GetPayload() *models.PortsetInterfaceResponse {
return o.Payload
}
func (o *PortsetInterfaceCreateCreated) 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.PortsetInterfaceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPortsetInterfaceCreateDefault creates a PortsetInterfaceCreateDefault with default headers values
func NewPortsetInterfaceCreateDefault(code int) *PortsetInterfaceCreateDefault {
return &PortsetInterfaceCreateDefault{
_statusCode: code,
}
}
/*
PortsetInterfaceCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374906 | A specified network interface was not found. |
| 5374907 | The specified network interface UUID and name don't identify the same network interface. |
| 5374909 | An invalid combination of network interface properties was specified. |
| 5374910 | An incomplete set of network interface properties was specified. |
| 5374914 | An attempt was made to add a network interface of an incompatible protocol to a portset. |
| 5374915 | An attempt was made to add a duplicate network interface to a portset. |
*/
type PortsetInterfaceCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset interface create default response
func (o *PortsetInterfaceCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset interface create default response has a 2xx status code
func (o *PortsetInterfaceCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset interface create default response has a 3xx status code
func (o *PortsetInterfaceCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset interface create default response has a 4xx status code
func (o *PortsetInterfaceCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset interface create default response has a 5xx status code
func (o *PortsetInterfaceCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset interface create default response a status code equal to that given
func (o *PortsetInterfaceCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetInterfaceCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/portsets/{portset.uuid}/interfaces][%d] portset_interface_create default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/portsets/{portset.uuid}/interfaces][%d] portset_interface_create default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetInterfaceCreateDefault) 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/s_a_n/igroup_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package s_a_n
// 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"
)
// IgroupGetReader is a Reader for the IgroupGet structure.
type IgroupGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupGetDefault(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
}
}
// NewIgroupGetOK creates a IgroupGetOK with default headers values
func NewIgroupGetOK() *IgroupGetOK {
return &IgroupGetOK{}
}
/*
IgroupGetOK describes a response with status code 200, with default header values.
OK
*/
type IgroupGetOK struct {
Payload *models.Igroup
}
// IsSuccess returns true when this igroup get o k response has a 2xx status code
func (o *IgroupGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup get o k response has a 3xx status code
func (o *IgroupGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup get o k response has a 4xx status code
func (o *IgroupGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup get o k response has a 5xx status code
func (o *IgroupGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup get o k response a status code equal to that given
func (o *IgroupGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{uuid}][%d] igroupGetOK %+v", 200, o.Payload)
}
func (o *IgroupGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{uuid}][%d] igroupGetOK %+v", 200, o.Payload)
}
func (o *IgroupGetOK) GetPayload() *models.Igroup {
return o.Payload
}
func (o *IgroupGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Igroup)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIgroupGetDefault creates a IgroupGetDefault with default headers values
func NewIgroupGetDefault(code int) *IgroupGetDefault {
return &IgroupGetDefault{
_statusCode: code,
}
}
/*
IgroupGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374852 | The initiator group does not exist. |
*/
type IgroupGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup get default response
func (o *IgroupGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup get default response has a 2xx status code
func (o *IgroupGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup get default response has a 3xx status code
func (o *IgroupGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup get default response has a 4xx status code
func (o *IgroupGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup get default response has a 5xx status code
func (o *IgroupGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup get default response a status code equal to that given
func (o *IgroupGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{uuid}][%d] igroup_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/igroups/{uuid}][%d] igroup_get default %+v", o._statusCode, o.Payload)
}
func (o *IgroupGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupGetDefault) 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.