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/wwpn_alias_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_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"
)
// WwpnAliasDeleteReader is a Reader for the WwpnAliasDelete structure.
type WwpnAliasDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WwpnAliasDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewWwpnAliasDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWwpnAliasDeleteDefault(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
}
}
// NewWwpnAliasDeleteOK creates a WwpnAliasDeleteOK with default headers values
func NewWwpnAliasDeleteOK() *WwpnAliasDeleteOK {
return &WwpnAliasDeleteOK{}
}
/*
WwpnAliasDeleteOK describes a response with status code 200, with default header values.
OK
*/
type WwpnAliasDeleteOK struct {
}
// IsSuccess returns true when this wwpn alias delete o k response has a 2xx status code
func (o *WwpnAliasDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this wwpn alias delete o k response has a 3xx status code
func (o *WwpnAliasDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this wwpn alias delete o k response has a 4xx status code
func (o *WwpnAliasDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this wwpn alias delete o k response has a 5xx status code
func (o *WwpnAliasDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this wwpn alias delete o k response a status code equal to that given
func (o *WwpnAliasDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *WwpnAliasDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpnAliasDeleteOK ", 200)
}
func (o *WwpnAliasDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpnAliasDeleteOK ", 200)
}
func (o *WwpnAliasDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewWwpnAliasDeleteDefault creates a WwpnAliasDeleteDefault with default headers values
func NewWwpnAliasDeleteDefault(code int) *WwpnAliasDeleteDefault {
return &WwpnAliasDeleteDefault{
_statusCode: code,
}
}
/*
WwpnAliasDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1260882 | An SVM with the specified UUID does not exist. |
| 5374046 | The alias could not be found. |
*/
type WwpnAliasDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the wwpn alias delete default response
func (o *WwpnAliasDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this wwpn alias delete default response has a 2xx status code
func (o *WwpnAliasDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this wwpn alias delete default response has a 3xx status code
func (o *WwpnAliasDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this wwpn alias delete default response has a 4xx status code
func (o *WwpnAliasDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this wwpn alias delete default response has a 5xx status code
func (o *WwpnAliasDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this wwpn alias delete default response a status code equal to that given
func (o *WwpnAliasDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WwpnAliasDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpn_alias_delete default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpn_alias_delete default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WwpnAliasDeleteDefault) 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_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_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"
)
// NewIgroupNestedCreateParams creates a new IgroupNestedCreateParams 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 NewIgroupNestedCreateParams() *IgroupNestedCreateParams {
return &IgroupNestedCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupNestedCreateParamsWithTimeout creates a new IgroupNestedCreateParams object
// with the ability to set a timeout on a request.
func NewIgroupNestedCreateParamsWithTimeout(timeout time.Duration) *IgroupNestedCreateParams {
return &IgroupNestedCreateParams{
timeout: timeout,
}
}
// NewIgroupNestedCreateParamsWithContext creates a new IgroupNestedCreateParams object
// with the ability to set a context for a request.
func NewIgroupNestedCreateParamsWithContext(ctx context.Context) *IgroupNestedCreateParams {
return &IgroupNestedCreateParams{
Context: ctx,
}
}
// NewIgroupNestedCreateParamsWithHTTPClient creates a new IgroupNestedCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupNestedCreateParamsWithHTTPClient(client *http.Client) *IgroupNestedCreateParams {
return &IgroupNestedCreateParams{
HTTPClient: client,
}
}
/*
IgroupNestedCreateParams contains all the parameters to send to the API endpoint
for the igroup nested create operation.
Typically these are written to a http.Request.
*/
type IgroupNestedCreateParams struct {
/* IgroupUUID.
The unique identifier of the parent initiator group.
*/
IgroupUUID string
/* Info.
The properties of the nested initiator group to add to the initiator group.
*/
Info *models.IgroupNested
/* 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 nested create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedCreateParams) WithDefaults() *IgroupNestedCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup nested create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IgroupNestedCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the igroup nested create params
func (o *IgroupNestedCreateParams) WithTimeout(timeout time.Duration) *IgroupNestedCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup nested create params
func (o *IgroupNestedCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup nested create params
func (o *IgroupNestedCreateParams) WithContext(ctx context.Context) *IgroupNestedCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup nested create params
func (o *IgroupNestedCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup nested create params
func (o *IgroupNestedCreateParams) WithHTTPClient(client *http.Client) *IgroupNestedCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup nested create params
func (o *IgroupNestedCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithIgroupUUID adds the igroupUUID to the igroup nested create params
func (o *IgroupNestedCreateParams) WithIgroupUUID(igroupUUID string) *IgroupNestedCreateParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup nested create params
func (o *IgroupNestedCreateParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithInfo adds the info to the igroup nested create params
func (o *IgroupNestedCreateParams) WithInfo(info *models.IgroupNested) *IgroupNestedCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the igroup nested create params
func (o *IgroupNestedCreateParams) SetInfo(info *models.IgroupNested) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the igroup nested create params
func (o *IgroupNestedCreateParams) WithReturnRecords(returnRecords *bool) *IgroupNestedCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup nested create params
func (o *IgroupNestedCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupNestedCreateParams) 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/portset_interface_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_interface_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"
)
// PortsetInterfaceDeleteReader is a Reader for the PortsetInterfaceDelete structure.
type PortsetInterfaceDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetInterfaceDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPortsetInterfaceDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetInterfaceDeleteDefault(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
}
}
// NewPortsetInterfaceDeleteOK creates a PortsetInterfaceDeleteOK with default headers values
func NewPortsetInterfaceDeleteOK() *PortsetInterfaceDeleteOK {
return &PortsetInterfaceDeleteOK{}
}
/*
PortsetInterfaceDeleteOK describes a response with status code 200, with default header values.
OK
*/
type PortsetInterfaceDeleteOK struct {
}
// IsSuccess returns true when this portset interface delete o k response has a 2xx status code
func (o *PortsetInterfaceDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset interface delete o k response has a 3xx status code
func (o *PortsetInterfaceDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset interface delete o k response has a 4xx status code
func (o *PortsetInterfaceDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this portset interface delete o k response has a 5xx status code
func (o *PortsetInterfaceDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this portset interface delete o k response a status code equal to that given
func (o *PortsetInterfaceDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *PortsetInterfaceDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portsetInterfaceDeleteOK ", 200)
}
func (o *PortsetInterfaceDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portsetInterfaceDeleteOK ", 200)
}
func (o *PortsetInterfaceDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPortsetInterfaceDeleteDefault creates a PortsetInterfaceDeleteDefault with default headers values
func NewPortsetInterfaceDeleteDefault(code int) *PortsetInterfaceDeleteDefault {
return &PortsetInterfaceDeleteDefault{
_statusCode: code,
}
}
/*
PortsetInterfaceDeleteDefault 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. |
| 5374908 | The portset specified in the URI does not exist. |
| 5374916 | The specified network interface is not in the portset. |
*/
type PortsetInterfaceDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset interface delete default response
func (o *PortsetInterfaceDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset interface delete default response has a 2xx status code
func (o *PortsetInterfaceDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset interface delete default response has a 3xx status code
func (o *PortsetInterfaceDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset interface delete default response has a 4xx status code
func (o *PortsetInterfaceDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset interface delete default response has a 5xx status code
func (o *PortsetInterfaceDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset interface delete default response a status code equal to that given
func (o *PortsetInterfaceDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetInterfaceDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portset_interface_delete default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}][%d] portset_interface_delete default %+v", o._statusCode, o.Payload)
}
func (o *PortsetInterfaceDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetInterfaceDeleteDefault) 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_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_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"
)
// PortsetDeleteReader is a Reader for the PortsetDelete structure.
type PortsetDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPortsetDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetDeleteDefault(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
}
}
// NewPortsetDeleteOK creates a PortsetDeleteOK with default headers values
func NewPortsetDeleteOK() *PortsetDeleteOK {
return &PortsetDeleteOK{}
}
/*
PortsetDeleteOK describes a response with status code 200, with default header values.
OK
*/
type PortsetDeleteOK struct {
}
// IsSuccess returns true when this portset delete o k response has a 2xx status code
func (o *PortsetDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset delete o k response has a 3xx status code
func (o *PortsetDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset delete o k response has a 4xx status code
func (o *PortsetDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this portset delete o k response has a 5xx status code
func (o *PortsetDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this portset delete o k response a status code equal to that given
func (o *PortsetDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *PortsetDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{uuid}][%d] portsetDeleteOK ", 200)
}
func (o *PortsetDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{uuid}][%d] portsetDeleteOK ", 200)
}
func (o *PortsetDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPortsetDeleteDefault creates a PortsetDeleteDefault with default headers values
func NewPortsetDeleteDefault(code int) *PortsetDeleteDefault {
return &PortsetDeleteDefault{
_statusCode: code,
}
}
/*
PortsetDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374063 | An attempt was made to delete a portset that is bound to an initiator group without using query parameter `allow_delete_while_bound`. |
| 5374908 | The portset does not exist. |
*/
type PortsetDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset delete default response
func (o *PortsetDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset delete default response has a 2xx status code
func (o *PortsetDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset delete default response has a 3xx status code
func (o *PortsetDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset delete default response has a 4xx status code
func (o *PortsetDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset delete default response has a 5xx status code
func (o *PortsetDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset delete default response a status code equal to that given
func (o *PortsetDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{uuid}][%d] portset_delete default %+v", o._statusCode, o.Payload)
}
func (o *PortsetDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/portsets/{uuid}][%d] portset_delete default %+v", o._statusCode, o.Payload)
}
func (o *PortsetDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetDeleteDefault) 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_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_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"
)
// PortsetGetReader is a Reader for the PortsetGet structure.
type PortsetGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPortsetGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetGetDefault(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
}
}
// NewPortsetGetOK creates a PortsetGetOK with default headers values
func NewPortsetGetOK() *PortsetGetOK {
return &PortsetGetOK{}
}
/*
PortsetGetOK describes a response with status code 200, with default header values.
OK
*/
type PortsetGetOK struct {
Payload *models.Portset
}
// IsSuccess returns true when this portset get o k response has a 2xx status code
func (o *PortsetGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset get o k response has a 3xx status code
func (o *PortsetGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset get o k response has a 4xx status code
func (o *PortsetGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this portset get o k response has a 5xx status code
func (o *PortsetGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this portset get o k response a status code equal to that given
func (o *PortsetGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PortsetGetOK) Error() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{uuid}][%d] portsetGetOK %+v", 200, o.Payload)
}
func (o *PortsetGetOK) String() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{uuid}][%d] portsetGetOK %+v", 200, o.Payload)
}
func (o *PortsetGetOK) GetPayload() *models.Portset {
return o.Payload
}
func (o *PortsetGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Portset)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPortsetGetDefault creates a PortsetGetDefault with default headers values
func NewPortsetGetDefault(code int) *PortsetGetDefault {
return &PortsetGetDefault{
_statusCode: code,
}
}
/*
PortsetGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4 | The portset does not exist. |
*/
type PortsetGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset get default response
func (o *PortsetGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset get default response has a 2xx status code
func (o *PortsetGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset get default response has a 3xx status code
func (o *PortsetGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset get default response has a 4xx status code
func (o *PortsetGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset get default response has a 5xx status code
func (o *PortsetGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset get default response a status code equal to that given
func (o *PortsetGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetGetDefault) Error() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{uuid}][%d] portset_get default %+v", o._statusCode, o.Payload)
}
func (o *PortsetGetDefault) String() string {
return fmt.Sprintf("[GET /protocols/san/portsets/{uuid}][%d] portset_get default %+v", o._statusCode, o.Payload)
}
func (o *PortsetGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetGetDefault) 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_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_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"
)
// IgroupModifyReader is a Reader for the IgroupModify structure.
type IgroupModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupModifyDefault(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
}
}
// NewIgroupModifyOK creates a IgroupModifyOK with default headers values
func NewIgroupModifyOK() *IgroupModifyOK {
return &IgroupModifyOK{}
}
/*
IgroupModifyOK describes a response with status code 200, with default header values.
OK
*/
type IgroupModifyOK struct {
}
// IsSuccess returns true when this igroup modify o k response has a 2xx status code
func (o *IgroupModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup modify o k response has a 3xx status code
func (o *IgroupModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup modify o k response has a 4xx status code
func (o *IgroupModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup modify o k response has a 5xx status code
func (o *IgroupModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup modify o k response a status code equal to that given
func (o *IgroupModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupModifyOK) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{uuid}][%d] igroupModifyOK ", 200)
}
func (o *IgroupModifyOK) String() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{uuid}][%d] igroupModifyOK ", 200)
}
func (o *IgroupModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIgroupModifyDefault creates a IgroupModifyDefault with default headers values
func NewIgroupModifyDefault(code int) *IgroupModifyDefault {
return &IgroupModifyDefault{
_statusCode: code,
}
}
/*
IgroupModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254264 | An attempt was made to bind a portset to an initiator group that is already bound to a portset. |
| 5373958 | An invalid initiator group name was supplied for a rename operation. |
| 5374023 | A rename operation failed because 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. |
| 5374733 | An initiator is already in another initiator group with a conflicting operating system type. |
| 5374745 | An attempt was made to add an initiator group as a child to itself. |
| 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. |
| 5374852 | The initiator group does not exist. |
| 5374868 | The initiator group was partially modified before an error was encountered while renaming the initiator group. |
*/
type IgroupModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup modify default response
func (o *IgroupModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup modify default response has a 2xx status code
func (o *IgroupModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup modify default response has a 3xx status code
func (o *IgroupModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup modify default response has a 4xx status code
func (o *IgroupModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup modify default response has a 5xx status code
func (o *IgroupModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup modify default response a status code equal to that given
func (o *IgroupModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{uuid}][%d] igroup_modify default %+v", o._statusCode, o.Payload)
}
func (o *IgroupModifyDefault) String() string {
return fmt.Sprintf("[PATCH /protocols/san/igroups/{uuid}][%d] igroup_modify default %+v", o._statusCode, o.Payload)
}
func (o *IgroupModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupModifyDefault) 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_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_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"
)
// NewLunModifyParams creates a new LunModifyParams 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 NewLunModifyParams() *LunModifyParams {
return &LunModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunModifyParamsWithTimeout creates a new LunModifyParams object
// with the ability to set a timeout on a request.
func NewLunModifyParamsWithTimeout(timeout time.Duration) *LunModifyParams {
return &LunModifyParams{
timeout: timeout,
}
}
// NewLunModifyParamsWithContext creates a new LunModifyParams object
// with the ability to set a context for a request.
func NewLunModifyParamsWithContext(ctx context.Context) *LunModifyParams {
return &LunModifyParams{
Context: ctx,
}
}
// NewLunModifyParamsWithHTTPClient creates a new LunModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunModifyParamsWithHTTPClient(client *http.Client) *LunModifyParams {
return &LunModifyParams{
HTTPClient: client,
}
}
/*
LunModifyParams contains all the parameters to send to the API endpoint
for the lun modify operation.
Typically these are written to a http.Request.
*/
type LunModifyParams struct {
/* DataOffset.
The offset, in bytes, at which to begin writing LUN data.<br/>
LUN data write requests are distinguished by the header entry `Content-Type: multipart/form-data`. When this header entry is provided, query parameter `data.offset` is required and used to specify the location within the LUN at which to write the data; no other query parameters are allowed. The request body must be `multipart/form-data` content with exactly one form entry containing the data to write. The content type entry of the form data is ignored and always treated as `application/octet-stream`. Writes are limited to one megabyte (1MB) per request.
Format: int64
*/
DataOffset *int64
/* Info.
The new property values for the LUN.<br/>
Either `info` or `data` must be supplied.
*/
Info *models.Lun
/* 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 modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunModifyParams) WithDefaults() *LunModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun modify params
func (o *LunModifyParams) WithTimeout(timeout time.Duration) *LunModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun modify params
func (o *LunModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun modify params
func (o *LunModifyParams) WithContext(ctx context.Context) *LunModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun modify params
func (o *LunModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun modify params
func (o *LunModifyParams) WithHTTPClient(client *http.Client) *LunModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun modify params
func (o *LunModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDataOffset adds the dataOffset to the lun modify params
func (o *LunModifyParams) WithDataOffset(dataOffset *int64) *LunModifyParams {
o.SetDataOffset(dataOffset)
return o
}
// SetDataOffset adds the dataOffset to the lun modify params
func (o *LunModifyParams) SetDataOffset(dataOffset *int64) {
o.DataOffset = dataOffset
}
// WithInfo adds the info to the lun modify params
func (o *LunModifyParams) WithInfo(info *models.Lun) *LunModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the lun modify params
func (o *LunModifyParams) SetInfo(info *models.Lun) {
o.Info = info
}
// WithUUID adds the uuid to the lun modify params
func (o *LunModifyParams) WithUUID(uuid string) *LunModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the lun modify params
func (o *LunModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LunModifyParams) 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.Info != nil {
if err := r.SetBodyParam(o.Info); 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/lun_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/lun_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"
)
// NewLunCollectionPerformanceMetricsGetParams creates a new LunCollectionPerformanceMetricsGetParams 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 NewLunCollectionPerformanceMetricsGetParams() *LunCollectionPerformanceMetricsGetParams {
return &LunCollectionPerformanceMetricsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunCollectionPerformanceMetricsGetParamsWithTimeout creates a new LunCollectionPerformanceMetricsGetParams object
// with the ability to set a timeout on a request.
func NewLunCollectionPerformanceMetricsGetParamsWithTimeout(timeout time.Duration) *LunCollectionPerformanceMetricsGetParams {
return &LunCollectionPerformanceMetricsGetParams{
timeout: timeout,
}
}
// NewLunCollectionPerformanceMetricsGetParamsWithContext creates a new LunCollectionPerformanceMetricsGetParams object
// with the ability to set a context for a request.
func NewLunCollectionPerformanceMetricsGetParamsWithContext(ctx context.Context) *LunCollectionPerformanceMetricsGetParams {
return &LunCollectionPerformanceMetricsGetParams{
Context: ctx,
}
}
// NewLunCollectionPerformanceMetricsGetParamsWithHTTPClient creates a new LunCollectionPerformanceMetricsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunCollectionPerformanceMetricsGetParamsWithHTTPClient(client *http.Client) *LunCollectionPerformanceMetricsGetParams {
return &LunCollectionPerformanceMetricsGetParams{
HTTPClient: client,
}
}
/*
LunCollectionPerformanceMetricsGetParams contains all the parameters to send to the API endpoint
for the lun collection performance metrics get operation.
Typically these are written to a http.Request.
*/
type LunCollectionPerformanceMetricsGetParams 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
/* ThroughputOther.
Filter by throughput.other
*/
ThroughputOther *int64
/* 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
/* UUID.
Unique identifier of the LUN.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCollectionPerformanceMetricsGetParams) WithDefaults() *LunCollectionPerformanceMetricsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunCollectionPerformanceMetricsGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := LunCollectionPerformanceMetricsGetParams{
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 lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithTimeout(timeout time.Duration) *LunCollectionPerformanceMetricsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithContext(ctx context.Context) *LunCollectionPerformanceMetricsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithHTTPClient(client *http.Client) *LunCollectionPerformanceMetricsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithDuration(duration *string) *LunCollectionPerformanceMetricsGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithFields(fields []string) *LunCollectionPerformanceMetricsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithInterval(interval *string) *LunCollectionPerformanceMetricsGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithIopsOther(iopsOther *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithIopsRead(iopsRead *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithIopsTotal(iopsTotal *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithIopsWrite(iopsWrite *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithLatencyOther(latencyOther *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithLatencyRead(latencyRead *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithLatencyTotal(latencyTotal *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithLatencyWrite(latencyWrite *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithMaxRecords(maxRecords *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithOrderBy(orderBy []string) *LunCollectionPerformanceMetricsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithReturnRecords(returnRecords *bool) *LunCollectionPerformanceMetricsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithReturnTimeout(returnTimeout *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithStatus(status *string) *LunCollectionPerformanceMetricsGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetStatus(status *string) {
o.Status = status
}
// WithThroughputOther adds the throughputOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithThroughputOther(throughputOther *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetThroughputOther(throughputOther)
return o
}
// SetThroughputOther adds the throughputOther to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetThroughputOther(throughputOther *int64) {
o.ThroughputOther = throughputOther
}
// WithThroughputRead adds the throughputRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithThroughputRead(throughputRead *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithThroughputTotal(throughputTotal *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithThroughputWrite(throughputWrite *int64) *LunCollectionPerformanceMetricsGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithTimestamp(timestamp *string) *LunCollectionPerformanceMetricsGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WithUUID adds the uuid to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) WithUUID(uuid string) *LunCollectionPerformanceMetricsGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the lun collection performance metrics get params
func (o *LunCollectionPerformanceMetricsGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LunCollectionPerformanceMetricsGetParams) 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
}
}
}
if o.ThroughputOther != nil {
// query param throughput.other
var qrThroughputOther int64
if o.ThroughputOther != nil {
qrThroughputOther = *o.ThroughputOther
}
qThroughputOther := swag.FormatInt64(qrThroughputOther)
if qThroughputOther != "" {
if err := r.SetQueryParam("throughput.other", qThroughputOther); 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
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamLunCollectionPerformanceMetricsGet binds the parameter fields
func (o *LunCollectionPerformanceMetricsGetParams) 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
}
// bindParamLunCollectionPerformanceMetricsGet binds the parameter order_by
func (o *LunCollectionPerformanceMetricsGetParams) 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_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/lun_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"
)
// LunCollectionPerformanceMetricsGetReader is a Reader for the LunCollectionPerformanceMetricsGet structure.
type LunCollectionPerformanceMetricsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunCollectionPerformanceMetricsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunCollectionPerformanceMetricsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunCollectionPerformanceMetricsGetDefault(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
}
}
// NewLunCollectionPerformanceMetricsGetOK creates a LunCollectionPerformanceMetricsGetOK with default headers values
func NewLunCollectionPerformanceMetricsGetOK() *LunCollectionPerformanceMetricsGetOK {
return &LunCollectionPerformanceMetricsGetOK{}
}
/*
LunCollectionPerformanceMetricsGetOK describes a response with status code 200, with default header values.
OK
*/
type LunCollectionPerformanceMetricsGetOK struct {
Payload *models.PerformanceLunMetricResponse
}
// IsSuccess returns true when this lun collection performance metrics get o k response has a 2xx status code
func (o *LunCollectionPerformanceMetricsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun collection performance metrics get o k response has a 3xx status code
func (o *LunCollectionPerformanceMetricsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun collection performance metrics get o k response has a 4xx status code
func (o *LunCollectionPerformanceMetricsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun collection performance metrics get o k response has a 5xx status code
func (o *LunCollectionPerformanceMetricsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun collection performance metrics get o k response a status code equal to that given
func (o *LunCollectionPerformanceMetricsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LunCollectionPerformanceMetricsGetOK) Error() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}/metrics][%d] lunCollectionPerformanceMetricsGetOK %+v", 200, o.Payload)
}
func (o *LunCollectionPerformanceMetricsGetOK) String() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}/metrics][%d] lunCollectionPerformanceMetricsGetOK %+v", 200, o.Payload)
}
func (o *LunCollectionPerformanceMetricsGetOK) GetPayload() *models.PerformanceLunMetricResponse {
return o.Payload
}
func (o *LunCollectionPerformanceMetricsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PerformanceLunMetricResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLunCollectionPerformanceMetricsGetDefault creates a LunCollectionPerformanceMetricsGetDefault with default headers values
func NewLunCollectionPerformanceMetricsGetDefault(code int) *LunCollectionPerformanceMetricsGetDefault {
return &LunCollectionPerformanceMetricsGetDefault{
_statusCode: code,
}
}
/*
LunCollectionPerformanceMetricsGetDefault describes a response with status code -1, with default header values.
Error
*/
type LunCollectionPerformanceMetricsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun collection performance metrics get default response
func (o *LunCollectionPerformanceMetricsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun collection performance metrics get default response has a 2xx status code
func (o *LunCollectionPerformanceMetricsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun collection performance metrics get default response has a 3xx status code
func (o *LunCollectionPerformanceMetricsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun collection performance metrics get default response has a 4xx status code
func (o *LunCollectionPerformanceMetricsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun collection performance metrics get default response has a 5xx status code
func (o *LunCollectionPerformanceMetricsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun collection performance metrics get default response a status code equal to that given
func (o *LunCollectionPerformanceMetricsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunCollectionPerformanceMetricsGetDefault) Error() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}/metrics][%d] lun_collection_performance_metrics_get default %+v", o._statusCode, o.Payload)
}
func (o *LunCollectionPerformanceMetricsGetDefault) String() string {
return fmt.Sprintf("[GET /storage/luns/{uuid}/metrics][%d] lun_collection_performance_metrics_get default %+v", o._statusCode, o.Payload)
}
func (o *LunCollectionPerformanceMetricsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunCollectionPerformanceMetricsGetDefault) 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_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_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"
)
// VvolBindingDeleteReader is a Reader for the VvolBindingDelete structure.
type VvolBindingDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *VvolBindingDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewVvolBindingDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewVvolBindingDeleteDefault(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
}
}
// NewVvolBindingDeleteOK creates a VvolBindingDeleteOK with default headers values
func NewVvolBindingDeleteOK() *VvolBindingDeleteOK {
return &VvolBindingDeleteOK{}
}
/*
VvolBindingDeleteOK describes a response with status code 200, with default header values.
OK
*/
type VvolBindingDeleteOK struct {
}
// IsSuccess returns true when this vvol binding delete o k response has a 2xx status code
func (o *VvolBindingDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this vvol binding delete o k response has a 3xx status code
func (o *VvolBindingDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this vvol binding delete o k response has a 4xx status code
func (o *VvolBindingDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this vvol binding delete o k response has a 5xx status code
func (o *VvolBindingDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this vvol binding delete o k response a status code equal to that given
func (o *VvolBindingDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *VvolBindingDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvolBindingDeleteOK ", 200)
}
func (o *VvolBindingDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvolBindingDeleteOK ", 200)
}
func (o *VvolBindingDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewVvolBindingDeleteDefault creates a VvolBindingDeleteDefault with default headers values
func NewVvolBindingDeleteDefault(code int) *VvolBindingDeleteDefault {
return &VvolBindingDeleteDefault{
_statusCode: code,
}
}
/*
VvolBindingDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5374875 | The vVol binding was not found because the protocol endpoint or vVol LUN was not found. Use to the `target` property of the error object to differentiate between the protocol endpoint LUN and the vVol LUN. |
| 5374926 | The vVol binding was not found. |
*/
type VvolBindingDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the vvol binding delete default response
func (o *VvolBindingDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this vvol binding delete default response has a 2xx status code
func (o *VvolBindingDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this vvol binding delete default response has a 3xx status code
func (o *VvolBindingDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this vvol binding delete default response has a 4xx status code
func (o *VvolBindingDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this vvol binding delete default response has a 5xx status code
func (o *VvolBindingDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this vvol binding delete default response a status code equal to that given
func (o *VvolBindingDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *VvolBindingDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvol_binding_delete default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/vvol-bindings/{protocol_endpoint.uuid}/{vvol.uuid}][%d] vvol_binding_delete default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *VvolBindingDeleteDefault) 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/san_client.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/san_client.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 (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new s a n API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for s a n API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
FcLoginCollectionGet(params *FcLoginCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcLoginCollectionGetOK, error)
FcLoginGet(params *FcLoginGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcLoginGetOK, error)
FcpCollectionPerformanceMetricsGet(params *FcpCollectionPerformanceMetricsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpCollectionPerformanceMetricsGetOK, error)
FcpServiceCollectionGet(params *FcpServiceCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceCollectionGetOK, error)
FcpServiceCreate(params *FcpServiceCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceCreateCreated, error)
FcpServiceDelete(params *FcpServiceDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceDeleteOK, error)
FcpServiceGet(params *FcpServiceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceGetOK, error)
FcpServiceModify(params *FcpServiceModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceModifyOK, error)
IgroupCollectionGet(params *IgroupCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupCollectionGetOK, error)
IgroupCreate(params *IgroupCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupCreateCreated, error)
IgroupDelete(params *IgroupDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupDeleteOK, error)
IgroupGet(params *IgroupGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupGetOK, error)
IgroupInitiatorCollectionGet(params *IgroupInitiatorCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorCollectionGetOK, error)
IgroupInitiatorCreate(params *IgroupInitiatorCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorCreateCreated, error)
IgroupInitiatorDelete(params *IgroupInitiatorDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorDeleteOK, error)
IgroupInitiatorGet(params *IgroupInitiatorGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorGetOK, error)
IgroupInitiatorModify(params *IgroupInitiatorModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorModifyOK, error)
IgroupModify(params *IgroupModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupModifyOK, error)
IgroupNestedCollectionGet(params *IgroupNestedCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupNestedCollectionGetOK, error)
IgroupNestedCreate(params *IgroupNestedCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupNestedCreateCreated, error)
IgroupNestedDelete(params *IgroupNestedDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupNestedDeleteOK, error)
IgroupNestedGet(params *IgroupNestedGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupNestedGetOK, error)
IscsiCollectionPerformanceMetricsGet(params *IscsiCollectionPerformanceMetricsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCollectionPerformanceMetricsGetOK, error)
IscsiCredentialsCollectionGet(params *IscsiCredentialsCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCredentialsCollectionGetOK, error)
IscsiCredentialsCreate(params *IscsiCredentialsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCredentialsCreateCreated, error)
IscsiCredentialsDelete(params *IscsiCredentialsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCredentialsDeleteOK, error)
IscsiCredentialsGet(params *IscsiCredentialsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCredentialsGetOK, error)
IscsiCredentialsModify(params *IscsiCredentialsModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiCredentialsModifyOK, error)
IscsiServiceCollectionGet(params *IscsiServiceCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiServiceCollectionGetOK, error)
IscsiServiceCreate(params *IscsiServiceCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiServiceCreateCreated, error)
IscsiServiceDelete(params *IscsiServiceDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiServiceDeleteOK, error)
IscsiServiceGet(params *IscsiServiceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiServiceGetOK, error)
IscsiServiceModify(params *IscsiServiceModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiServiceModifyOK, error)
IscsiSessionCollectionGet(params *IscsiSessionCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiSessionCollectionGetOK, error)
IscsiSessionGet(params *IscsiSessionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IscsiSessionGetOK, error)
LunAttributeCollectionGet(params *LunAttributeCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunAttributeCollectionGetOK, error)
LunAttributeCreate(params *LunAttributeCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunAttributeCreateCreated, error)
LunAttributeDelete(params *LunAttributeDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunAttributeDeleteOK, error)
LunAttributeGet(params *LunAttributeGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunAttributeGetOK, error)
LunAttributeModify(params *LunAttributeModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunAttributeModifyOK, error)
LunCollectionGet(params *LunCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunCollectionGetOK, error)
LunCollectionPerformanceMetricsGet(params *LunCollectionPerformanceMetricsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunCollectionPerformanceMetricsGetOK, error)
LunCreate(params *LunCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunCreateCreated, error)
LunDelete(params *LunDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunDeleteOK, error)
LunGet(params *LunGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunGetOK, error)
LunMapCollectionGet(params *LunMapCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapCollectionGetOK, error)
LunMapCreate(params *LunMapCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapCreateCreated, error)
LunMapDelete(params *LunMapDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapDeleteOK, error)
LunMapGet(params *LunMapGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapGetOK, error)
LunMapReportingNodeCollectionGet(params *LunMapReportingNodeCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapReportingNodeCollectionGetOK, error)
LunMapReportingNodeCreate(params *LunMapReportingNodeCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapReportingNodeCreateCreated, error)
LunMapReportingNodeDelete(params *LunMapReportingNodeDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapReportingNodeDeleteOK, error)
LunMapReportingNodeGet(params *LunMapReportingNodeGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunMapReportingNodeGetOK, error)
LunModify(params *LunModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LunModifyOK, error)
PortsetCollectionGet(params *PortsetCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetCollectionGetOK, error)
PortsetCreate(params *PortsetCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetCreateCreated, error)
PortsetDelete(params *PortsetDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetDeleteOK, error)
PortsetGet(params *PortsetGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetGetOK, error)
PortsetInterfaceCollectionGet(params *PortsetInterfaceCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetInterfaceCollectionGetOK, error)
PortsetInterfaceCreate(params *PortsetInterfaceCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetInterfaceCreateCreated, error)
PortsetInterfaceDelete(params *PortsetInterfaceDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetInterfaceDeleteOK, error)
PortsetInterfaceGet(params *PortsetInterfaceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PortsetInterfaceGetOK, error)
VvolBindingCollectionGet(params *VvolBindingCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VvolBindingCollectionGetOK, error)
VvolBindingCreate(params *VvolBindingCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VvolBindingCreateCreated, error)
VvolBindingDelete(params *VvolBindingDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VvolBindingDeleteOK, error)
VvolBindingGet(params *VvolBindingGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VvolBindingGetOK, error)
WwpnAliasCollectionGet(params *WwpnAliasCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WwpnAliasCollectionGetOK, error)
WwpnAliasCreate(params *WwpnAliasCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WwpnAliasCreateCreated, error)
WwpnAliasDelete(params *WwpnAliasDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WwpnAliasDeleteOK, error)
WwpnAliasGet(params *WwpnAliasGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WwpnAliasGetOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
FcLoginCollectionGet Retrieves FC logins.
### Related ONTAP commands
* `vserver fcp initiator show`
### Learn more
* SAN: [`DOC /network/fc/logins`](#docs-SAN-network_fc_logins)
* NVMe: [`DOC /network/fc/logins`](#docs-NVMe-network_fc_logins)
*/
func (a *Client) FcLoginCollectionGet(params *FcLoginCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcLoginCollectionGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcLoginCollectionGetParams()
}
op := &runtime.ClientOperation{
ID: "fc_login_collection_get",
Method: "GET",
PathPattern: "/network/fc/logins",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcLoginCollectionGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcLoginCollectionGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcLoginCollectionGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcLoginGet Retrieves an FC login.
### Related ONTAP commands
* `vserver fcp initiator show`
### Learn more
* SAN: [`DOC /network/fc/logins`](#docs-SAN-network_fc_logins)
* NVMe: [`DOC /network/fc/logins`](#docs-NVMe-network_fc_logins)
*/
func (a *Client) FcLoginGet(params *FcLoginGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcLoginGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcLoginGetParams()
}
op := &runtime.ClientOperation{
ID: "fc_login_get",
Method: "GET",
PathPattern: "/network/fc/logins/{interface.uuid}/{initiator.wwpn}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcLoginGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcLoginGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcLoginGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpCollectionPerformanceMetricsGet Retrieves historical performance metrics for the FC Protocol service of an SVM.
*/
func (a *Client) FcpCollectionPerformanceMetricsGet(params *FcpCollectionPerformanceMetricsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpCollectionPerformanceMetricsGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpCollectionPerformanceMetricsGetParams()
}
op := &runtime.ClientOperation{
ID: "fcp_collection_performance_metrics_get",
Method: "GET",
PathPattern: "/protocols/san/fcp/services/{svm.uuid}/metrics",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpCollectionPerformanceMetricsGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpCollectionPerformanceMetricsGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpCollectionPerformanceMetricsGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpServiceCollectionGet Retrieves FC Protocol services.
### Expensive properties
There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more.
* `statistics.*`
* `metric.*`
### Related ONTAP commands
* `vserver fcp show`
### Learn more
* [`DOC /protocols/san/fcp/services`](#docs-SAN-protocols_san_fcp_services)
*/
func (a *Client) FcpServiceCollectionGet(params *FcpServiceCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceCollectionGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpServiceCollectionGetParams()
}
op := &runtime.ClientOperation{
ID: "fcp_service_collection_get",
Method: "GET",
PathPattern: "/protocols/san/fcp/services",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpServiceCollectionGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpServiceCollectionGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpServiceCollectionGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpServiceCreate Creates an FC Protocol service.
### Required properties
* `svm.uuid` or `svm.name` - Existing SVM in which to create the FC Protocol service.
### Related ONTAP commands
* `vserver fcp create`
### Learn more
* [`DOC /protocols/san/fcp/services`](#docs-SAN-protocols_san_fcp_services)
*/
func (a *Client) FcpServiceCreate(params *FcpServiceCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceCreateCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpServiceCreateParams()
}
op := &runtime.ClientOperation{
ID: "fcp_service_create",
Method: "POST",
PathPattern: "/protocols/san/fcp/services",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpServiceCreateReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpServiceCreateCreated)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpServiceCreateDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpServiceDelete Deletes an FC Protocol service. An FC Protocol service must be disabled before it can be deleted.
### Related ONTAP commands
* `vserver fcp delete`
### Learn more
* [`DOC /protocols/san/fcp/services`](#docs-SAN-protocols_san_fcp_services)
*/
func (a *Client) FcpServiceDelete(params *FcpServiceDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceDeleteOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpServiceDeleteParams()
}
op := &runtime.ClientOperation{
ID: "fcp_service_delete",
Method: "DELETE",
PathPattern: "/protocols/san/fcp/services/{svm.uuid}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpServiceDeleteReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpServiceDeleteOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpServiceDeleteDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpServiceGet Retrieves an FC Protocol service.
### Related ONTAP commands
* `vserver fcp show`
### Learn more
* [`DOC /protocols/san/fcp/services`](#docs-SAN-protocols_san_fcp_services)
*/
func (a *Client) FcpServiceGet(params *FcpServiceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpServiceGetParams()
}
op := &runtime.ClientOperation{
ID: "fcp_service_get",
Method: "GET",
PathPattern: "/protocols/san/fcp/services/{svm.uuid}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpServiceGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpServiceGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpServiceGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
FcpServiceModify Updates an FC Protocol service.
### Related ONTAP commands
* `vserver fcp modify`
* `vserver fcp start`
* `vserver fcp stop`
### Learn more
* [`DOC /protocols/san/fcp/services`](#docs-SAN-protocols_san_fcp_services)
*/
func (a *Client) FcpServiceModify(params *FcpServiceModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FcpServiceModifyOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewFcpServiceModifyParams()
}
op := &runtime.ClientOperation{
ID: "fcp_service_modify",
Method: "PATCH",
PathPattern: "/protocols/san/fcp/services/{svm.uuid}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &FcpServiceModifyReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*FcpServiceModifyOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*FcpServiceModifyDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
IgroupCollectionGet Retrieves initiator groups.
### Expensive properties
There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more.
* `connectivity_tracking.*`
* `igroups.*`
* `lun_maps.*`
* `parent_igroups.*`
* `target.*`
### Related ONTAP commands
* `lun igroup show`
* `lun mapping show`
### Learn more
* [`DOC /protocols/san/igroups`](#docs-SAN-protocols_san_igroups)
*/
func (a *Client) IgroupCollectionGet(params *IgroupCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupCollectionGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewIgroupCollectionGetParams()
}
op := &runtime.ClientOperation{
ID: "igroup_collection_get",
Method: "GET",
PathPattern: "/protocols/san/igroups",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &IgroupCollectionGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*IgroupCollectionGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*IgroupCollectionGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
IgroupCreate Creates an initiator group.
### Required properties
* `svm.uuid` or `svm.name` - Existing SVM in which to create the initiator group.
* `name` - Name of the initiator group.
* `os_type` - Operating system of the initiator group's initiators.
### Recommended optional properties
* `initiators.name` - Name(s) of initiator group's initiators. This property can be used to create the initiator group and populate it with initiators in a single request.
### Default property values
If not specified in POST, the following default property values are assigned.
* `protocol` - _mixed_ - Data protocol of the initiator group's initiators.
### Related ONTAP commands
* `lun igroup create`
### Learn more
* [`DOC /protocols/san/igroups`](#docs-SAN-protocols_san_igroups)
*/
func (a *Client) IgroupCreate(params *IgroupCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupCreateCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewIgroupCreateParams()
}
op := &runtime.ClientOperation{
ID: "igroup_create",
Method: "POST",
PathPattern: "/protocols/san/igroups",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &IgroupCreateReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*IgroupCreateCreated)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*IgroupCreateDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
IgroupDelete Deletes an initiator group.
### Related ONTAP commands
* `lun igroup delete`
### Learn more
* [`DOC /protocols/san/igroups`](#docs-SAN-protocols_san_igroups)
*/
func (a *Client) IgroupDelete(params *IgroupDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupDeleteOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewIgroupDeleteParams()
}
op := &runtime.ClientOperation{
ID: "igroup_delete",
Method: "DELETE",
PathPattern: "/protocols/san/igroups/{uuid}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &IgroupDeleteReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*IgroupDeleteOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*IgroupDeleteDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
IgroupGet Retrieves an initiator group.
### Expensive properties
There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more.
* `igroups.*`
* `lun_maps.*`
* `parent_igroups.*`
* `connectivity_tracking.*`
### Related ONTAP commands
* `lun igroup show`
* `lun mapping show`
### Learn more
* [`DOC /protocols/san/igroups`](#docs-SAN-protocols_san_igroups)
*/
func (a *Client) IgroupGet(params *IgroupGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewIgroupGetParams()
}
op := &runtime.ClientOperation{
ID: "igroup_get",
Method: "GET",
PathPattern: "/protocols/san/igroups/{uuid}",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &IgroupGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*IgroupGetOK)
if ok {
return success, nil
}
// unexpected success response
unexpectedSuccess := result.(*IgroupGetDefault)
return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}
/*
IgroupInitiatorCollectionGet Retrieves initiators of an initiator group.
This API only reports initiators owned directly by the initiator group.
Initiators of nested initiator groups are not included in this
collection.
### Expensive properties
There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more.
* `connectivity_tracking.*`
### Related ONTAP commands
* `lun igroup show`
### Learn more
* [`DOC /protocols/san/igroups`](#docs-SAN-protocols_san_igroups)
*/
func (a *Client) IgroupInitiatorCollectionGet(params *IgroupInitiatorCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IgroupInitiatorCollectionGetOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewIgroupInitiatorCollectionGetParams()
}
op := &runtime.ClientOperation{
ID: "igroup_initiator_collection_get",
Method: "GET",
PathPattern: "/protocols/san/igroups/{igroup.uuid}/initiators",
ProducesMediaTypes: []string{"application/hal+json", "application/json"},
ConsumesMediaTypes: []string{"application/hal+json", "application/json"},
Schemes: []string{"https"},
Params: params,
Reader: &IgroupInitiatorCollectionGetReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
| 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/igroup_nested_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_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"
)
// NewIgroupNestedGetParams creates a new IgroupNestedGetParams 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 NewIgroupNestedGetParams() *IgroupNestedGetParams {
return &IgroupNestedGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupNestedGetParamsWithTimeout creates a new IgroupNestedGetParams object
// with the ability to set a timeout on a request.
func NewIgroupNestedGetParamsWithTimeout(timeout time.Duration) *IgroupNestedGetParams {
return &IgroupNestedGetParams{
timeout: timeout,
}
}
// NewIgroupNestedGetParamsWithContext creates a new IgroupNestedGetParams object
// with the ability to set a context for a request.
func NewIgroupNestedGetParamsWithContext(ctx context.Context) *IgroupNestedGetParams {
return &IgroupNestedGetParams{
Context: ctx,
}
}
// NewIgroupNestedGetParamsWithHTTPClient creates a new IgroupNestedGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupNestedGetParamsWithHTTPClient(client *http.Client) *IgroupNestedGetParams {
return &IgroupNestedGetParams{
HTTPClient: client,
}
}
/*
IgroupNestedGetParams contains all the parameters to send to the API endpoint
for the igroup nested get operation.
Typically these are written to a http.Request.
*/
type IgroupNestedGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupUUID.
The unique identifier of the parent initiator group.
*/
IgroupUUID string
/* UUID.
The unique identifier of the nested initiator group.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the igroup nested get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedGetParams) WithDefaults() *IgroupNestedGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup nested get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the igroup nested get params
func (o *IgroupNestedGetParams) WithTimeout(timeout time.Duration) *IgroupNestedGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup nested get params
func (o *IgroupNestedGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup nested get params
func (o *IgroupNestedGetParams) WithContext(ctx context.Context) *IgroupNestedGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup nested get params
func (o *IgroupNestedGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup nested get params
func (o *IgroupNestedGetParams) WithHTTPClient(client *http.Client) *IgroupNestedGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup nested get params
func (o *IgroupNestedGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the igroup nested get params
func (o *IgroupNestedGetParams) WithFields(fields []string) *IgroupNestedGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup nested get params
func (o *IgroupNestedGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the igroup nested get params
func (o *IgroupNestedGetParams) WithIgroupUUID(igroupUUID string) *IgroupNestedGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup nested get params
func (o *IgroupNestedGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithUUID adds the uuid to the igroup nested get params
func (o *IgroupNestedGetParams) WithUUID(uuid string) *IgroupNestedGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the igroup nested get params
func (o *IgroupNestedGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupNestedGetParams) 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 uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIgroupNestedGet binds the parameter fields
func (o *IgroupNestedGetParams) 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_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_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"
)
// LunModifyReader is a Reader for the LunModify structure.
type LunModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LunModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLunModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLunModifyDefault(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
}
}
// NewLunModifyOK creates a LunModifyOK with default headers values
func NewLunModifyOK() *LunModifyOK {
return &LunModifyOK{}
}
/*
LunModifyOK describes a response with status code 200, with default header values.
OK
*/
type LunModifyOK struct {
}
// IsSuccess returns true when this lun modify o k response has a 2xx status code
func (o *LunModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this lun modify o k response has a 3xx status code
func (o *LunModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this lun modify o k response has a 4xx status code
func (o *LunModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this lun modify o k response has a 5xx status code
func (o *LunModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this lun modify o k response a status code equal to that given
func (o *LunModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *LunModifyOK) Error() string {
return fmt.Sprintf("[PATCH /storage/luns/{uuid}][%d] lunModifyOK ", 200)
}
func (o *LunModifyOK) String() string {
return fmt.Sprintf("[PATCH /storage/luns/{uuid}][%d] lunModifyOK ", 200)
}
func (o *LunModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewLunModifyDefault creates a LunModifyDefault with default headers values
func NewLunModifyDefault(code int) *LunModifyDefault {
return &LunModifyDefault{
_statusCode: code,
}
}
/*
LunModifyDefault 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. |
| 5242927 | The specified qtree was not found. |
| 5242950 | The specified `location.qtree.id` and `location.qtree.name` do not refer to the same qtree. |
| 5374124 | The specified LUN size is too small. |
| 5374125 | The specified LUN size is too large. |
| 5374130 | An invalid size value was provided. |
| 5374241 | A size value with invalid units was provided. |
| 5374480 | Modifying the LUN is not allowed because it is in a foreign LUN import relationship. |
| 5374858 | The volume specified by `name` is not the same as that specified by `location.volume`. |
| 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`. |
| 5374864 | An error occurred after successfully overwriting data for the LUN as a clone. Some properties were not modified. |
| 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. |
| 5374874 | The specified `clone.source.uuid` and `clone.source.name` do not refer to the same LUN. |
| 5374875 | The specified LUN was not found. This can apply to `clone.source` or the target LUN. The `target` property of the error object identifies the property. |
| 5374876 | The specified LUN was not found. This can apply to `clone.source` or the target LUN. The `target` property of the error object identifies the property. |
| 5374885 | An error occurred after successfully modifying some of the properties of the LUN. Some properties were not modified. |
| 5374889 | An invalid value was specified for `movement.progress.state`. Active LUN movement operations can be PATCHed to only _paused_ or _replicating_. |
| 5374892 | An attempt was made to reduce the size of a LUN. |
| 5374904 | The destination volume is not online. |
| 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. |
| 7018919 | A copy or move job exists with the same destination LUN. |
| 13565952 | The LUN clone request failed. |
*/
type LunModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the lun modify default response
func (o *LunModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this lun modify default response has a 2xx status code
func (o *LunModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this lun modify default response has a 3xx status code
func (o *LunModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this lun modify default response has a 4xx status code
func (o *LunModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this lun modify default response has a 5xx status code
func (o *LunModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this lun modify default response a status code equal to that given
func (o *LunModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LunModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /storage/luns/{uuid}][%d] lun_modify default %+v", o._statusCode, o.Payload)
}
func (o *LunModifyDefault) String() string {
return fmt.Sprintf("[PATCH /storage/luns/{uuid}][%d] lun_modify default %+v", o._statusCode, o.Payload)
}
func (o *LunModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LunModifyDefault) 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_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/lun_map_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"
)
// NewLunMapGetParams creates a new LunMapGetParams 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 NewLunMapGetParams() *LunMapGetParams {
return &LunMapGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapGetParamsWithTimeout creates a new LunMapGetParams object
// with the ability to set a timeout on a request.
func NewLunMapGetParamsWithTimeout(timeout time.Duration) *LunMapGetParams {
return &LunMapGetParams{
timeout: timeout,
}
}
// NewLunMapGetParamsWithContext creates a new LunMapGetParams object
// with the ability to set a context for a request.
func NewLunMapGetParamsWithContext(ctx context.Context) *LunMapGetParams {
return &LunMapGetParams{
Context: ctx,
}
}
// NewLunMapGetParamsWithHTTPClient creates a new LunMapGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapGetParamsWithHTTPClient(client *http.Client) *LunMapGetParams {
return &LunMapGetParams{
HTTPClient: client,
}
}
/*
LunMapGetParams contains all the parameters to send to the API endpoint
for the lun map get operation.
Typically these are written to a http.Request.
*/
type LunMapGetParams 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
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun map get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapGetParams) WithDefaults() *LunMapGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun map get params
func (o *LunMapGetParams) WithTimeout(timeout time.Duration) *LunMapGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map get params
func (o *LunMapGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map get params
func (o *LunMapGetParams) WithContext(ctx context.Context) *LunMapGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map get params
func (o *LunMapGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map get params
func (o *LunMapGetParams) WithHTTPClient(client *http.Client) *LunMapGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map get params
func (o *LunMapGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the lun map get params
func (o *LunMapGetParams) WithFields(fields []string) *LunMapGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun map get params
func (o *LunMapGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the lun map get params
func (o *LunMapGetParams) WithIgroupUUID(igroupUUID string) *LunMapGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map get params
func (o *LunMapGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithLunUUID adds the lunUUID to the lun map get params
func (o *LunMapGetParams) WithLunUUID(lunUUID string) *LunMapGetParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map get params
func (o *LunMapGetParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapGetParams) 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 len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamLunMapGet binds the parameter fields
func (o *LunMapGetParams) 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_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_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"
)
// PortsetCreateReader is a Reader for the PortsetCreate structure.
type PortsetCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortsetCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPortsetCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortsetCreateDefault(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
}
}
// NewPortsetCreateCreated creates a PortsetCreateCreated with default headers values
func NewPortsetCreateCreated() *PortsetCreateCreated {
return &PortsetCreateCreated{}
}
/*
PortsetCreateCreated describes a response with status code 201, with default header values.
Created
*/
type PortsetCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.PortsetResponse
}
// IsSuccess returns true when this portset create created response has a 2xx status code
func (o *PortsetCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this portset create created response has a 3xx status code
func (o *PortsetCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this portset create created response has a 4xx status code
func (o *PortsetCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this portset create created response has a 5xx status code
func (o *PortsetCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this portset create created response a status code equal to that given
func (o *PortsetCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *PortsetCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/portsets][%d] portsetCreateCreated %+v", 201, o.Payload)
}
func (o *PortsetCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/portsets][%d] portsetCreateCreated %+v", 201, o.Payload)
}
func (o *PortsetCreateCreated) GetPayload() *models.PortsetResponse {
return o.Payload
}
func (o *PortsetCreateCreated) 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.PortsetResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPortsetCreateDefault creates a PortsetCreateDefault with default headers values
func NewPortsetCreateDefault(code int) *PortsetCreateDefault {
return &PortsetCreateDefault{
_statusCode: code,
}
}
/*
PortsetCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1254259 | A portset with the same name already exists in the SVM. |
| 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. |
| 5373958 | The specified portset name contains invalid characters. |
| 5374905 | An invalid interfaces array element was specified. |
| 5374906 | A specified network interface was not found. |
| 5374907 | The specified network interface UUID and name don't identify the same network interface. |
| 5374914 | An attempt was made to add a network interface of an incompatible protocol to a portset. |
*/
type PortsetCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the portset create default response
func (o *PortsetCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this portset create default response has a 2xx status code
func (o *PortsetCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this portset create default response has a 3xx status code
func (o *PortsetCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this portset create default response has a 4xx status code
func (o *PortsetCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this portset create default response has a 5xx status code
func (o *PortsetCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this portset create default response a status code equal to that given
func (o *PortsetCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortsetCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/portsets][%d] portset_create default %+v", o._statusCode, o.Payload)
}
func (o *PortsetCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/portsets][%d] portset_create default %+v", o._statusCode, o.Payload)
}
func (o *PortsetCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortsetCreateDefault) 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_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_initiator_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"
)
// IgroupInitiatorDeleteReader is a Reader for the IgroupInitiatorDelete structure.
type IgroupInitiatorDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IgroupInitiatorDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIgroupInitiatorDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIgroupInitiatorDeleteDefault(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
}
}
// NewIgroupInitiatorDeleteOK creates a IgroupInitiatorDeleteOK with default headers values
func NewIgroupInitiatorDeleteOK() *IgroupInitiatorDeleteOK {
return &IgroupInitiatorDeleteOK{}
}
/*
IgroupInitiatorDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IgroupInitiatorDeleteOK struct {
}
// IsSuccess returns true when this igroup initiator delete o k response has a 2xx status code
func (o *IgroupInitiatorDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this igroup initiator delete o k response has a 3xx status code
func (o *IgroupInitiatorDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this igroup initiator delete o k response has a 4xx status code
func (o *IgroupInitiatorDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this igroup initiator delete o k response has a 5xx status code
func (o *IgroupInitiatorDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this igroup initiator delete o k response a status code equal to that given
func (o *IgroupInitiatorDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IgroupInitiatorDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorDeleteOK ", 200)
}
func (o *IgroupInitiatorDeleteOK) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroupInitiatorDeleteOK ", 200)
}
func (o *IgroupInitiatorDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIgroupInitiatorDeleteDefault creates a IgroupInitiatorDeleteDefault with default headers values
func NewIgroupInitiatorDeleteDefault(code int) *IgroupInitiatorDeleteDefault {
return &IgroupInitiatorDeleteDefault{
_statusCode: code,
}
}
/*
IgroupInitiatorDeleteDefault 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. |
| 5374034 | An initiator is not a member of the initiator group. |
| 5374041 | The initiator is not owned by the supplied initiator group. |
| 5374852 | The initiator group specified in the URI does not exist. |
*/
type IgroupInitiatorDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the igroup initiator delete default response
func (o *IgroupInitiatorDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this igroup initiator delete default response has a 2xx status code
func (o *IgroupInitiatorDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this igroup initiator delete default response has a 3xx status code
func (o *IgroupInitiatorDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this igroup initiator delete default response has a 4xx status code
func (o *IgroupInitiatorDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this igroup initiator delete default response has a 5xx status code
func (o *IgroupInitiatorDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this igroup initiator delete default response a status code equal to that given
func (o *IgroupInitiatorDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IgroupInitiatorDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /protocols/san/igroups/{igroup.uuid}/initiators/{name}][%d] igroup_initiator_delete default %+v", o._statusCode, o.Payload)
}
func (o *IgroupInitiatorDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IgroupInitiatorDeleteDefault) 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_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/vvol_binding_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"
)
// VvolBindingCreateReader is a Reader for the VvolBindingCreate structure.
type VvolBindingCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *VvolBindingCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewVvolBindingCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewVvolBindingCreateDefault(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
}
}
// NewVvolBindingCreateCreated creates a VvolBindingCreateCreated with default headers values
func NewVvolBindingCreateCreated() *VvolBindingCreateCreated {
return &VvolBindingCreateCreated{}
}
/*
VvolBindingCreateCreated describes a response with status code 201, with default header values.
Created
*/
type VvolBindingCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.VvolBindingResponse
}
// IsSuccess returns true when this vvol binding create created response has a 2xx status code
func (o *VvolBindingCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this vvol binding create created response has a 3xx status code
func (o *VvolBindingCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this vvol binding create created response has a 4xx status code
func (o *VvolBindingCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this vvol binding create created response has a 5xx status code
func (o *VvolBindingCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this vvol binding create created response a status code equal to that given
func (o *VvolBindingCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *VvolBindingCreateCreated) Error() string {
return fmt.Sprintf("[POST /protocols/san/vvol-bindings][%d] vvolBindingCreateCreated %+v", 201, o.Payload)
}
func (o *VvolBindingCreateCreated) String() string {
return fmt.Sprintf("[POST /protocols/san/vvol-bindings][%d] vvolBindingCreateCreated %+v", 201, o.Payload)
}
func (o *VvolBindingCreateCreated) GetPayload() *models.VvolBindingResponse {
return o.Payload
}
func (o *VvolBindingCreateCreated) 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.VvolBindingResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewVvolBindingCreateDefault creates a VvolBindingCreateDefault with default headers values
func NewVvolBindingCreateDefault(code int) *VvolBindingCreateDefault {
return &VvolBindingCreateDefault{
_statusCode: code,
}
}
/*
VvolBindingCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 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. |
| 5374238 | A LUN in a Snapshot copy was specified. |
| 5374323 | The LUN specified as the protocol endpoint LUN is not of class `protocol_endpoint`. |
| 5374325 | The LUN specified as the vVol LUN is not of class `vvol`. |
| 5374874 | The UUID and name supplied for the protocol endpoint of Vvol LUN do not refer to the same LUN. Use to the `target` property of the error object to differentiate between the protocol endpoint LUN and the vVol LUN. |
| 5374875 | The protocol endpoint or vVol LUN was not found or is not accessible to the caller. Use to the `target` property of the error object to differentiate between the protocol endpoint LUN and the vVol LUN. |
| 5374876 | The protocol endpoint or vVol LUN was not found in the SVM. Use to the `target` property of the error object to differentiate between the protocol endpoint LUN and the vVol LUN. |
| 5374924 | No protocol endpoint LUN was supplied. |
| 5374925 | No vVol LUN was supplied. |
*/
type VvolBindingCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the vvol binding create default response
func (o *VvolBindingCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this vvol binding create default response has a 2xx status code
func (o *VvolBindingCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this vvol binding create default response has a 3xx status code
func (o *VvolBindingCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this vvol binding create default response has a 4xx status code
func (o *VvolBindingCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this vvol binding create default response has a 5xx status code
func (o *VvolBindingCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this vvol binding create default response a status code equal to that given
func (o *VvolBindingCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *VvolBindingCreateDefault) Error() string {
return fmt.Sprintf("[POST /protocols/san/vvol-bindings][%d] vvol_binding_create default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingCreateDefault) String() string {
return fmt.Sprintf("[POST /protocols/san/vvol-bindings][%d] vvol_binding_create default %+v", o._statusCode, o.Payload)
}
func (o *VvolBindingCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *VvolBindingCreateDefault) 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_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_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"
)
// NewLunMapReportingNodeGetParams creates a new LunMapReportingNodeGetParams 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 NewLunMapReportingNodeGetParams() *LunMapReportingNodeGetParams {
return &LunMapReportingNodeGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLunMapReportingNodeGetParamsWithTimeout creates a new LunMapReportingNodeGetParams object
// with the ability to set a timeout on a request.
func NewLunMapReportingNodeGetParamsWithTimeout(timeout time.Duration) *LunMapReportingNodeGetParams {
return &LunMapReportingNodeGetParams{
timeout: timeout,
}
}
// NewLunMapReportingNodeGetParamsWithContext creates a new LunMapReportingNodeGetParams object
// with the ability to set a context for a request.
func NewLunMapReportingNodeGetParamsWithContext(ctx context.Context) *LunMapReportingNodeGetParams {
return &LunMapReportingNodeGetParams{
Context: ctx,
}
}
// NewLunMapReportingNodeGetParamsWithHTTPClient creates a new LunMapReportingNodeGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLunMapReportingNodeGetParamsWithHTTPClient(client *http.Client) *LunMapReportingNodeGetParams {
return &LunMapReportingNodeGetParams{
HTTPClient: client,
}
}
/*
LunMapReportingNodeGetParams contains all the parameters to send to the API endpoint
for the lun map reporting node get operation.
Typically these are written to a http.Request.
*/
type LunMapReportingNodeGetParams 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
/* UUID.
The unique identifier of the node.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the lun map reporting node get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeGetParams) WithDefaults() *LunMapReportingNodeGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the lun map reporting node get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LunMapReportingNodeGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithTimeout(timeout time.Duration) *LunMapReportingNodeGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithContext(ctx context.Context) *LunMapReportingNodeGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithHTTPClient(client *http.Client) *LunMapReportingNodeGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithFields(fields []string) *LunMapReportingNodeGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithIgroupUUID(igroupUUID string) *LunMapReportingNodeGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithLunUUID adds the lunUUID to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithLunUUID(lunUUID string) *LunMapReportingNodeGetParams {
o.SetLunUUID(lunUUID)
return o
}
// SetLunUUID adds the lunUuid to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetLunUUID(lunUUID string) {
o.LunUUID = lunUUID
}
// WithUUID adds the uuid to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) WithUUID(uuid string) *LunMapReportingNodeGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the lun map reporting node get params
func (o *LunMapReportingNodeGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LunMapReportingNodeGetParams) 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
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamLunMapReportingNodeGet binds the parameter fields
func (o *LunMapReportingNodeGetParams) 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_session_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/iscsi_session_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"
)
// NewIscsiSessionCollectionGetParams creates a new IscsiSessionCollectionGetParams 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 NewIscsiSessionCollectionGetParams() *IscsiSessionCollectionGetParams {
return &IscsiSessionCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIscsiSessionCollectionGetParamsWithTimeout creates a new IscsiSessionCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIscsiSessionCollectionGetParamsWithTimeout(timeout time.Duration) *IscsiSessionCollectionGetParams {
return &IscsiSessionCollectionGetParams{
timeout: timeout,
}
}
// NewIscsiSessionCollectionGetParamsWithContext creates a new IscsiSessionCollectionGetParams object
// with the ability to set a context for a request.
func NewIscsiSessionCollectionGetParamsWithContext(ctx context.Context) *IscsiSessionCollectionGetParams {
return &IscsiSessionCollectionGetParams{
Context: ctx,
}
}
// NewIscsiSessionCollectionGetParamsWithHTTPClient creates a new IscsiSessionCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIscsiSessionCollectionGetParamsWithHTTPClient(client *http.Client) *IscsiSessionCollectionGetParams {
return &IscsiSessionCollectionGetParams{
HTTPClient: client,
}
}
/*
IscsiSessionCollectionGetParams contains all the parameters to send to the API endpoint
for the iscsi session collection get operation.
Typically these are written to a http.Request.
*/
type IscsiSessionCollectionGetParams struct {
/* ConnectionsAuthenticationType.
Filter by connections.authentication_type
*/
ConnectionsAuthenticationType *string
/* ConnectionsCid.
Filter by connections.cid
*/
ConnectionsCid *int64
/* ConnectionsInitiatorAddressAddress.
Filter by connections.initiator_address.address
*/
ConnectionsInitiatorAddressAddress *string
/* ConnectionsInitiatorAddressPort.
Filter by connections.initiator_address.port
*/
ConnectionsInitiatorAddressPort *int64
/* ConnectionsInterfaceIPAddress.
Filter by connections.interface.ip.address
*/
ConnectionsInterfaceIPAddress *string
/* ConnectionsInterfaceIPPort.
Filter by connections.interface.ip.port
*/
ConnectionsInterfaceIPPort *int64
/* ConnectionsInterfaceName.
Filter by connections.interface.name
*/
ConnectionsInterfaceName *string
/* ConnectionsInterfaceUUID.
Filter by connections.interface.uuid
*/
ConnectionsInterfaceUUID *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupsName.
Filter by igroups.name
*/
IgroupsName *string
/* IgroupsUUID.
Filter by igroups.uuid
*/
IgroupsUUID *string
/* InitiatorAlias.
Filter by initiator.alias
*/
InitiatorAlias *string
/* InitiatorComment.
Filter by initiator.comment
*/
InitiatorComment *string
/* InitiatorName.
Filter by initiator.name
*/
InitiatorName *string
/* Isid.
Filter by isid
*/
Isid *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
/* TargetPortalGroup.
Filter by target_portal_group
*/
TargetPortalGroup *string
/* TargetPortalGroupTag.
Filter by target_portal_group_tag
*/
TargetPortalGroupTag *int64
/* Tsih.
Filter by tsih
*/
Tsih *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the iscsi session collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiSessionCollectionGetParams) WithDefaults() *IscsiSessionCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the iscsi session collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IscsiSessionCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IscsiSessionCollectionGetParams{
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 session collection get params
func (o *IscsiSessionCollectionGetParams) WithTimeout(timeout time.Duration) *IscsiSessionCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithContext(ctx context.Context) *IscsiSessionCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithHTTPClient(client *http.Client) *IscsiSessionCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithConnectionsAuthenticationType adds the connectionsAuthenticationType to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsAuthenticationType(connectionsAuthenticationType *string) *IscsiSessionCollectionGetParams {
o.SetConnectionsAuthenticationType(connectionsAuthenticationType)
return o
}
// SetConnectionsAuthenticationType adds the connectionsAuthenticationType to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsAuthenticationType(connectionsAuthenticationType *string) {
o.ConnectionsAuthenticationType = connectionsAuthenticationType
}
// WithConnectionsCid adds the connectionsCid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsCid(connectionsCid *int64) *IscsiSessionCollectionGetParams {
o.SetConnectionsCid(connectionsCid)
return o
}
// SetConnectionsCid adds the connectionsCid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsCid(connectionsCid *int64) {
o.ConnectionsCid = connectionsCid
}
// WithConnectionsInitiatorAddressAddress adds the connectionsInitiatorAddressAddress to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInitiatorAddressAddress(connectionsInitiatorAddressAddress *string) *IscsiSessionCollectionGetParams {
o.SetConnectionsInitiatorAddressAddress(connectionsInitiatorAddressAddress)
return o
}
// SetConnectionsInitiatorAddressAddress adds the connectionsInitiatorAddressAddress to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInitiatorAddressAddress(connectionsInitiatorAddressAddress *string) {
o.ConnectionsInitiatorAddressAddress = connectionsInitiatorAddressAddress
}
// WithConnectionsInitiatorAddressPort adds the connectionsInitiatorAddressPort to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInitiatorAddressPort(connectionsInitiatorAddressPort *int64) *IscsiSessionCollectionGetParams {
o.SetConnectionsInitiatorAddressPort(connectionsInitiatorAddressPort)
return o
}
// SetConnectionsInitiatorAddressPort adds the connectionsInitiatorAddressPort to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInitiatorAddressPort(connectionsInitiatorAddressPort *int64) {
o.ConnectionsInitiatorAddressPort = connectionsInitiatorAddressPort
}
// WithConnectionsInterfaceIPAddress adds the connectionsInterfaceIPAddress to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInterfaceIPAddress(connectionsInterfaceIPAddress *string) *IscsiSessionCollectionGetParams {
o.SetConnectionsInterfaceIPAddress(connectionsInterfaceIPAddress)
return o
}
// SetConnectionsInterfaceIPAddress adds the connectionsInterfaceIpAddress to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInterfaceIPAddress(connectionsInterfaceIPAddress *string) {
o.ConnectionsInterfaceIPAddress = connectionsInterfaceIPAddress
}
// WithConnectionsInterfaceIPPort adds the connectionsInterfaceIPPort to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInterfaceIPPort(connectionsInterfaceIPPort *int64) *IscsiSessionCollectionGetParams {
o.SetConnectionsInterfaceIPPort(connectionsInterfaceIPPort)
return o
}
// SetConnectionsInterfaceIPPort adds the connectionsInterfaceIpPort to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInterfaceIPPort(connectionsInterfaceIPPort *int64) {
o.ConnectionsInterfaceIPPort = connectionsInterfaceIPPort
}
// WithConnectionsInterfaceName adds the connectionsInterfaceName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInterfaceName(connectionsInterfaceName *string) *IscsiSessionCollectionGetParams {
o.SetConnectionsInterfaceName(connectionsInterfaceName)
return o
}
// SetConnectionsInterfaceName adds the connectionsInterfaceName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInterfaceName(connectionsInterfaceName *string) {
o.ConnectionsInterfaceName = connectionsInterfaceName
}
// WithConnectionsInterfaceUUID adds the connectionsInterfaceUUID to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithConnectionsInterfaceUUID(connectionsInterfaceUUID *string) *IscsiSessionCollectionGetParams {
o.SetConnectionsInterfaceUUID(connectionsInterfaceUUID)
return o
}
// SetConnectionsInterfaceUUID adds the connectionsInterfaceUuid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetConnectionsInterfaceUUID(connectionsInterfaceUUID *string) {
o.ConnectionsInterfaceUUID = connectionsInterfaceUUID
}
// WithFields adds the fields to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithFields(fields []string) *IscsiSessionCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupsName adds the igroupsName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithIgroupsName(igroupsName *string) *IscsiSessionCollectionGetParams {
o.SetIgroupsName(igroupsName)
return o
}
// SetIgroupsName adds the igroupsName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetIgroupsName(igroupsName *string) {
o.IgroupsName = igroupsName
}
// WithIgroupsUUID adds the igroupsUUID to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithIgroupsUUID(igroupsUUID *string) *IscsiSessionCollectionGetParams {
o.SetIgroupsUUID(igroupsUUID)
return o
}
// SetIgroupsUUID adds the igroupsUuid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetIgroupsUUID(igroupsUUID *string) {
o.IgroupsUUID = igroupsUUID
}
// WithInitiatorAlias adds the initiatorAlias to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithInitiatorAlias(initiatorAlias *string) *IscsiSessionCollectionGetParams {
o.SetInitiatorAlias(initiatorAlias)
return o
}
// SetInitiatorAlias adds the initiatorAlias to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetInitiatorAlias(initiatorAlias *string) {
o.InitiatorAlias = initiatorAlias
}
// WithInitiatorComment adds the initiatorComment to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithInitiatorComment(initiatorComment *string) *IscsiSessionCollectionGetParams {
o.SetInitiatorComment(initiatorComment)
return o
}
// SetInitiatorComment adds the initiatorComment to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetInitiatorComment(initiatorComment *string) {
o.InitiatorComment = initiatorComment
}
// WithInitiatorName adds the initiatorName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithInitiatorName(initiatorName *string) *IscsiSessionCollectionGetParams {
o.SetInitiatorName(initiatorName)
return o
}
// SetInitiatorName adds the initiatorName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetInitiatorName(initiatorName *string) {
o.InitiatorName = initiatorName
}
// WithIsid adds the isid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithIsid(isid *string) *IscsiSessionCollectionGetParams {
o.SetIsid(isid)
return o
}
// SetIsid adds the isid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetIsid(isid *string) {
o.Isid = isid
}
// WithMaxRecords adds the maxRecords to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithMaxRecords(maxRecords *int64) *IscsiSessionCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithOrderBy(orderBy []string) *IscsiSessionCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithReturnRecords(returnRecords *bool) *IscsiSessionCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IscsiSessionCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithSvmName(svmName *string) *IscsiSessionCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithSvmUUID(svmUUID *string) *IscsiSessionCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithTargetPortalGroup adds the targetPortalGroup to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithTargetPortalGroup(targetPortalGroup *string) *IscsiSessionCollectionGetParams {
o.SetTargetPortalGroup(targetPortalGroup)
return o
}
// SetTargetPortalGroup adds the targetPortalGroup to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetTargetPortalGroup(targetPortalGroup *string) {
o.TargetPortalGroup = targetPortalGroup
}
// WithTargetPortalGroupTag adds the targetPortalGroupTag to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithTargetPortalGroupTag(targetPortalGroupTag *int64) *IscsiSessionCollectionGetParams {
o.SetTargetPortalGroupTag(targetPortalGroupTag)
return o
}
// SetTargetPortalGroupTag adds the targetPortalGroupTag to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetTargetPortalGroupTag(targetPortalGroupTag *int64) {
o.TargetPortalGroupTag = targetPortalGroupTag
}
// WithTsih adds the tsih to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) WithTsih(tsih *int64) *IscsiSessionCollectionGetParams {
o.SetTsih(tsih)
return o
}
// SetTsih adds the tsih to the iscsi session collection get params
func (o *IscsiSessionCollectionGetParams) SetTsih(tsih *int64) {
o.Tsih = tsih
}
// WriteToRequest writes these params to a swagger request
func (o *IscsiSessionCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.ConnectionsAuthenticationType != nil {
// query param connections.authentication_type
var qrConnectionsAuthenticationType string
if o.ConnectionsAuthenticationType != nil {
qrConnectionsAuthenticationType = *o.ConnectionsAuthenticationType
}
qConnectionsAuthenticationType := qrConnectionsAuthenticationType
if qConnectionsAuthenticationType != "" {
if err := r.SetQueryParam("connections.authentication_type", qConnectionsAuthenticationType); err != nil {
return err
}
}
}
if o.ConnectionsCid != nil {
// query param connections.cid
var qrConnectionsCid int64
if o.ConnectionsCid != nil {
qrConnectionsCid = *o.ConnectionsCid
}
qConnectionsCid := swag.FormatInt64(qrConnectionsCid)
if qConnectionsCid != "" {
if err := r.SetQueryParam("connections.cid", qConnectionsCid); err != nil {
return err
}
}
}
if o.ConnectionsInitiatorAddressAddress != nil {
// query param connections.initiator_address.address
var qrConnectionsInitiatorAddressAddress string
if o.ConnectionsInitiatorAddressAddress != nil {
qrConnectionsInitiatorAddressAddress = *o.ConnectionsInitiatorAddressAddress
}
qConnectionsInitiatorAddressAddress := qrConnectionsInitiatorAddressAddress
if qConnectionsInitiatorAddressAddress != "" {
if err := r.SetQueryParam("connections.initiator_address.address", qConnectionsInitiatorAddressAddress); err != nil {
return err
}
}
}
if o.ConnectionsInitiatorAddressPort != nil {
// query param connections.initiator_address.port
var qrConnectionsInitiatorAddressPort int64
if o.ConnectionsInitiatorAddressPort != nil {
qrConnectionsInitiatorAddressPort = *o.ConnectionsInitiatorAddressPort
}
qConnectionsInitiatorAddressPort := swag.FormatInt64(qrConnectionsInitiatorAddressPort)
if qConnectionsInitiatorAddressPort != "" {
if err := r.SetQueryParam("connections.initiator_address.port", qConnectionsInitiatorAddressPort); err != nil {
return err
}
}
}
if o.ConnectionsInterfaceIPAddress != nil {
// query param connections.interface.ip.address
var qrConnectionsInterfaceIPAddress string
if o.ConnectionsInterfaceIPAddress != nil {
qrConnectionsInterfaceIPAddress = *o.ConnectionsInterfaceIPAddress
}
qConnectionsInterfaceIPAddress := qrConnectionsInterfaceIPAddress
if qConnectionsInterfaceIPAddress != "" {
if err := r.SetQueryParam("connections.interface.ip.address", qConnectionsInterfaceIPAddress); err != nil {
return err
}
}
}
if o.ConnectionsInterfaceIPPort != nil {
// query param connections.interface.ip.port
var qrConnectionsInterfaceIPPort int64
if o.ConnectionsInterfaceIPPort != nil {
qrConnectionsInterfaceIPPort = *o.ConnectionsInterfaceIPPort
}
qConnectionsInterfaceIPPort := swag.FormatInt64(qrConnectionsInterfaceIPPort)
if qConnectionsInterfaceIPPort != "" {
if err := r.SetQueryParam("connections.interface.ip.port", qConnectionsInterfaceIPPort); err != nil {
return err
}
}
}
if o.ConnectionsInterfaceName != nil {
// query param connections.interface.name
var qrConnectionsInterfaceName string
if o.ConnectionsInterfaceName != nil {
qrConnectionsInterfaceName = *o.ConnectionsInterfaceName
}
qConnectionsInterfaceName := qrConnectionsInterfaceName
if qConnectionsInterfaceName != "" {
if err := r.SetQueryParam("connections.interface.name", qConnectionsInterfaceName); err != nil {
return err
}
}
}
if o.ConnectionsInterfaceUUID != nil {
// query param connections.interface.uuid
var qrConnectionsInterfaceUUID string
if o.ConnectionsInterfaceUUID != nil {
qrConnectionsInterfaceUUID = *o.ConnectionsInterfaceUUID
}
qConnectionsInterfaceUUID := qrConnectionsInterfaceUUID
if qConnectionsInterfaceUUID != "" {
if err := r.SetQueryParam("connections.interface.uuid", qConnectionsInterfaceUUID); 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.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.InitiatorAlias != nil {
// query param initiator.alias
var qrInitiatorAlias string
if o.InitiatorAlias != nil {
qrInitiatorAlias = *o.InitiatorAlias
}
qInitiatorAlias := qrInitiatorAlias
if qInitiatorAlias != "" {
if err := r.SetQueryParam("initiator.alias", qInitiatorAlias); 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.InitiatorName != nil {
// query param initiator.name
var qrInitiatorName string
if o.InitiatorName != nil {
qrInitiatorName = *o.InitiatorName
}
qInitiatorName := qrInitiatorName
if qInitiatorName != "" {
if err := r.SetQueryParam("initiator.name", qInitiatorName); err != nil {
return err
}
}
}
if o.Isid != nil {
// query param isid
var qrIsid string
if o.Isid != nil {
qrIsid = *o.Isid
}
qIsid := qrIsid
if qIsid != "" {
if err := r.SetQueryParam("isid", qIsid); 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.TargetPortalGroup != nil {
// query param target_portal_group
var qrTargetPortalGroup string
if o.TargetPortalGroup != nil {
qrTargetPortalGroup = *o.TargetPortalGroup
}
qTargetPortalGroup := qrTargetPortalGroup
if qTargetPortalGroup != "" {
if err := r.SetQueryParam("target_portal_group", qTargetPortalGroup); err != nil {
return err
}
}
}
if o.TargetPortalGroupTag != nil {
// query param target_portal_group_tag
var qrTargetPortalGroupTag int64
if o.TargetPortalGroupTag != nil {
qrTargetPortalGroupTag = *o.TargetPortalGroupTag
}
qTargetPortalGroupTag := swag.FormatInt64(qrTargetPortalGroupTag)
if qTargetPortalGroupTag != "" {
if err := r.SetQueryParam("target_portal_group_tag", qTargetPortalGroupTag); err != nil {
return err
}
}
}
if o.Tsih != nil {
// query param tsih
var qrTsih int64
if o.Tsih != nil {
qrTsih = *o.Tsih
}
qTsih := swag.FormatInt64(qrTsih)
if qTsih != "" {
if err := r.SetQueryParam("tsih", qTsih); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamIscsiSessionCollectionGet binds the parameter fields
func (o *IscsiSessionCollectionGetParams) 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
}
// bindParamIscsiSessionCollectionGet binds the parameter order_by
func (o *IscsiSessionCollectionGetParams) 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_nested_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/igroup_nested_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"
)
// NewIgroupNestedCollectionGetParams creates a new IgroupNestedCollectionGetParams 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 NewIgroupNestedCollectionGetParams() *IgroupNestedCollectionGetParams {
return &IgroupNestedCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIgroupNestedCollectionGetParamsWithTimeout creates a new IgroupNestedCollectionGetParams object
// with the ability to set a timeout on a request.
func NewIgroupNestedCollectionGetParamsWithTimeout(timeout time.Duration) *IgroupNestedCollectionGetParams {
return &IgroupNestedCollectionGetParams{
timeout: timeout,
}
}
// NewIgroupNestedCollectionGetParamsWithContext creates a new IgroupNestedCollectionGetParams object
// with the ability to set a context for a request.
func NewIgroupNestedCollectionGetParamsWithContext(ctx context.Context) *IgroupNestedCollectionGetParams {
return &IgroupNestedCollectionGetParams{
Context: ctx,
}
}
// NewIgroupNestedCollectionGetParamsWithHTTPClient creates a new IgroupNestedCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIgroupNestedCollectionGetParamsWithHTTPClient(client *http.Client) *IgroupNestedCollectionGetParams {
return &IgroupNestedCollectionGetParams{
HTTPClient: client,
}
}
/*
IgroupNestedCollectionGetParams contains all the parameters to send to the API endpoint
for the igroup nested collection get operation.
Typically these are written to a http.Request.
*/
type IgroupNestedCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupUUID.
The unique identifier of the parent 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 nested collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedCollectionGetParams) WithDefaults() *IgroupNestedCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the igroup nested collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IgroupNestedCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := IgroupNestedCollectionGetParams{
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 nested collection get params
func (o *IgroupNestedCollectionGetParams) WithTimeout(timeout time.Duration) *IgroupNestedCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithContext(ctx context.Context) *IgroupNestedCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithHTTPClient(client *http.Client) *IgroupNestedCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithFields(fields []string) *IgroupNestedCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupUUID adds the igroupUUID to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithIgroupUUID(igroupUUID string) *IgroupNestedCollectionGetParams {
o.SetIgroupUUID(igroupUUID)
return o
}
// SetIgroupUUID adds the igroupUuid to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetIgroupUUID(igroupUUID string) {
o.IgroupUUID = igroupUUID
}
// WithMaxRecords adds the maxRecords to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithMaxRecords(maxRecords *int64) *IgroupNestedCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithOrderBy(orderBy []string) *IgroupNestedCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithReturnRecords(returnRecords *bool) *IgroupNestedCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *IgroupNestedCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the igroup nested collection get params
func (o *IgroupNestedCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *IgroupNestedCollectionGetParams) 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
}
// bindParamIgroupNestedCollectionGet binds the parameter fields
func (o *IgroupNestedCollectionGetParams) 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
}
// bindParamIgroupNestedCollectionGet binds the parameter order_by
func (o *IgroupNestedCollectionGetParams) 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/wwpn_alias_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_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"
)
// WwpnAliasGetReader is a Reader for the WwpnAliasGet structure.
type WwpnAliasGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WwpnAliasGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewWwpnAliasGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWwpnAliasGetDefault(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
}
}
// NewWwpnAliasGetOK creates a WwpnAliasGetOK with default headers values
func NewWwpnAliasGetOK() *WwpnAliasGetOK {
return &WwpnAliasGetOK{}
}
/*
WwpnAliasGetOK describes a response with status code 200, with default header values.
OK
*/
type WwpnAliasGetOK struct {
Payload *models.WwpnAlias
}
// IsSuccess returns true when this wwpn alias get o k response has a 2xx status code
func (o *WwpnAliasGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this wwpn alias get o k response has a 3xx status code
func (o *WwpnAliasGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this wwpn alias get o k response has a 4xx status code
func (o *WwpnAliasGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this wwpn alias get o k response has a 5xx status code
func (o *WwpnAliasGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this wwpn alias get o k response a status code equal to that given
func (o *WwpnAliasGetOK) IsCode(code int) bool {
return code == 200
}
func (o *WwpnAliasGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpnAliasGetOK %+v", 200, o.Payload)
}
func (o *WwpnAliasGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpnAliasGetOK %+v", 200, o.Payload)
}
func (o *WwpnAliasGetOK) GetPayload() *models.WwpnAlias {
return o.Payload
}
func (o *WwpnAliasGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.WwpnAlias)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewWwpnAliasGetDefault creates a WwpnAliasGetDefault with default headers values
func NewWwpnAliasGetDefault(code int) *WwpnAliasGetDefault {
return &WwpnAliasGetDefault{
_statusCode: code,
}
}
/*
WwpnAliasGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1260882 | The supplied SVM does not exist. |
*/
type WwpnAliasGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the wwpn alias get default response
func (o *WwpnAliasGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this wwpn alias get default response has a 2xx status code
func (o *WwpnAliasGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this wwpn alias get default response has a 3xx status code
func (o *WwpnAliasGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this wwpn alias get default response has a 4xx status code
func (o *WwpnAliasGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this wwpn alias get default response has a 5xx status code
func (o *WwpnAliasGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this wwpn alias get default response a status code equal to that given
func (o *WwpnAliasGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WwpnAliasGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpn_alias_get default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/wwpn-aliases/{svm.uuid}/{alias}][%d] wwpn_alias_get default %+v", o._statusCode, o.Payload)
}
func (o *WwpnAliasGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WwpnAliasGetDefault) 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_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/portset_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"
)
// NewPortsetCollectionGetParams creates a new PortsetCollectionGetParams 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 NewPortsetCollectionGetParams() *PortsetCollectionGetParams {
return &PortsetCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortsetCollectionGetParamsWithTimeout creates a new PortsetCollectionGetParams object
// with the ability to set a timeout on a request.
func NewPortsetCollectionGetParamsWithTimeout(timeout time.Duration) *PortsetCollectionGetParams {
return &PortsetCollectionGetParams{
timeout: timeout,
}
}
// NewPortsetCollectionGetParamsWithContext creates a new PortsetCollectionGetParams object
// with the ability to set a context for a request.
func NewPortsetCollectionGetParamsWithContext(ctx context.Context) *PortsetCollectionGetParams {
return &PortsetCollectionGetParams{
Context: ctx,
}
}
// NewPortsetCollectionGetParamsWithHTTPClient creates a new PortsetCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortsetCollectionGetParamsWithHTTPClient(client *http.Client) *PortsetCollectionGetParams {
return &PortsetCollectionGetParams{
HTTPClient: client,
}
}
/*
PortsetCollectionGetParams contains all the parameters to send to the API endpoint
for the portset collection get operation.
Typically these are written to a http.Request.
*/
type PortsetCollectionGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IgroupsName.
Filter by igroups.name
*/
IgroupsName *string
/* IgroupsUUID.
Filter by igroups.uuid
*/
IgroupsUUID *string
/* InterfacesFcName.
Filter by interfaces.fc.name
*/
InterfacesFcName *string
/* InterfacesFcUUID.
Filter by interfaces.fc.uuid
*/
InterfacesFcUUID *string
/* InterfacesFcWwpn.
Filter by interfaces.fc.wwpn
*/
InterfacesFcWwpn *string
/* InterfacesIPIPAddress.
Filter by interfaces.ip.ip.address
*/
InterfacesIPIPAddress *string
/* InterfacesIPName.
Filter by interfaces.ip.name
*/
InterfacesIPName *string
/* InterfacesIPUUID.
Filter by interfaces.ip.uuid
*/
InterfacesIPUUID *string
/* InterfacesUUID.
Filter by interfaces.uuid
*/
InterfacesUUID *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
/* 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
/* UUID.
Filter by uuid
*/
UUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the portset collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetCollectionGetParams) WithDefaults() *PortsetCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the portset collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortsetCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := PortsetCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the portset collection get params
func (o *PortsetCollectionGetParams) WithTimeout(timeout time.Duration) *PortsetCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the portset collection get params
func (o *PortsetCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the portset collection get params
func (o *PortsetCollectionGetParams) WithContext(ctx context.Context) *PortsetCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the portset collection get params
func (o *PortsetCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the portset collection get params
func (o *PortsetCollectionGetParams) WithHTTPClient(client *http.Client) *PortsetCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the portset collection get params
func (o *PortsetCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the portset collection get params
func (o *PortsetCollectionGetParams) WithFields(fields []string) *PortsetCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the portset collection get params
func (o *PortsetCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIgroupsName adds the igroupsName to the portset collection get params
func (o *PortsetCollectionGetParams) WithIgroupsName(igroupsName *string) *PortsetCollectionGetParams {
o.SetIgroupsName(igroupsName)
return o
}
// SetIgroupsName adds the igroupsName to the portset collection get params
func (o *PortsetCollectionGetParams) SetIgroupsName(igroupsName *string) {
o.IgroupsName = igroupsName
}
// WithIgroupsUUID adds the igroupsUUID to the portset collection get params
func (o *PortsetCollectionGetParams) WithIgroupsUUID(igroupsUUID *string) *PortsetCollectionGetParams {
o.SetIgroupsUUID(igroupsUUID)
return o
}
// SetIgroupsUUID adds the igroupsUuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetIgroupsUUID(igroupsUUID *string) {
o.IgroupsUUID = igroupsUUID
}
// WithInterfacesFcName adds the interfacesFcName to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesFcName(interfacesFcName *string) *PortsetCollectionGetParams {
o.SetInterfacesFcName(interfacesFcName)
return o
}
// SetInterfacesFcName adds the interfacesFcName to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesFcName(interfacesFcName *string) {
o.InterfacesFcName = interfacesFcName
}
// WithInterfacesFcUUID adds the interfacesFcUUID to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesFcUUID(interfacesFcUUID *string) *PortsetCollectionGetParams {
o.SetInterfacesFcUUID(interfacesFcUUID)
return o
}
// SetInterfacesFcUUID adds the interfacesFcUuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesFcUUID(interfacesFcUUID *string) {
o.InterfacesFcUUID = interfacesFcUUID
}
// WithInterfacesFcWwpn adds the interfacesFcWwpn to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesFcWwpn(interfacesFcWwpn *string) *PortsetCollectionGetParams {
o.SetInterfacesFcWwpn(interfacesFcWwpn)
return o
}
// SetInterfacesFcWwpn adds the interfacesFcWwpn to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesFcWwpn(interfacesFcWwpn *string) {
o.InterfacesFcWwpn = interfacesFcWwpn
}
// WithInterfacesIPIPAddress adds the interfacesIPIPAddress to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesIPIPAddress(interfacesIPIPAddress *string) *PortsetCollectionGetParams {
o.SetInterfacesIPIPAddress(interfacesIPIPAddress)
return o
}
// SetInterfacesIPIPAddress adds the interfacesIpIpAddress to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesIPIPAddress(interfacesIPIPAddress *string) {
o.InterfacesIPIPAddress = interfacesIPIPAddress
}
// WithInterfacesIPName adds the interfacesIPName to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesIPName(interfacesIPName *string) *PortsetCollectionGetParams {
o.SetInterfacesIPName(interfacesIPName)
return o
}
// SetInterfacesIPName adds the interfacesIpName to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesIPName(interfacesIPName *string) {
o.InterfacesIPName = interfacesIPName
}
// WithInterfacesIPUUID adds the interfacesIPUUID to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesIPUUID(interfacesIPUUID *string) *PortsetCollectionGetParams {
o.SetInterfacesIPUUID(interfacesIPUUID)
return o
}
// SetInterfacesIPUUID adds the interfacesIpUuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesIPUUID(interfacesIPUUID *string) {
o.InterfacesIPUUID = interfacesIPUUID
}
// WithInterfacesUUID adds the interfacesUUID to the portset collection get params
func (o *PortsetCollectionGetParams) WithInterfacesUUID(interfacesUUID *string) *PortsetCollectionGetParams {
o.SetInterfacesUUID(interfacesUUID)
return o
}
// SetInterfacesUUID adds the interfacesUuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetInterfacesUUID(interfacesUUID *string) {
o.InterfacesUUID = interfacesUUID
}
// WithMaxRecords adds the maxRecords to the portset collection get params
func (o *PortsetCollectionGetParams) WithMaxRecords(maxRecords *int64) *PortsetCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the portset collection get params
func (o *PortsetCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the portset collection get params
func (o *PortsetCollectionGetParams) WithName(name *string) *PortsetCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the portset collection get params
func (o *PortsetCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the portset collection get params
func (o *PortsetCollectionGetParams) WithOrderBy(orderBy []string) *PortsetCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the portset collection get params
func (o *PortsetCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithProtocol adds the protocol to the portset collection get params
func (o *PortsetCollectionGetParams) WithProtocol(protocol *string) *PortsetCollectionGetParams {
o.SetProtocol(protocol)
return o
}
// SetProtocol adds the protocol to the portset collection get params
func (o *PortsetCollectionGetParams) SetProtocol(protocol *string) {
o.Protocol = protocol
}
// WithReturnRecords adds the returnRecords to the portset collection get params
func (o *PortsetCollectionGetParams) WithReturnRecords(returnRecords *bool) *PortsetCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the portset collection get params
func (o *PortsetCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the portset collection get params
func (o *PortsetCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *PortsetCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the portset collection get params
func (o *PortsetCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the portset collection get params
func (o *PortsetCollectionGetParams) WithSvmName(svmName *string) *PortsetCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the portset collection get params
func (o *PortsetCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the portset collection get params
func (o *PortsetCollectionGetParams) WithSvmUUID(svmUUID *string) *PortsetCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithUUID adds the uuid to the portset collection get params
func (o *PortsetCollectionGetParams) WithUUID(uuid *string) *PortsetCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the portset collection get params
func (o *PortsetCollectionGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortsetCollectionGetParams) 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.InterfacesFcName != nil {
// query param interfaces.fc.name
var qrInterfacesFcName string
if o.InterfacesFcName != nil {
qrInterfacesFcName = *o.InterfacesFcName
}
qInterfacesFcName := qrInterfacesFcName
if qInterfacesFcName != "" {
if err := r.SetQueryParam("interfaces.fc.name", qInterfacesFcName); err != nil {
return err
}
}
}
if o.InterfacesFcUUID != nil {
// query param interfaces.fc.uuid
var qrInterfacesFcUUID string
if o.InterfacesFcUUID != nil {
qrInterfacesFcUUID = *o.InterfacesFcUUID
}
qInterfacesFcUUID := qrInterfacesFcUUID
if qInterfacesFcUUID != "" {
if err := r.SetQueryParam("interfaces.fc.uuid", qInterfacesFcUUID); err != nil {
return err
}
}
}
if o.InterfacesFcWwpn != nil {
// query param interfaces.fc.wwpn
var qrInterfacesFcWwpn string
if o.InterfacesFcWwpn != nil {
qrInterfacesFcWwpn = *o.InterfacesFcWwpn
}
qInterfacesFcWwpn := qrInterfacesFcWwpn
if qInterfacesFcWwpn != "" {
if err := r.SetQueryParam("interfaces.fc.wwpn", qInterfacesFcWwpn); err != nil {
return err
}
}
}
if o.InterfacesIPIPAddress != nil {
// query param interfaces.ip.ip.address
var qrInterfacesIPIPAddress string
if o.InterfacesIPIPAddress != nil {
qrInterfacesIPIPAddress = *o.InterfacesIPIPAddress
}
qInterfacesIPIPAddress := qrInterfacesIPIPAddress
if qInterfacesIPIPAddress != "" {
if err := r.SetQueryParam("interfaces.ip.ip.address", qInterfacesIPIPAddress); err != nil {
return err
}
}
}
if o.InterfacesIPName != nil {
// query param interfaces.ip.name
var qrInterfacesIPName string
if o.InterfacesIPName != nil {
qrInterfacesIPName = *o.InterfacesIPName
}
qInterfacesIPName := qrInterfacesIPName
if qInterfacesIPName != "" {
if err := r.SetQueryParam("interfaces.ip.name", qInterfacesIPName); err != nil {
return err
}
}
}
if o.InterfacesIPUUID != nil {
// query param interfaces.ip.uuid
var qrInterfacesIPUUID string
if o.InterfacesIPUUID != nil {
qrInterfacesIPUUID = *o.InterfacesIPUUID
}
qInterfacesIPUUID := qrInterfacesIPUUID
if qInterfacesIPUUID != "" {
if err := r.SetQueryParam("interfaces.ip.uuid", qInterfacesIPUUID); err != nil {
return err
}
}
}
if o.InterfacesUUID != nil {
// query param interfaces.uuid
var qrInterfacesUUID string
if o.InterfacesUUID != nil {
qrInterfacesUUID = *o.InterfacesUUID
}
qInterfacesUUID := qrInterfacesUUID
if qInterfacesUUID != "" {
if err := r.SetQueryParam("interfaces.uuid", qInterfacesUUID); 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.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 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
}
// bindParamPortsetCollectionGet binds the parameter fields
func (o *PortsetCollectionGetParams) 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
}
// bindParamPortsetCollectionGet binds the parameter order_by
func (o *PortsetCollectionGetParams) 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/wwpn_alias_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/s_a_n/wwpn_alias_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"
)
// NewWwpnAliasGetParams creates a new WwpnAliasGetParams 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 NewWwpnAliasGetParams() *WwpnAliasGetParams {
return &WwpnAliasGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewWwpnAliasGetParamsWithTimeout creates a new WwpnAliasGetParams object
// with the ability to set a timeout on a request.
func NewWwpnAliasGetParamsWithTimeout(timeout time.Duration) *WwpnAliasGetParams {
return &WwpnAliasGetParams{
timeout: timeout,
}
}
// NewWwpnAliasGetParamsWithContext creates a new WwpnAliasGetParams object
// with the ability to set a context for a request.
func NewWwpnAliasGetParamsWithContext(ctx context.Context) *WwpnAliasGetParams {
return &WwpnAliasGetParams{
Context: ctx,
}
}
// NewWwpnAliasGetParamsWithHTTPClient creates a new WwpnAliasGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewWwpnAliasGetParamsWithHTTPClient(client *http.Client) *WwpnAliasGetParams {
return &WwpnAliasGetParams{
HTTPClient: client,
}
}
/*
WwpnAliasGetParams contains all the parameters to send to the API endpoint
for the wwpn alias get operation.
Typically these are written to a http.Request.
*/
type WwpnAliasGetParams struct {
/* Alias.
The name of FC WWPN alias.
*/
Alias string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* SvmUUID.
The unique identifier of the SVM in which the alias is found.
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the wwpn alias get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasGetParams) WithDefaults() *WwpnAliasGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the wwpn alias get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WwpnAliasGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the wwpn alias get params
func (o *WwpnAliasGetParams) WithTimeout(timeout time.Duration) *WwpnAliasGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the wwpn alias get params
func (o *WwpnAliasGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the wwpn alias get params
func (o *WwpnAliasGetParams) WithContext(ctx context.Context) *WwpnAliasGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the wwpn alias get params
func (o *WwpnAliasGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the wwpn alias get params
func (o *WwpnAliasGetParams) WithHTTPClient(client *http.Client) *WwpnAliasGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the wwpn alias get params
func (o *WwpnAliasGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAlias adds the alias to the wwpn alias get params
func (o *WwpnAliasGetParams) WithAlias(alias string) *WwpnAliasGetParams {
o.SetAlias(alias)
return o
}
// SetAlias adds the alias to the wwpn alias get params
func (o *WwpnAliasGetParams) SetAlias(alias string) {
o.Alias = alias
}
// WithFields adds the fields to the wwpn alias get params
func (o *WwpnAliasGetParams) WithFields(fields []string) *WwpnAliasGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the wwpn alias get params
func (o *WwpnAliasGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithSvmUUID adds the svmUUID to the wwpn alias get params
func (o *WwpnAliasGetParams) WithSvmUUID(svmUUID string) *WwpnAliasGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the wwpn alias get params
func (o *WwpnAliasGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *WwpnAliasGetParams) 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
}
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
}
// bindParamWwpnAliasGet binds the parameter fields
func (o *WwpnAliasGetParams) 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/networking/performance_fc_port_metric_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/performance_fc_port_metric_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// PerformanceFcPortMetricCollectionGetReader is a Reader for the PerformanceFcPortMetricCollectionGet structure.
type PerformanceFcPortMetricCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PerformanceFcPortMetricCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPerformanceFcPortMetricCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPerformanceFcPortMetricCollectionGetDefault(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
}
}
// NewPerformanceFcPortMetricCollectionGetOK creates a PerformanceFcPortMetricCollectionGetOK with default headers values
func NewPerformanceFcPortMetricCollectionGetOK() *PerformanceFcPortMetricCollectionGetOK {
return &PerformanceFcPortMetricCollectionGetOK{}
}
/*
PerformanceFcPortMetricCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type PerformanceFcPortMetricCollectionGetOK struct {
Payload *models.PerformanceFcPortMetricResponse
}
// IsSuccess returns true when this performance fc port metric collection get o k response has a 2xx status code
func (o *PerformanceFcPortMetricCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this performance fc port metric collection get o k response has a 3xx status code
func (o *PerformanceFcPortMetricCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this performance fc port metric collection get o k response has a 4xx status code
func (o *PerformanceFcPortMetricCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this performance fc port metric collection get o k response has a 5xx status code
func (o *PerformanceFcPortMetricCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this performance fc port metric collection get o k response a status code equal to that given
func (o *PerformanceFcPortMetricCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PerformanceFcPortMetricCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/ports/{uuid}/metrics][%d] performanceFcPortMetricCollectionGetOK %+v", 200, o.Payload)
}
func (o *PerformanceFcPortMetricCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/ports/{uuid}/metrics][%d] performanceFcPortMetricCollectionGetOK %+v", 200, o.Payload)
}
func (o *PerformanceFcPortMetricCollectionGetOK) GetPayload() *models.PerformanceFcPortMetricResponse {
return o.Payload
}
func (o *PerformanceFcPortMetricCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PerformanceFcPortMetricResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPerformanceFcPortMetricCollectionGetDefault creates a PerformanceFcPortMetricCollectionGetDefault with default headers values
func NewPerformanceFcPortMetricCollectionGetDefault(code int) *PerformanceFcPortMetricCollectionGetDefault {
return &PerformanceFcPortMetricCollectionGetDefault{
_statusCode: code,
}
}
/*
PerformanceFcPortMetricCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type PerformanceFcPortMetricCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the performance fc port metric collection get default response
func (o *PerformanceFcPortMetricCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this performance fc port metric collection get default response has a 2xx status code
func (o *PerformanceFcPortMetricCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this performance fc port metric collection get default response has a 3xx status code
func (o *PerformanceFcPortMetricCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this performance fc port metric collection get default response has a 4xx status code
func (o *PerformanceFcPortMetricCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this performance fc port metric collection get default response has a 5xx status code
func (o *PerformanceFcPortMetricCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this performance fc port metric collection get default response a status code equal to that given
func (o *PerformanceFcPortMetricCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PerformanceFcPortMetricCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/ports/{uuid}/metrics][%d] performance_fc_port_metric_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PerformanceFcPortMetricCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/ports/{uuid}/metrics][%d] performance_fc_port_metric_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PerformanceFcPortMetricCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PerformanceFcPortMetricCollectionGetDefault) 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/networking/network_ethernet_broadcast_domain_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_broadcast_domain_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetBroadcastDomainGetParams creates a new NetworkEthernetBroadcastDomainGetParams 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 NewNetworkEthernetBroadcastDomainGetParams() *NetworkEthernetBroadcastDomainGetParams {
return &NetworkEthernetBroadcastDomainGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetBroadcastDomainGetParamsWithTimeout creates a new NetworkEthernetBroadcastDomainGetParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetBroadcastDomainGetParamsWithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainGetParams {
return &NetworkEthernetBroadcastDomainGetParams{
timeout: timeout,
}
}
// NewNetworkEthernetBroadcastDomainGetParamsWithContext creates a new NetworkEthernetBroadcastDomainGetParams object
// with the ability to set a context for a request.
func NewNetworkEthernetBroadcastDomainGetParamsWithContext(ctx context.Context) *NetworkEthernetBroadcastDomainGetParams {
return &NetworkEthernetBroadcastDomainGetParams{
Context: ctx,
}
}
// NewNetworkEthernetBroadcastDomainGetParamsWithHTTPClient creates a new NetworkEthernetBroadcastDomainGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetBroadcastDomainGetParamsWithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainGetParams {
return &NetworkEthernetBroadcastDomainGetParams{
HTTPClient: client,
}
}
/*
NetworkEthernetBroadcastDomainGetParams contains all the parameters to send to the API endpoint
for the network ethernet broadcast domain get operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetBroadcastDomainGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
Broadcast domain UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ethernet broadcast domain get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainGetParams) WithDefaults() *NetworkEthernetBroadcastDomainGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet broadcast domain get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) WithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) WithContext(ctx context.Context) *NetworkEthernetBroadcastDomainGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) WithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) WithFields(fields []string) *NetworkEthernetBroadcastDomainGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) WithUUID(uuid string) *NetworkEthernetBroadcastDomainGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ethernet broadcast domain get params
func (o *NetworkEthernetBroadcastDomainGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetBroadcastDomainGetParams) 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
}
// bindParamNetworkEthernetBroadcastDomainGet binds the parameter fields
func (o *NetworkEthernetBroadcastDomainGetParams) 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/networking/ipspace_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ipspace_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIpspaceModifyParams creates a new IpspaceModifyParams 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 NewIpspaceModifyParams() *IpspaceModifyParams {
return &IpspaceModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewIpspaceModifyParamsWithTimeout creates a new IpspaceModifyParams object
// with the ability to set a timeout on a request.
func NewIpspaceModifyParamsWithTimeout(timeout time.Duration) *IpspaceModifyParams {
return &IpspaceModifyParams{
timeout: timeout,
}
}
// NewIpspaceModifyParamsWithContext creates a new IpspaceModifyParams object
// with the ability to set a context for a request.
func NewIpspaceModifyParamsWithContext(ctx context.Context) *IpspaceModifyParams {
return &IpspaceModifyParams{
Context: ctx,
}
}
// NewIpspaceModifyParamsWithHTTPClient creates a new IpspaceModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewIpspaceModifyParamsWithHTTPClient(client *http.Client) *IpspaceModifyParams {
return &IpspaceModifyParams{
HTTPClient: client,
}
}
/*
IpspaceModifyParams contains all the parameters to send to the API endpoint
for the ipspace modify operation.
Typically these are written to a http.Request.
*/
type IpspaceModifyParams struct {
// Info.
Info *models.Ipspace
/* UUID.
IPspace UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the ipspace modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspaceModifyParams) WithDefaults() *IpspaceModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ipspace modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspaceModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the ipspace modify params
func (o *IpspaceModifyParams) WithTimeout(timeout time.Duration) *IpspaceModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ipspace modify params
func (o *IpspaceModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ipspace modify params
func (o *IpspaceModifyParams) WithContext(ctx context.Context) *IpspaceModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ipspace modify params
func (o *IpspaceModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ipspace modify params
func (o *IpspaceModifyParams) WithHTTPClient(client *http.Client) *IpspaceModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ipspace modify params
func (o *IpspaceModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the ipspace modify params
func (o *IpspaceModifyParams) WithInfo(info *models.Ipspace) *IpspaceModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the ipspace modify params
func (o *IpspaceModifyParams) SetInfo(info *models.Ipspace) {
o.Info = info
}
// WithUUID adds the uuid to the ipspace modify params
func (o *IpspaceModifyParams) WithUUID(uuid string) *IpspaceModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the ipspace modify params
func (o *IpspaceModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IpspaceModifyParams) 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 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/networking/ip_subnet_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIPSubnetGetParams creates a new IPSubnetGetParams 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 NewIPSubnetGetParams() *IPSubnetGetParams {
return &IPSubnetGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIPSubnetGetParamsWithTimeout creates a new IPSubnetGetParams object
// with the ability to set a timeout on a request.
func NewIPSubnetGetParamsWithTimeout(timeout time.Duration) *IPSubnetGetParams {
return &IPSubnetGetParams{
timeout: timeout,
}
}
// NewIPSubnetGetParamsWithContext creates a new IPSubnetGetParams object
// with the ability to set a context for a request.
func NewIPSubnetGetParamsWithContext(ctx context.Context) *IPSubnetGetParams {
return &IPSubnetGetParams{
Context: ctx,
}
}
// NewIPSubnetGetParamsWithHTTPClient creates a new IPSubnetGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIPSubnetGetParamsWithHTTPClient(client *http.Client) *IPSubnetGetParams {
return &IPSubnetGetParams{
HTTPClient: client,
}
}
/*
IPSubnetGetParams contains all the parameters to send to the API endpoint
for the ip subnet get operation.
Typically these are written to a http.Request.
*/
type IPSubnetGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
IP subnet UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the ip subnet get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetGetParams) WithDefaults() *IPSubnetGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ip subnet get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the ip subnet get params
func (o *IPSubnetGetParams) WithTimeout(timeout time.Duration) *IPSubnetGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ip subnet get params
func (o *IPSubnetGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ip subnet get params
func (o *IPSubnetGetParams) WithContext(ctx context.Context) *IPSubnetGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ip subnet get params
func (o *IPSubnetGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ip subnet get params
func (o *IPSubnetGetParams) WithHTTPClient(client *http.Client) *IPSubnetGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ip subnet get params
func (o *IPSubnetGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the ip subnet get params
func (o *IPSubnetGetParams) WithFields(fields []string) *IPSubnetGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the ip subnet get params
func (o *IPSubnetGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the ip subnet get params
func (o *IPSubnetGetParams) WithUUID(uuid string) *IPSubnetGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the ip subnet get params
func (o *IPSubnetGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IPSubnetGetParams) 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
}
// bindParamIPSubnetGet binds the parameter fields
func (o *IPSubnetGetParams) 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/networking/performance_fc_interface_metric_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/performance_fc_interface_metric_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewPerformanceFcInterfaceMetricCollectionGetParams creates a new PerformanceFcInterfaceMetricCollectionGetParams 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 NewPerformanceFcInterfaceMetricCollectionGetParams() *PerformanceFcInterfaceMetricCollectionGetParams {
return &PerformanceFcInterfaceMetricCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPerformanceFcInterfaceMetricCollectionGetParamsWithTimeout creates a new PerformanceFcInterfaceMetricCollectionGetParams object
// with the ability to set a timeout on a request.
func NewPerformanceFcInterfaceMetricCollectionGetParamsWithTimeout(timeout time.Duration) *PerformanceFcInterfaceMetricCollectionGetParams {
return &PerformanceFcInterfaceMetricCollectionGetParams{
timeout: timeout,
}
}
// NewPerformanceFcInterfaceMetricCollectionGetParamsWithContext creates a new PerformanceFcInterfaceMetricCollectionGetParams object
// with the ability to set a context for a request.
func NewPerformanceFcInterfaceMetricCollectionGetParamsWithContext(ctx context.Context) *PerformanceFcInterfaceMetricCollectionGetParams {
return &PerformanceFcInterfaceMetricCollectionGetParams{
Context: ctx,
}
}
// NewPerformanceFcInterfaceMetricCollectionGetParamsWithHTTPClient creates a new PerformanceFcInterfaceMetricCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPerformanceFcInterfaceMetricCollectionGetParamsWithHTTPClient(client *http.Client) *PerformanceFcInterfaceMetricCollectionGetParams {
return &PerformanceFcInterfaceMetricCollectionGetParams{
HTTPClient: client,
}
}
/*
PerformanceFcInterfaceMetricCollectionGetParams contains all the parameters to send to the API endpoint
for the performance fc interface metric collection get operation.
Typically these are written to a http.Request.
*/
type PerformanceFcInterfaceMetricCollectionGetParams 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
/* 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
/* UUID.
Unique identifier of the FC interface.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the performance fc interface metric collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithDefaults() *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the performance fc interface metric collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := PerformanceFcInterfaceMetricCollectionGetParams{
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 performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithTimeout(timeout time.Duration) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithContext(ctx context.Context) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithHTTPClient(client *http.Client) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithDuration(duration *string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithFields(fields []string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithInterval(interval *string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithIopsOther(iopsOther *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithIopsRead(iopsRead *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithIopsTotal(iopsTotal *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithIopsWrite(iopsWrite *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithLatencyOther(latencyOther *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithLatencyRead(latencyRead *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithLatencyTotal(latencyTotal *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithLatencyWrite(latencyWrite *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithMaxRecords(maxRecords *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithOrderBy(orderBy []string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithReturnRecords(returnRecords *bool) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithStatus(status *string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetStatus(status *string) {
o.Status = status
}
// WithThroughputRead adds the throughputRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithThroughputRead(throughputRead *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithThroughputTotal(throughputTotal *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithTimestamp(timestamp *string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WithUUID adds the uuid to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) WithUUID(uuid string) *PerformanceFcInterfaceMetricCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the performance fc interface metric collection get params
func (o *PerformanceFcInterfaceMetricCollectionGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PerformanceFcInterfaceMetricCollectionGetParams) 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
}
}
}
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
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamPerformanceFcInterfaceMetricCollectionGet binds the parameter fields
func (o *PerformanceFcInterfaceMetricCollectionGetParams) 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
}
// bindParamPerformanceFcInterfaceMetricCollectionGet binds the parameter order_by
func (o *PerformanceFcInterfaceMetricCollectionGetParams) 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/networking/ipspaces_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ipspaces_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIpspacesCreateParams creates a new IpspacesCreateParams 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 NewIpspacesCreateParams() *IpspacesCreateParams {
return &IpspacesCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewIpspacesCreateParamsWithTimeout creates a new IpspacesCreateParams object
// with the ability to set a timeout on a request.
func NewIpspacesCreateParamsWithTimeout(timeout time.Duration) *IpspacesCreateParams {
return &IpspacesCreateParams{
timeout: timeout,
}
}
// NewIpspacesCreateParamsWithContext creates a new IpspacesCreateParams object
// with the ability to set a context for a request.
func NewIpspacesCreateParamsWithContext(ctx context.Context) *IpspacesCreateParams {
return &IpspacesCreateParams{
Context: ctx,
}
}
// NewIpspacesCreateParamsWithHTTPClient creates a new IpspacesCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewIpspacesCreateParamsWithHTTPClient(client *http.Client) *IpspacesCreateParams {
return &IpspacesCreateParams{
HTTPClient: client,
}
}
/*
IpspacesCreateParams contains all the parameters to send to the API endpoint
for the ipspaces create operation.
Typically these are written to a http.Request.
*/
type IpspacesCreateParams struct {
/* Info.
IPspace identifiers
*/
Info *models.Ipspace
/* 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 ipspaces create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspacesCreateParams) WithDefaults() *IpspacesCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ipspaces create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspacesCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := IpspacesCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the ipspaces create params
func (o *IpspacesCreateParams) WithTimeout(timeout time.Duration) *IpspacesCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ipspaces create params
func (o *IpspacesCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ipspaces create params
func (o *IpspacesCreateParams) WithContext(ctx context.Context) *IpspacesCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ipspaces create params
func (o *IpspacesCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ipspaces create params
func (o *IpspacesCreateParams) WithHTTPClient(client *http.Client) *IpspacesCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ipspaces create params
func (o *IpspacesCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the ipspaces create params
func (o *IpspacesCreateParams) WithInfo(info *models.Ipspace) *IpspacesCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the ipspaces create params
func (o *IpspacesCreateParams) SetInfo(info *models.Ipspace) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the ipspaces create params
func (o *IpspacesCreateParams) WithReturnRecords(returnRecords *bool) *IpspacesCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the ipspaces create params
func (o *IpspacesCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *IpspacesCreateParams) 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/networking/fc_interface_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcInterfaceModifyParams creates a new FcInterfaceModifyParams 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 NewFcInterfaceModifyParams() *FcInterfaceModifyParams {
return &FcInterfaceModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcInterfaceModifyParamsWithTimeout creates a new FcInterfaceModifyParams object
// with the ability to set a timeout on a request.
func NewFcInterfaceModifyParamsWithTimeout(timeout time.Duration) *FcInterfaceModifyParams {
return &FcInterfaceModifyParams{
timeout: timeout,
}
}
// NewFcInterfaceModifyParamsWithContext creates a new FcInterfaceModifyParams object
// with the ability to set a context for a request.
func NewFcInterfaceModifyParamsWithContext(ctx context.Context) *FcInterfaceModifyParams {
return &FcInterfaceModifyParams{
Context: ctx,
}
}
// NewFcInterfaceModifyParamsWithHTTPClient creates a new FcInterfaceModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcInterfaceModifyParamsWithHTTPClient(client *http.Client) *FcInterfaceModifyParams {
return &FcInterfaceModifyParams{
HTTPClient: client,
}
}
/*
FcInterfaceModifyParams contains all the parameters to send to the API endpoint
for the fc interface modify operation.
Typically these are written to a http.Request.
*/
type FcInterfaceModifyParams struct {
/* Info.
The new property values for the FC interface.
*/
Info *models.FcInterface
/* UUID.
The unique identifier for the FC interface.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc interface modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceModifyParams) WithDefaults() *FcInterfaceModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc interface modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fc interface modify params
func (o *FcInterfaceModifyParams) WithTimeout(timeout time.Duration) *FcInterfaceModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc interface modify params
func (o *FcInterfaceModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc interface modify params
func (o *FcInterfaceModifyParams) WithContext(ctx context.Context) *FcInterfaceModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc interface modify params
func (o *FcInterfaceModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc interface modify params
func (o *FcInterfaceModifyParams) WithHTTPClient(client *http.Client) *FcInterfaceModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc interface modify params
func (o *FcInterfaceModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the fc interface modify params
func (o *FcInterfaceModifyParams) WithInfo(info *models.FcInterface) *FcInterfaceModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the fc interface modify params
func (o *FcInterfaceModifyParams) SetInfo(info *models.FcInterface) {
o.Info = info
}
// WithUUID adds the uuid to the fc interface modify params
func (o *FcInterfaceModifyParams) WithUUID(uuid string) *FcInterfaceModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the fc interface modify params
func (o *FcInterfaceModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *FcInterfaceModifyParams) 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 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/networking/fc_interface_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcInterfaceModifyReader is a Reader for the FcInterfaceModify structure.
type FcInterfaceModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcInterfaceModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcInterfaceModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcInterfaceModifyDefault(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
}
}
// NewFcInterfaceModifyOK creates a FcInterfaceModifyOK with default headers values
func NewFcInterfaceModifyOK() *FcInterfaceModifyOK {
return &FcInterfaceModifyOK{}
}
/*
FcInterfaceModifyOK describes a response with status code 200, with default header values.
OK
*/
type FcInterfaceModifyOK struct {
}
// IsSuccess returns true when this fc interface modify o k response has a 2xx status code
func (o *FcInterfaceModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc interface modify o k response has a 3xx status code
func (o *FcInterfaceModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc interface modify o k response has a 4xx status code
func (o *FcInterfaceModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc interface modify o k response has a 5xx status code
func (o *FcInterfaceModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc interface modify o k response a status code equal to that given
func (o *FcInterfaceModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *FcInterfaceModifyOK) Error() string {
return fmt.Sprintf("[PATCH /network/fc/interfaces/{uuid}][%d] fcInterfaceModifyOK ", 200)
}
func (o *FcInterfaceModifyOK) String() string {
return fmt.Sprintf("[PATCH /network/fc/interfaces/{uuid}][%d] fcInterfaceModifyOK ", 200)
}
func (o *FcInterfaceModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewFcInterfaceModifyDefault creates a FcInterfaceModifyDefault with default headers values
func NewFcInterfaceModifyDefault(code int) *FcInterfaceModifyDefault {
return &FcInterfaceModifyDefault{
_statusCode: code,
}
}
/*
FcInterfaceModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1966140 | An interface with the same name already exists. |
| 1966217 | The specified port is not valid on the node provided. |
| 1966238 | The node or port of an active SAN data interface cannot be changed. |
| 1966702 | The destination node is not healthy. |
| 5374579 | The SAN Kernel Agent on the node is unavailable. |
| 5374870 | A partial failure occurred; renaming the interface failed. Correct the error and resubmit the request. |
| 5374871 | The Fibre Channel port identified by the specified UUID does not refer to the same port as that identified by the specified node name and/or port name. |
| 5374872 | If either `location.port.node.name` or `location.port.name` is supplied, both properties must be supplied. |
| 72089674 | You cannot move a Fibre Channel interface configured for the NVMe over FC data protocol. |
*/
type FcInterfaceModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc interface modify default response
func (o *FcInterfaceModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc interface modify default response has a 2xx status code
func (o *FcInterfaceModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc interface modify default response has a 3xx status code
func (o *FcInterfaceModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc interface modify default response has a 4xx status code
func (o *FcInterfaceModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc interface modify default response has a 5xx status code
func (o *FcInterfaceModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc interface modify default response a status code equal to that given
func (o *FcInterfaceModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcInterfaceModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /network/fc/interfaces/{uuid}][%d] fc_interface_modify default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceModifyDefault) String() string {
return fmt.Sprintf("[PATCH /network/fc/interfaces/{uuid}][%d] fc_interface_modify default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcInterfaceModifyDefault) 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/networking/network_ip_service_policy_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_service_policy_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPServicePolicyGetParams creates a new NetworkIPServicePolicyGetParams 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 NewNetworkIPServicePolicyGetParams() *NetworkIPServicePolicyGetParams {
return &NetworkIPServicePolicyGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPServicePolicyGetParamsWithTimeout creates a new NetworkIPServicePolicyGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPServicePolicyGetParamsWithTimeout(timeout time.Duration) *NetworkIPServicePolicyGetParams {
return &NetworkIPServicePolicyGetParams{
timeout: timeout,
}
}
// NewNetworkIPServicePolicyGetParamsWithContext creates a new NetworkIPServicePolicyGetParams object
// with the ability to set a context for a request.
func NewNetworkIPServicePolicyGetParamsWithContext(ctx context.Context) *NetworkIPServicePolicyGetParams {
return &NetworkIPServicePolicyGetParams{
Context: ctx,
}
}
// NewNetworkIPServicePolicyGetParamsWithHTTPClient creates a new NetworkIPServicePolicyGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPServicePolicyGetParamsWithHTTPClient(client *http.Client) *NetworkIPServicePolicyGetParams {
return &NetworkIPServicePolicyGetParams{
HTTPClient: client,
}
}
/*
NetworkIPServicePolicyGetParams contains all the parameters to send to the API endpoint
for the network ip service policy get operation.
Typically these are written to a http.Request.
*/
type NetworkIPServicePolicyGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* UUID.
Service policy UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip service policy get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPServicePolicyGetParams) WithDefaults() *NetworkIPServicePolicyGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip service policy get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPServicePolicyGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := NetworkIPServicePolicyGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithTimeout(timeout time.Duration) *NetworkIPServicePolicyGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithContext(ctx context.Context) *NetworkIPServicePolicyGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithHTTPClient(client *http.Client) *NetworkIPServicePolicyGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithFields(fields []string) *NetworkIPServicePolicyGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithMaxRecords(maxRecords *int64) *NetworkIPServicePolicyGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithOrderBy(orderBy []string) *NetworkIPServicePolicyGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithReturnRecords(returnRecords *bool) *NetworkIPServicePolicyGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithReturnTimeout(returnTimeout *int64) *NetworkIPServicePolicyGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) WithUUID(uuid string) *NetworkIPServicePolicyGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip service policy get params
func (o *NetworkIPServicePolicyGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPServicePolicyGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Fields != nil {
// binding items for fields
joinedFields := o.bindParamFields(reg)
// query array param fields
if err := r.SetQueryParam("fields", joinedFields...); err != nil {
return err
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamNetworkIPServicePolicyGet binds the parameter fields
func (o *NetworkIPServicePolicyGetParams) 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
}
// bindParamNetworkIPServicePolicyGet binds the parameter order_by
func (o *NetworkIPServicePolicyGetParams) 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/networking/network_ethernet_port_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_port_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetPortDeleteParams creates a new NetworkEthernetPortDeleteParams 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 NewNetworkEthernetPortDeleteParams() *NetworkEthernetPortDeleteParams {
return &NetworkEthernetPortDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetPortDeleteParamsWithTimeout creates a new NetworkEthernetPortDeleteParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetPortDeleteParamsWithTimeout(timeout time.Duration) *NetworkEthernetPortDeleteParams {
return &NetworkEthernetPortDeleteParams{
timeout: timeout,
}
}
// NewNetworkEthernetPortDeleteParamsWithContext creates a new NetworkEthernetPortDeleteParams object
// with the ability to set a context for a request.
func NewNetworkEthernetPortDeleteParamsWithContext(ctx context.Context) *NetworkEthernetPortDeleteParams {
return &NetworkEthernetPortDeleteParams{
Context: ctx,
}
}
// NewNetworkEthernetPortDeleteParamsWithHTTPClient creates a new NetworkEthernetPortDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetPortDeleteParamsWithHTTPClient(client *http.Client) *NetworkEthernetPortDeleteParams {
return &NetworkEthernetPortDeleteParams{
HTTPClient: client,
}
}
/*
NetworkEthernetPortDeleteParams contains all the parameters to send to the API endpoint
for the network ethernet port delete operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetPortDeleteParams struct {
/* UUID.
Port UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ethernet port delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortDeleteParams) WithDefaults() *NetworkEthernetPortDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet port delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) WithTimeout(timeout time.Duration) *NetworkEthernetPortDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) WithContext(ctx context.Context) *NetworkEthernetPortDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) WithHTTPClient(client *http.Client) *NetworkEthernetPortDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) WithUUID(uuid string) *NetworkEthernetPortDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ethernet port delete params
func (o *NetworkEthernetPortDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetPortDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/fc_zone_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_zone_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcZoneCollectionGetParams creates a new FcZoneCollectionGetParams 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 NewFcZoneCollectionGetParams() *FcZoneCollectionGetParams {
return &FcZoneCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcZoneCollectionGetParamsWithTimeout creates a new FcZoneCollectionGetParams object
// with the ability to set a timeout on a request.
func NewFcZoneCollectionGetParamsWithTimeout(timeout time.Duration) *FcZoneCollectionGetParams {
return &FcZoneCollectionGetParams{
timeout: timeout,
}
}
// NewFcZoneCollectionGetParamsWithContext creates a new FcZoneCollectionGetParams object
// with the ability to set a context for a request.
func NewFcZoneCollectionGetParamsWithContext(ctx context.Context) *FcZoneCollectionGetParams {
return &FcZoneCollectionGetParams{
Context: ctx,
}
}
// NewFcZoneCollectionGetParamsWithHTTPClient creates a new FcZoneCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcZoneCollectionGetParamsWithHTTPClient(client *http.Client) *FcZoneCollectionGetParams {
return &FcZoneCollectionGetParams{
HTTPClient: client,
}
}
/*
FcZoneCollectionGetParams contains all the parameters to send to the API endpoint
for the fc zone collection get operation.
Typically these are written to a http.Request.
*/
type FcZoneCollectionGetParams struct {
/* CacheAge.
Filter by cache.age
*/
CacheAge *string
/* CacheIsCurrent.
Filter by cache.is_current
*/
CacheIsCurrent *bool
/* CacheMaximumAge.
The maximum age of data in the Fibre Channel fabric cache before it should be refreshed from the fabric. The default is 15 minutes.
Format: iso8601
Default: "15 minutes"
*/
CacheMaximumAge *string
/* CacheUpdateTime.
Filter by cache.update_time
*/
CacheUpdateTime *string
/* FabricName.
The WWN of the primary switch of the Fibre Channel fabric.
*/
FabricName string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* MembersName.
Filter by members.name
*/
MembersName *string
/* MembersType.
Filter by members.type
*/
MembersType *string
/* 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
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc zone collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcZoneCollectionGetParams) WithDefaults() *FcZoneCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc zone collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcZoneCollectionGetParams) SetDefaults() {
var (
cacheMaximumAgeDefault = string("15 minutes")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FcZoneCollectionGetParams{
CacheMaximumAge: &cacheMaximumAgeDefault,
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 zone collection get params
func (o *FcZoneCollectionGetParams) WithTimeout(timeout time.Duration) *FcZoneCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithContext(ctx context.Context) *FcZoneCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithHTTPClient(client *http.Client) *FcZoneCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCacheAge adds the cacheAge to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithCacheAge(cacheAge *string) *FcZoneCollectionGetParams {
o.SetCacheAge(cacheAge)
return o
}
// SetCacheAge adds the cacheAge to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetCacheAge(cacheAge *string) {
o.CacheAge = cacheAge
}
// WithCacheIsCurrent adds the cacheIsCurrent to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithCacheIsCurrent(cacheIsCurrent *bool) *FcZoneCollectionGetParams {
o.SetCacheIsCurrent(cacheIsCurrent)
return o
}
// SetCacheIsCurrent adds the cacheIsCurrent to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetCacheIsCurrent(cacheIsCurrent *bool) {
o.CacheIsCurrent = cacheIsCurrent
}
// WithCacheMaximumAge adds the cacheMaximumAge to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithCacheMaximumAge(cacheMaximumAge *string) *FcZoneCollectionGetParams {
o.SetCacheMaximumAge(cacheMaximumAge)
return o
}
// SetCacheMaximumAge adds the cacheMaximumAge to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetCacheMaximumAge(cacheMaximumAge *string) {
o.CacheMaximumAge = cacheMaximumAge
}
// WithCacheUpdateTime adds the cacheUpdateTime to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithCacheUpdateTime(cacheUpdateTime *string) *FcZoneCollectionGetParams {
o.SetCacheUpdateTime(cacheUpdateTime)
return o
}
// SetCacheUpdateTime adds the cacheUpdateTime to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetCacheUpdateTime(cacheUpdateTime *string) {
o.CacheUpdateTime = cacheUpdateTime
}
// WithFabricName adds the fabricName to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithFabricName(fabricName string) *FcZoneCollectionGetParams {
o.SetFabricName(fabricName)
return o
}
// SetFabricName adds the fabricName to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetFabricName(fabricName string) {
o.FabricName = fabricName
}
// WithFields adds the fields to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithFields(fields []string) *FcZoneCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithMaxRecords(maxRecords *int64) *FcZoneCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMembersName adds the membersName to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithMembersName(membersName *string) *FcZoneCollectionGetParams {
o.SetMembersName(membersName)
return o
}
// SetMembersName adds the membersName to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetMembersName(membersName *string) {
o.MembersName = membersName
}
// WithMembersType adds the membersType to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithMembersType(membersType *string) *FcZoneCollectionGetParams {
o.SetMembersType(membersType)
return o
}
// SetMembersType adds the membersType to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetMembersType(membersType *string) {
o.MembersType = membersType
}
// WithName adds the name to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithName(name *string) *FcZoneCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithOrderBy(orderBy []string) *FcZoneCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithReturnRecords(returnRecords *bool) *FcZoneCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the fc zone collection get params
func (o *FcZoneCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *FcZoneCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the fc zone collection get params
func (o *FcZoneCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *FcZoneCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CacheAge != nil {
// query param cache.age
var qrCacheAge string
if o.CacheAge != nil {
qrCacheAge = *o.CacheAge
}
qCacheAge := qrCacheAge
if qCacheAge != "" {
if err := r.SetQueryParam("cache.age", qCacheAge); err != nil {
return err
}
}
}
if o.CacheIsCurrent != nil {
// query param cache.is_current
var qrCacheIsCurrent bool
if o.CacheIsCurrent != nil {
qrCacheIsCurrent = *o.CacheIsCurrent
}
qCacheIsCurrent := swag.FormatBool(qrCacheIsCurrent)
if qCacheIsCurrent != "" {
if err := r.SetQueryParam("cache.is_current", qCacheIsCurrent); err != nil {
return err
}
}
}
if o.CacheMaximumAge != nil {
// query param cache.maximum_age
var qrCacheMaximumAge string
if o.CacheMaximumAge != nil {
qrCacheMaximumAge = *o.CacheMaximumAge
}
qCacheMaximumAge := qrCacheMaximumAge
if qCacheMaximumAge != "" {
if err := r.SetQueryParam("cache.maximum_age", qCacheMaximumAge); err != nil {
return err
}
}
}
if o.CacheUpdateTime != nil {
// query param cache.update_time
var qrCacheUpdateTime string
if o.CacheUpdateTime != nil {
qrCacheUpdateTime = *o.CacheUpdateTime
}
qCacheUpdateTime := qrCacheUpdateTime
if qCacheUpdateTime != "" {
if err := r.SetQueryParam("cache.update_time", qCacheUpdateTime); err != nil {
return err
}
}
}
// path param fabric.name
if err := r.SetPathParam("fabric.name", o.FabricName); 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.MembersName != nil {
// query param members.name
var qrMembersName string
if o.MembersName != nil {
qrMembersName = *o.MembersName
}
qMembersName := qrMembersName
if qMembersName != "" {
if err := r.SetQueryParam("members.name", qMembersName); err != nil {
return err
}
}
}
if o.MembersType != nil {
// query param members.type
var qrMembersType string
if o.MembersType != nil {
qrMembersType = *o.MembersType
}
qMembersType := qrMembersType
if qMembersType != "" {
if err := r.SetQueryParam("members.type", qMembersType); 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 len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcZoneCollectionGet binds the parameter fields
func (o *FcZoneCollectionGetParams) 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
}
// bindParamFcZoneCollectionGet binds the parameter order_by
func (o *FcZoneCollectionGetParams) 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/networking/network_ip_interfaces_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_interfaces_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPInterfacesGetParams creates a new NetworkIPInterfacesGetParams 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 NewNetworkIPInterfacesGetParams() *NetworkIPInterfacesGetParams {
return &NetworkIPInterfacesGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPInterfacesGetParamsWithTimeout creates a new NetworkIPInterfacesGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPInterfacesGetParamsWithTimeout(timeout time.Duration) *NetworkIPInterfacesGetParams {
return &NetworkIPInterfacesGetParams{
timeout: timeout,
}
}
// NewNetworkIPInterfacesGetParamsWithContext creates a new NetworkIPInterfacesGetParams object
// with the ability to set a context for a request.
func NewNetworkIPInterfacesGetParamsWithContext(ctx context.Context) *NetworkIPInterfacesGetParams {
return &NetworkIPInterfacesGetParams{
Context: ctx,
}
}
// NewNetworkIPInterfacesGetParamsWithHTTPClient creates a new NetworkIPInterfacesGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPInterfacesGetParamsWithHTTPClient(client *http.Client) *NetworkIPInterfacesGetParams {
return &NetworkIPInterfacesGetParams{
HTTPClient: client,
}
}
/*
NetworkIPInterfacesGetParams contains all the parameters to send to the API endpoint
for the network ip interfaces get operation.
Typically these are written to a http.Request.
*/
type NetworkIPInterfacesGetParams struct {
/* DdnsEnabled.
Filter by ddns_enabled
*/
DdnsEnabled *bool
/* DNSZone.
Filter by dns_zone
*/
DNSZone *string
/* Enabled.
Filter by enabled
*/
Enabled *bool
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IPAddress.
Filter by ip.address
*/
IPAddress *string
/* IPFamily.
Filter by ip.family
*/
IPFamily *string
/* IPNetmask.
Filter by ip.netmask
*/
IPNetmask *string
/* IpspaceName.
Filter by ipspace.name
*/
IpspaceName *string
/* IpspaceUUID.
Filter by ipspace.uuid
*/
IpspaceUUID *string
/* LocationAutoRevert.
Filter by location.auto_revert
*/
LocationAutoRevert *bool
/* LocationFailover.
Filter by location.failover
*/
LocationFailover *string
/* LocationHomeNodeName.
Filter by location.home_node.name
*/
LocationHomeNodeName *string
/* LocationHomeNodeUUID.
Filter by location.home_node.uuid
*/
LocationHomeNodeUUID *string
/* LocationHomePortName.
Filter by location.home_port.name
*/
LocationHomePortName *string
/* LocationHomePortNodeName.
Filter by location.home_port.node.name
*/
LocationHomePortNodeName *string
/* LocationHomePortUUID.
Filter by location.home_port.uuid
*/
LocationHomePortUUID *string
/* LocationIsHome.
Filter by location.is_home
*/
LocationIsHome *bool
/* LocationNodeName.
Filter by location.node.name
*/
LocationNodeName *string
/* LocationNodeUUID.
Filter by location.node.uuid
*/
LocationNodeUUID *string
/* LocationPortName.
Filter by location.port.name
*/
LocationPortName *string
/* LocationPortNodeName.
Filter by location.port.node.name
*/
LocationPortNodeName *string
/* LocationPortUUID.
Filter by location.port.uuid
*/
LocationPortUUID *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* MetricDuration.
Filter by metric.duration
*/
MetricDuration *string
/* 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
/* 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
/* ProbePort.
Filter by probe_port
*/
ProbePort *int64
/* RdmaProtocols.
Filter by rdma_protocols
*/
RdmaProtocols *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
/* Scope.
Filter by scope
*/
Scope *string
/* ServicePolicyName.
Filter by service_policy.name
*/
ServicePolicyName *string
/* ServicePolicyUUID.
Filter by service_policy.uuid
*/
ServicePolicyUUID *string
/* Services.
Filter by services
*/
Services *string
/* State.
Filter by state
*/
State *string
/* 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
/* SubnetName.
Filter by subnet.name
*/
SubnetName *string
/* SubnetUUID.
Filter by subnet.uuid
*/
SubnetUUID *string
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
/* UUID.
Filter by uuid
*/
UUID *string
/* Vip.
Filter by vip
*/
Vip *bool
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip interfaces get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfacesGetParams) WithDefaults() *NetworkIPInterfacesGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip interfaces get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfacesGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := NetworkIPInterfacesGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithTimeout(timeout time.Duration) *NetworkIPInterfacesGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithContext(ctx context.Context) *NetworkIPInterfacesGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithHTTPClient(client *http.Client) *NetworkIPInterfacesGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDdnsEnabled adds the ddnsEnabled to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithDdnsEnabled(ddnsEnabled *bool) *NetworkIPInterfacesGetParams {
o.SetDdnsEnabled(ddnsEnabled)
return o
}
// SetDdnsEnabled adds the ddnsEnabled to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetDdnsEnabled(ddnsEnabled *bool) {
o.DdnsEnabled = ddnsEnabled
}
// WithDNSZone adds the dNSZone to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithDNSZone(dNSZone *string) *NetworkIPInterfacesGetParams {
o.SetDNSZone(dNSZone)
return o
}
// SetDNSZone adds the dnsZone to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetDNSZone(dNSZone *string) {
o.DNSZone = dNSZone
}
// WithEnabled adds the enabled to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithEnabled(enabled *bool) *NetworkIPInterfacesGetParams {
o.SetEnabled(enabled)
return o
}
// SetEnabled adds the enabled to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetEnabled(enabled *bool) {
o.Enabled = enabled
}
// WithFields adds the fields to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithFields(fields []string) *NetworkIPInterfacesGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIPAddress adds the iPAddress to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithIPAddress(iPAddress *string) *NetworkIPInterfacesGetParams {
o.SetIPAddress(iPAddress)
return o
}
// SetIPAddress adds the ipAddress to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetIPAddress(iPAddress *string) {
o.IPAddress = iPAddress
}
// WithIPFamily adds the iPFamily to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithIPFamily(iPFamily *string) *NetworkIPInterfacesGetParams {
o.SetIPFamily(iPFamily)
return o
}
// SetIPFamily adds the ipFamily to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetIPFamily(iPFamily *string) {
o.IPFamily = iPFamily
}
// WithIPNetmask adds the iPNetmask to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithIPNetmask(iPNetmask *string) *NetworkIPInterfacesGetParams {
o.SetIPNetmask(iPNetmask)
return o
}
// SetIPNetmask adds the ipNetmask to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetIPNetmask(iPNetmask *string) {
o.IPNetmask = iPNetmask
}
// WithIpspaceName adds the ipspaceName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithIpspaceName(ipspaceName *string) *NetworkIPInterfacesGetParams {
o.SetIpspaceName(ipspaceName)
return o
}
// SetIpspaceName adds the ipspaceName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetIpspaceName(ipspaceName *string) {
o.IpspaceName = ipspaceName
}
// WithIpspaceUUID adds the ipspaceUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithIpspaceUUID(ipspaceUUID *string) *NetworkIPInterfacesGetParams {
o.SetIpspaceUUID(ipspaceUUID)
return o
}
// SetIpspaceUUID adds the ipspaceUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetIpspaceUUID(ipspaceUUID *string) {
o.IpspaceUUID = ipspaceUUID
}
// WithLocationAutoRevert adds the locationAutoRevert to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationAutoRevert(locationAutoRevert *bool) *NetworkIPInterfacesGetParams {
o.SetLocationAutoRevert(locationAutoRevert)
return o
}
// SetLocationAutoRevert adds the locationAutoRevert to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationAutoRevert(locationAutoRevert *bool) {
o.LocationAutoRevert = locationAutoRevert
}
// WithLocationFailover adds the locationFailover to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationFailover(locationFailover *string) *NetworkIPInterfacesGetParams {
o.SetLocationFailover(locationFailover)
return o
}
// SetLocationFailover adds the locationFailover to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationFailover(locationFailover *string) {
o.LocationFailover = locationFailover
}
// WithLocationHomeNodeName adds the locationHomeNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationHomeNodeName(locationHomeNodeName *string) *NetworkIPInterfacesGetParams {
o.SetLocationHomeNodeName(locationHomeNodeName)
return o
}
// SetLocationHomeNodeName adds the locationHomeNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationHomeNodeName(locationHomeNodeName *string) {
o.LocationHomeNodeName = locationHomeNodeName
}
// WithLocationHomeNodeUUID adds the locationHomeNodeUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationHomeNodeUUID(locationHomeNodeUUID *string) *NetworkIPInterfacesGetParams {
o.SetLocationHomeNodeUUID(locationHomeNodeUUID)
return o
}
// SetLocationHomeNodeUUID adds the locationHomeNodeUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationHomeNodeUUID(locationHomeNodeUUID *string) {
o.LocationHomeNodeUUID = locationHomeNodeUUID
}
// WithLocationHomePortName adds the locationHomePortName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationHomePortName(locationHomePortName *string) *NetworkIPInterfacesGetParams {
o.SetLocationHomePortName(locationHomePortName)
return o
}
// SetLocationHomePortName adds the locationHomePortName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationHomePortName(locationHomePortName *string) {
o.LocationHomePortName = locationHomePortName
}
// WithLocationHomePortNodeName adds the locationHomePortNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationHomePortNodeName(locationHomePortNodeName *string) *NetworkIPInterfacesGetParams {
o.SetLocationHomePortNodeName(locationHomePortNodeName)
return o
}
// SetLocationHomePortNodeName adds the locationHomePortNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationHomePortNodeName(locationHomePortNodeName *string) {
o.LocationHomePortNodeName = locationHomePortNodeName
}
// WithLocationHomePortUUID adds the locationHomePortUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationHomePortUUID(locationHomePortUUID *string) *NetworkIPInterfacesGetParams {
o.SetLocationHomePortUUID(locationHomePortUUID)
return o
}
// SetLocationHomePortUUID adds the locationHomePortUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationHomePortUUID(locationHomePortUUID *string) {
o.LocationHomePortUUID = locationHomePortUUID
}
// WithLocationIsHome adds the locationIsHome to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationIsHome(locationIsHome *bool) *NetworkIPInterfacesGetParams {
o.SetLocationIsHome(locationIsHome)
return o
}
// SetLocationIsHome adds the locationIsHome to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationIsHome(locationIsHome *bool) {
o.LocationIsHome = locationIsHome
}
// WithLocationNodeName adds the locationNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationNodeName(locationNodeName *string) *NetworkIPInterfacesGetParams {
o.SetLocationNodeName(locationNodeName)
return o
}
// SetLocationNodeName adds the locationNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationNodeName(locationNodeName *string) {
o.LocationNodeName = locationNodeName
}
// WithLocationNodeUUID adds the locationNodeUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationNodeUUID(locationNodeUUID *string) *NetworkIPInterfacesGetParams {
o.SetLocationNodeUUID(locationNodeUUID)
return o
}
// SetLocationNodeUUID adds the locationNodeUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationNodeUUID(locationNodeUUID *string) {
o.LocationNodeUUID = locationNodeUUID
}
// WithLocationPortName adds the locationPortName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationPortName(locationPortName *string) *NetworkIPInterfacesGetParams {
o.SetLocationPortName(locationPortName)
return o
}
// SetLocationPortName adds the locationPortName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationPortName(locationPortName *string) {
o.LocationPortName = locationPortName
}
// WithLocationPortNodeName adds the locationPortNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationPortNodeName(locationPortNodeName *string) *NetworkIPInterfacesGetParams {
o.SetLocationPortNodeName(locationPortNodeName)
return o
}
// SetLocationPortNodeName adds the locationPortNodeName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationPortNodeName(locationPortNodeName *string) {
o.LocationPortNodeName = locationPortNodeName
}
// WithLocationPortUUID adds the locationPortUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithLocationPortUUID(locationPortUUID *string) *NetworkIPInterfacesGetParams {
o.SetLocationPortUUID(locationPortUUID)
return o
}
// SetLocationPortUUID adds the locationPortUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetLocationPortUUID(locationPortUUID *string) {
o.LocationPortUUID = locationPortUUID
}
// WithMaxRecords adds the maxRecords to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMaxRecords(maxRecords *int64) *NetworkIPInterfacesGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMetricDuration adds the metricDuration to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricDuration(metricDuration *string) *NetworkIPInterfacesGetParams {
o.SetMetricDuration(metricDuration)
return o
}
// SetMetricDuration adds the metricDuration to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricDuration(metricDuration *string) {
o.MetricDuration = metricDuration
}
// WithMetricStatus adds the metricStatus to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricStatus(metricStatus *string) *NetworkIPInterfacesGetParams {
o.SetMetricStatus(metricStatus)
return o
}
// SetMetricStatus adds the metricStatus to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricStatus(metricStatus *string) {
o.MetricStatus = metricStatus
}
// WithMetricThroughputRead adds the metricThroughputRead to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricThroughputRead(metricThroughputRead *int64) *NetworkIPInterfacesGetParams {
o.SetMetricThroughputRead(metricThroughputRead)
return o
}
// SetMetricThroughputRead adds the metricThroughputRead to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricThroughputRead(metricThroughputRead *int64) {
o.MetricThroughputRead = metricThroughputRead
}
// WithMetricThroughputTotal adds the metricThroughputTotal to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricThroughputTotal(metricThroughputTotal *int64) *NetworkIPInterfacesGetParams {
o.SetMetricThroughputTotal(metricThroughputTotal)
return o
}
// SetMetricThroughputTotal adds the metricThroughputTotal to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricThroughputTotal(metricThroughputTotal *int64) {
o.MetricThroughputTotal = metricThroughputTotal
}
// WithMetricThroughputWrite adds the metricThroughputWrite to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricThroughputWrite(metricThroughputWrite *int64) *NetworkIPInterfacesGetParams {
o.SetMetricThroughputWrite(metricThroughputWrite)
return o
}
// SetMetricThroughputWrite adds the metricThroughputWrite to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricThroughputWrite(metricThroughputWrite *int64) {
o.MetricThroughputWrite = metricThroughputWrite
}
// WithMetricTimestamp adds the metricTimestamp to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithMetricTimestamp(metricTimestamp *string) *NetworkIPInterfacesGetParams {
o.SetMetricTimestamp(metricTimestamp)
return o
}
// SetMetricTimestamp adds the metricTimestamp to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetMetricTimestamp(metricTimestamp *string) {
o.MetricTimestamp = metricTimestamp
}
// WithName adds the name to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithName(name *string) *NetworkIPInterfacesGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithOrderBy(orderBy []string) *NetworkIPInterfacesGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithProbePort adds the probePort to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithProbePort(probePort *int64) *NetworkIPInterfacesGetParams {
o.SetProbePort(probePort)
return o
}
// SetProbePort adds the probePort to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetProbePort(probePort *int64) {
o.ProbePort = probePort
}
// WithRdmaProtocols adds the rdmaProtocols to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithRdmaProtocols(rdmaProtocols *string) *NetworkIPInterfacesGetParams {
o.SetRdmaProtocols(rdmaProtocols)
return o
}
// SetRdmaProtocols adds the rdmaProtocols to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetRdmaProtocols(rdmaProtocols *string) {
o.RdmaProtocols = rdmaProtocols
}
// WithReturnRecords adds the returnRecords to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithReturnRecords(returnRecords *bool) *NetworkIPInterfacesGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithReturnTimeout(returnTimeout *int64) *NetworkIPInterfacesGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithScope adds the scope to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithScope(scope *string) *NetworkIPInterfacesGetParams {
o.SetScope(scope)
return o
}
// SetScope adds the scope to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetScope(scope *string) {
o.Scope = scope
}
// WithServicePolicyName adds the servicePolicyName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithServicePolicyName(servicePolicyName *string) *NetworkIPInterfacesGetParams {
o.SetServicePolicyName(servicePolicyName)
return o
}
// SetServicePolicyName adds the servicePolicyName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetServicePolicyName(servicePolicyName *string) {
o.ServicePolicyName = servicePolicyName
}
// WithServicePolicyUUID adds the servicePolicyUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithServicePolicyUUID(servicePolicyUUID *string) *NetworkIPInterfacesGetParams {
o.SetServicePolicyUUID(servicePolicyUUID)
return o
}
// SetServicePolicyUUID adds the servicePolicyUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetServicePolicyUUID(servicePolicyUUID *string) {
o.ServicePolicyUUID = servicePolicyUUID
}
// WithServices adds the services to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithServices(services *string) *NetworkIPInterfacesGetParams {
o.SetServices(services)
return o
}
// SetServices adds the services to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetServices(services *string) {
o.Services = services
}
// WithState adds the state to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithState(state *string) *NetworkIPInterfacesGetParams {
o.SetState(state)
return o
}
// SetState adds the state to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetState(state *string) {
o.State = state
}
// WithStatisticsStatus adds the statisticsStatus to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithStatisticsStatus(statisticsStatus *string) *NetworkIPInterfacesGetParams {
o.SetStatisticsStatus(statisticsStatus)
return o
}
// SetStatisticsStatus adds the statisticsStatus to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetStatisticsStatus(statisticsStatus *string) {
o.StatisticsStatus = statisticsStatus
}
// WithStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) *NetworkIPInterfacesGetParams {
o.SetStatisticsThroughputRawRead(statisticsThroughputRawRead)
return o
}
// SetStatisticsThroughputRawRead adds the statisticsThroughputRawRead to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetStatisticsThroughputRawRead(statisticsThroughputRawRead *int64) {
o.StatisticsThroughputRawRead = statisticsThroughputRawRead
}
// WithStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) *NetworkIPInterfacesGetParams {
o.SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal)
return o
}
// SetStatisticsThroughputRawTotal adds the statisticsThroughputRawTotal to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetStatisticsThroughputRawTotal(statisticsThroughputRawTotal *int64) {
o.StatisticsThroughputRawTotal = statisticsThroughputRawTotal
}
// WithStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) *NetworkIPInterfacesGetParams {
o.SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite)
return o
}
// SetStatisticsThroughputRawWrite adds the statisticsThroughputRawWrite to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetStatisticsThroughputRawWrite(statisticsThroughputRawWrite *int64) {
o.StatisticsThroughputRawWrite = statisticsThroughputRawWrite
}
// WithStatisticsTimestamp adds the statisticsTimestamp to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithStatisticsTimestamp(statisticsTimestamp *string) *NetworkIPInterfacesGetParams {
o.SetStatisticsTimestamp(statisticsTimestamp)
return o
}
// SetStatisticsTimestamp adds the statisticsTimestamp to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetStatisticsTimestamp(statisticsTimestamp *string) {
o.StatisticsTimestamp = statisticsTimestamp
}
// WithSubnetName adds the subnetName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithSubnetName(subnetName *string) *NetworkIPInterfacesGetParams {
o.SetSubnetName(subnetName)
return o
}
// SetSubnetName adds the subnetName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetSubnetName(subnetName *string) {
o.SubnetName = subnetName
}
// WithSubnetUUID adds the subnetUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithSubnetUUID(subnetUUID *string) *NetworkIPInterfacesGetParams {
o.SetSubnetUUID(subnetUUID)
return o
}
// SetSubnetUUID adds the subnetUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetSubnetUUID(subnetUUID *string) {
o.SubnetUUID = subnetUUID
}
// WithSvmName adds the svmName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithSvmName(svmName *string) *NetworkIPInterfacesGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithSvmUUID(svmUUID *string) *NetworkIPInterfacesGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithUUID adds the uuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithUUID(uuid *string) *NetworkIPInterfacesGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WithVip adds the vip to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) WithVip(vip *bool) *NetworkIPInterfacesGetParams {
o.SetVip(vip)
return o
}
// SetVip adds the vip to the network ip interfaces get params
func (o *NetworkIPInterfacesGetParams) SetVip(vip *bool) {
o.Vip = vip
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPInterfacesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DdnsEnabled != nil {
// query param ddns_enabled
var qrDdnsEnabled bool
if o.DdnsEnabled != nil {
qrDdnsEnabled = *o.DdnsEnabled
}
qDdnsEnabled := swag.FormatBool(qrDdnsEnabled)
if qDdnsEnabled != "" {
if err := r.SetQueryParam("ddns_enabled", qDdnsEnabled); err != nil {
return err
}
}
}
if o.DNSZone != nil {
// query param dns_zone
var qrDNSZone string
if o.DNSZone != nil {
qrDNSZone = *o.DNSZone
}
qDNSZone := qrDNSZone
if qDNSZone != "" {
if err := r.SetQueryParam("dns_zone", qDNSZone); err != nil {
return err
}
}
}
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
| 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/networking/network_ip_route_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_route_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPRouteGetParams creates a new NetworkIPRouteGetParams 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 NewNetworkIPRouteGetParams() *NetworkIPRouteGetParams {
return &NetworkIPRouteGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPRouteGetParamsWithTimeout creates a new NetworkIPRouteGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPRouteGetParamsWithTimeout(timeout time.Duration) *NetworkIPRouteGetParams {
return &NetworkIPRouteGetParams{
timeout: timeout,
}
}
// NewNetworkIPRouteGetParamsWithContext creates a new NetworkIPRouteGetParams object
// with the ability to set a context for a request.
func NewNetworkIPRouteGetParamsWithContext(ctx context.Context) *NetworkIPRouteGetParams {
return &NetworkIPRouteGetParams{
Context: ctx,
}
}
// NewNetworkIPRouteGetParamsWithHTTPClient creates a new NetworkIPRouteGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPRouteGetParamsWithHTTPClient(client *http.Client) *NetworkIPRouteGetParams {
return &NetworkIPRouteGetParams{
HTTPClient: client,
}
}
/*
NetworkIPRouteGetParams contains all the parameters to send to the API endpoint
for the network ip route get operation.
Typically these are written to a http.Request.
*/
type NetworkIPRouteGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
Route UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip route get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPRouteGetParams) WithDefaults() *NetworkIPRouteGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip route get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPRouteGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip route get params
func (o *NetworkIPRouteGetParams) WithTimeout(timeout time.Duration) *NetworkIPRouteGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip route get params
func (o *NetworkIPRouteGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip route get params
func (o *NetworkIPRouteGetParams) WithContext(ctx context.Context) *NetworkIPRouteGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip route get params
func (o *NetworkIPRouteGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip route get params
func (o *NetworkIPRouteGetParams) WithHTTPClient(client *http.Client) *NetworkIPRouteGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip route get params
func (o *NetworkIPRouteGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ip route get params
func (o *NetworkIPRouteGetParams) WithFields(fields []string) *NetworkIPRouteGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip route get params
func (o *NetworkIPRouteGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the network ip route get params
func (o *NetworkIPRouteGetParams) WithUUID(uuid string) *NetworkIPRouteGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip route get params
func (o *NetworkIPRouteGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPRouteGetParams) 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
}
// bindParamNetworkIPRouteGet binds the parameter fields
func (o *NetworkIPRouteGetParams) 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/networking/switch_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewSwitchDeleteParams creates a new SwitchDeleteParams 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 NewSwitchDeleteParams() *SwitchDeleteParams {
return &SwitchDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewSwitchDeleteParamsWithTimeout creates a new SwitchDeleteParams object
// with the ability to set a timeout on a request.
func NewSwitchDeleteParamsWithTimeout(timeout time.Duration) *SwitchDeleteParams {
return &SwitchDeleteParams{
timeout: timeout,
}
}
// NewSwitchDeleteParamsWithContext creates a new SwitchDeleteParams object
// with the ability to set a context for a request.
func NewSwitchDeleteParamsWithContext(ctx context.Context) *SwitchDeleteParams {
return &SwitchDeleteParams{
Context: ctx,
}
}
// NewSwitchDeleteParamsWithHTTPClient creates a new SwitchDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewSwitchDeleteParamsWithHTTPClient(client *http.Client) *SwitchDeleteParams {
return &SwitchDeleteParams{
HTTPClient: client,
}
}
/*
SwitchDeleteParams contains all the parameters to send to the API endpoint
for the switch delete operation.
Typically these are written to a http.Request.
*/
type SwitchDeleteParams struct {
/* Name.
Switch Name.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the switch delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchDeleteParams) WithDefaults() *SwitchDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the switch delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the switch delete params
func (o *SwitchDeleteParams) WithTimeout(timeout time.Duration) *SwitchDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the switch delete params
func (o *SwitchDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the switch delete params
func (o *SwitchDeleteParams) WithContext(ctx context.Context) *SwitchDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the switch delete params
func (o *SwitchDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the switch delete params
func (o *SwitchDeleteParams) WithHTTPClient(client *http.Client) *SwitchDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the switch delete params
func (o *SwitchDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithName adds the name to the switch delete params
func (o *SwitchDeleteParams) WithName(name string) *SwitchDeleteParams {
o.SetName(name)
return o
}
// SetName adds the name to the switch delete params
func (o *SwitchDeleteParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *SwitchDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/fc_interface_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcInterfaceGetParams creates a new FcInterfaceGetParams 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 NewFcInterfaceGetParams() *FcInterfaceGetParams {
return &FcInterfaceGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcInterfaceGetParamsWithTimeout creates a new FcInterfaceGetParams object
// with the ability to set a timeout on a request.
func NewFcInterfaceGetParamsWithTimeout(timeout time.Duration) *FcInterfaceGetParams {
return &FcInterfaceGetParams{
timeout: timeout,
}
}
// NewFcInterfaceGetParamsWithContext creates a new FcInterfaceGetParams object
// with the ability to set a context for a request.
func NewFcInterfaceGetParamsWithContext(ctx context.Context) *FcInterfaceGetParams {
return &FcInterfaceGetParams{
Context: ctx,
}
}
// NewFcInterfaceGetParamsWithHTTPClient creates a new FcInterfaceGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcInterfaceGetParamsWithHTTPClient(client *http.Client) *FcInterfaceGetParams {
return &FcInterfaceGetParams{
HTTPClient: client,
}
}
/*
FcInterfaceGetParams contains all the parameters to send to the API endpoint
for the fc interface get operation.
Typically these are written to a http.Request.
*/
type FcInterfaceGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
The unique identifier for the FC interface.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceGetParams) WithDefaults() *FcInterfaceGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fc interface get params
func (o *FcInterfaceGetParams) WithTimeout(timeout time.Duration) *FcInterfaceGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc interface get params
func (o *FcInterfaceGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc interface get params
func (o *FcInterfaceGetParams) WithContext(ctx context.Context) *FcInterfaceGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc interface get params
func (o *FcInterfaceGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc interface get params
func (o *FcInterfaceGetParams) WithHTTPClient(client *http.Client) *FcInterfaceGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc interface get params
func (o *FcInterfaceGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the fc interface get params
func (o *FcInterfaceGetParams) WithFields(fields []string) *FcInterfaceGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc interface get params
func (o *FcInterfaceGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the fc interface get params
func (o *FcInterfaceGetParams) WithUUID(uuid string) *FcInterfaceGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the fc interface get params
func (o *FcInterfaceGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *FcInterfaceGetParams) 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
}
// bindParamFcInterfaceGet binds the parameter fields
func (o *FcInterfaceGetParams) 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/networking/switch_port_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_port_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// SwitchPortGetReader is a Reader for the SwitchPortGet structure.
type SwitchPortGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SwitchPortGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSwitchPortGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSwitchPortGetDefault(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
}
}
// NewSwitchPortGetOK creates a SwitchPortGetOK with default headers values
func NewSwitchPortGetOK() *SwitchPortGetOK {
return &SwitchPortGetOK{}
}
/*
SwitchPortGetOK describes a response with status code 200, with default header values.
OK
*/
type SwitchPortGetOK struct {
Payload *models.SwitchPort
}
// IsSuccess returns true when this switch port get o k response has a 2xx status code
func (o *SwitchPortGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this switch port get o k response has a 3xx status code
func (o *SwitchPortGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this switch port get o k response has a 4xx status code
func (o *SwitchPortGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this switch port get o k response has a 5xx status code
func (o *SwitchPortGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this switch port get o k response a status code equal to that given
func (o *SwitchPortGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SwitchPortGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports/{switch}/{identity.name}/{identity.index}][%d] switchPortGetOK %+v", 200, o.Payload)
}
func (o *SwitchPortGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports/{switch}/{identity.name}/{identity.index}][%d] switchPortGetOK %+v", 200, o.Payload)
}
func (o *SwitchPortGetOK) GetPayload() *models.SwitchPort {
return o.Payload
}
func (o *SwitchPortGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SwitchPort)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSwitchPortGetDefault creates a SwitchPortGetDefault with default headers values
func NewSwitchPortGetDefault(code int) *SwitchPortGetDefault {
return &SwitchPortGetDefault{
_statusCode: code,
}
}
/*
SwitchPortGetDefault describes a response with status code -1, with default header values.
Error
*/
type SwitchPortGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the switch port get default response
func (o *SwitchPortGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this switch port get default response has a 2xx status code
func (o *SwitchPortGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this switch port get default response has a 3xx status code
func (o *SwitchPortGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this switch port get default response has a 4xx status code
func (o *SwitchPortGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this switch port get default response has a 5xx status code
func (o *SwitchPortGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this switch port get default response a status code equal to that given
func (o *SwitchPortGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SwitchPortGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports/{switch}/{identity.name}/{identity.index}][%d] switch_port_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchPortGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports/{switch}/{identity.name}/{identity.index}][%d] switch_port_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchPortGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SwitchPortGetDefault) 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/networking/ip_subnet_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// IPSubnetModifyReader is a Reader for the IPSubnetModify structure.
type IPSubnetModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IPSubnetModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIPSubnetModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIPSubnetModifyDefault(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
}
}
// NewIPSubnetModifyOK creates a IPSubnetModifyOK with default headers values
func NewIPSubnetModifyOK() *IPSubnetModifyOK {
return &IPSubnetModifyOK{}
}
/*
IPSubnetModifyOK describes a response with status code 200, with default header values.
OK
*/
type IPSubnetModifyOK struct {
}
// IsSuccess returns true when this ip subnet modify o k response has a 2xx status code
func (o *IPSubnetModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ip subnet modify o k response has a 3xx status code
func (o *IPSubnetModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ip subnet modify o k response has a 4xx status code
func (o *IPSubnetModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ip subnet modify o k response has a 5xx status code
func (o *IPSubnetModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this ip subnet modify o k response a status code equal to that given
func (o *IPSubnetModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *IPSubnetModifyOK) Error() string {
return fmt.Sprintf("[PATCH /network/ip/subnets/{uuid}][%d] ipSubnetModifyOK ", 200)
}
func (o *IPSubnetModifyOK) String() string {
return fmt.Sprintf("[PATCH /network/ip/subnets/{uuid}][%d] ipSubnetModifyOK ", 200)
}
func (o *IPSubnetModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIPSubnetModifyDefault creates a IPSubnetModifyDefault with default headers values
func NewIPSubnetModifyDefault(code int) *IPSubnetModifyDefault {
return &IPSubnetModifyDefault{
_statusCode: code,
}
}
/*
IPSubnetModifyDefault describes a response with status code -1, with default header values.
Fill error codes below.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1377658 | Invalid gateway for subnet in IPspace. |
| 1377659 | Subnet would overlap with existing subnet named in IPspace. |
| 1377660 | A subnet with the name already exists in the IPspace. |
| 1377661 | Subnet in IPspace cannot use subnet address because that address is already used by subnet in the same IPspace. |
| 1377662 | The IP range address is not within the subnet in IPspace. |
| 1377663 | The specified IP address range of subnet in IPspace contains an address already in use by a LIF. |
| 1377664 | The specified IP address range of subnet in IPspace contains an address already in use by the Service Processor. |
| 1377673 | The addresses provided must have the same address family. |
| 1377681 | Cannot update LIF associations for LIF. The broadcast domain of the LIF does not match the broadcast domain of the subnet. |
| 53282568 | The subnet.address must be specified together with subnet.netmask. |
| 53282569 | The specified subnet.netmask is not valid. |
| 53282570 | Each pair of ranges must have ip_ranges.start less than or equal to ip_ranges.end. |
| 53282571 | The ip_ranges.start and ip_ranges.end fields must have the same number of items. |
| 53282572 | PATCH partially succeeded with error. |
*/
type IPSubnetModifyDefault struct {
_statusCode int
}
// Code gets the status code for the ip subnet modify default response
func (o *IPSubnetModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ip subnet modify default response has a 2xx status code
func (o *IPSubnetModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ip subnet modify default response has a 3xx status code
func (o *IPSubnetModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ip subnet modify default response has a 4xx status code
func (o *IPSubnetModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ip subnet modify default response has a 5xx status code
func (o *IPSubnetModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ip subnet modify default response a status code equal to that given
func (o *IPSubnetModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IPSubnetModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /network/ip/subnets/{uuid}][%d] ip_subnet_modify default ", o._statusCode)
}
func (o *IPSubnetModifyDefault) String() string {
return fmt.Sprintf("[PATCH /network/ip/subnets/{uuid}][%d] ip_subnet_modify default ", o._statusCode)
}
func (o *IPSubnetModifyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
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/networking/switch_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// SwitchDeleteReader is a Reader for the SwitchDelete structure.
type SwitchDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SwitchDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSwitchDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSwitchDeleteDefault(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
}
}
// NewSwitchDeleteOK creates a SwitchDeleteOK with default headers values
func NewSwitchDeleteOK() *SwitchDeleteOK {
return &SwitchDeleteOK{}
}
/*
SwitchDeleteOK describes a response with status code 200, with default header values.
OK
*/
type SwitchDeleteOK struct {
}
// IsSuccess returns true when this switch delete o k response has a 2xx status code
func (o *SwitchDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this switch delete o k response has a 3xx status code
func (o *SwitchDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this switch delete o k response has a 4xx status code
func (o *SwitchDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this switch delete o k response has a 5xx status code
func (o *SwitchDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this switch delete o k response a status code equal to that given
func (o *SwitchDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *SwitchDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ethernet/switches/{name}][%d] switchDeleteOK ", 200)
}
func (o *SwitchDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ethernet/switches/{name}][%d] switchDeleteOK ", 200)
}
func (o *SwitchDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewSwitchDeleteDefault creates a SwitchDeleteDefault with default headers values
func NewSwitchDeleteDefault(code int) *SwitchDeleteDefault {
return &SwitchDeleteDefault{
_statusCode: code,
}
}
/*
SwitchDeleteDefault describes a response with status code -1, with default header values.
Error
*/
type SwitchDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the switch delete default response
func (o *SwitchDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this switch delete default response has a 2xx status code
func (o *SwitchDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this switch delete default response has a 3xx status code
func (o *SwitchDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this switch delete default response has a 4xx status code
func (o *SwitchDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this switch delete default response has a 5xx status code
func (o *SwitchDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this switch delete default response a status code equal to that given
func (o *SwitchDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SwitchDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/ethernet/switches/{name}][%d] switch_delete default %+v", o._statusCode, o.Payload)
}
func (o *SwitchDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/ethernet/switches/{name}][%d] switch_delete default %+v", o._statusCode, o.Payload)
}
func (o *SwitchDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SwitchDeleteDefault) 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/networking/http_proxy_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// HTTPProxyGetReader is a Reader for the HTTPProxyGet structure.
type HTTPProxyGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *HTTPProxyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewHTTPProxyGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewHTTPProxyGetDefault(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
}
}
// NewHTTPProxyGetOK creates a HTTPProxyGetOK with default headers values
func NewHTTPProxyGetOK() *HTTPProxyGetOK {
return &HTTPProxyGetOK{}
}
/*
HTTPProxyGetOK describes a response with status code 200, with default header values.
OK
*/
type HTTPProxyGetOK struct {
Payload *models.NetworkHTTPProxy
}
// IsSuccess returns true when this http proxy get o k response has a 2xx status code
func (o *HTTPProxyGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this http proxy get o k response has a 3xx status code
func (o *HTTPProxyGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this http proxy get o k response has a 4xx status code
func (o *HTTPProxyGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this http proxy get o k response has a 5xx status code
func (o *HTTPProxyGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this http proxy get o k response a status code equal to that given
func (o *HTTPProxyGetOK) IsCode(code int) bool {
return code == 200
}
func (o *HTTPProxyGetOK) Error() string {
return fmt.Sprintf("[GET /network/http-proxy/{uuid}][%d] httpProxyGetOK %+v", 200, o.Payload)
}
func (o *HTTPProxyGetOK) String() string {
return fmt.Sprintf("[GET /network/http-proxy/{uuid}][%d] httpProxyGetOK %+v", 200, o.Payload)
}
func (o *HTTPProxyGetOK) GetPayload() *models.NetworkHTTPProxy {
return o.Payload
}
func (o *HTTPProxyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NetworkHTTPProxy)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewHTTPProxyGetDefault creates a HTTPProxyGetDefault with default headers values
func NewHTTPProxyGetDefault(code int) *HTTPProxyGetDefault {
return &HTTPProxyGetDefault{
_statusCode: code,
}
}
/*
HTTPProxyGetDefault describes a response with status code -1, with default header values.
Error
*/
type HTTPProxyGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the http proxy get default response
func (o *HTTPProxyGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this http proxy get default response has a 2xx status code
func (o *HTTPProxyGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this http proxy get default response has a 3xx status code
func (o *HTTPProxyGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this http proxy get default response has a 4xx status code
func (o *HTTPProxyGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this http proxy get default response has a 5xx status code
func (o *HTTPProxyGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this http proxy get default response a status code equal to that given
func (o *HTTPProxyGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *HTTPProxyGetDefault) Error() string {
return fmt.Sprintf("[GET /network/http-proxy/{uuid}][%d] http_proxy_get default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyGetDefault) String() string {
return fmt.Sprintf("[GET /network/http-proxy/{uuid}][%d] http_proxy_get default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *HTTPProxyGetDefault) 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/networking/network_ethernet_broadcast_domains_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_broadcast_domains_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetBroadcastDomainsGetParams creates a new NetworkEthernetBroadcastDomainsGetParams 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 NewNetworkEthernetBroadcastDomainsGetParams() *NetworkEthernetBroadcastDomainsGetParams {
return &NetworkEthernetBroadcastDomainsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetBroadcastDomainsGetParamsWithTimeout creates a new NetworkEthernetBroadcastDomainsGetParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetBroadcastDomainsGetParamsWithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainsGetParams {
return &NetworkEthernetBroadcastDomainsGetParams{
timeout: timeout,
}
}
// NewNetworkEthernetBroadcastDomainsGetParamsWithContext creates a new NetworkEthernetBroadcastDomainsGetParams object
// with the ability to set a context for a request.
func NewNetworkEthernetBroadcastDomainsGetParamsWithContext(ctx context.Context) *NetworkEthernetBroadcastDomainsGetParams {
return &NetworkEthernetBroadcastDomainsGetParams{
Context: ctx,
}
}
// NewNetworkEthernetBroadcastDomainsGetParamsWithHTTPClient creates a new NetworkEthernetBroadcastDomainsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetBroadcastDomainsGetParamsWithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainsGetParams {
return &NetworkEthernetBroadcastDomainsGetParams{
HTTPClient: client,
}
}
/*
NetworkEthernetBroadcastDomainsGetParams contains all the parameters to send to the API endpoint
for the network ethernet broadcast domains get operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetBroadcastDomainsGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IpspaceName.
Filter by ipspace.name
*/
IpspaceName *string
/* IpspaceUUID.
Filter by ipspace.uuid
*/
IpspaceUUID *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Mtu.
Filter by mtu
*/
Mtu *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
/* PortsName.
Filter by ports.name
*/
PortsName *string
/* PortsNodeName.
Filter by ports.node.name
*/
PortsNodeName *string
/* PortsUUID.
Filter by ports.uuid
*/
PortsUUID *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 network ethernet broadcast domains get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainsGetParams) WithDefaults() *NetworkEthernetBroadcastDomainsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet broadcast domains get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainsGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := NetworkEthernetBroadcastDomainsGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithContext(ctx context.Context) *NetworkEthernetBroadcastDomainsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithFields(fields []string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIpspaceName adds the ipspaceName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithIpspaceName(ipspaceName *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetIpspaceName(ipspaceName)
return o
}
// SetIpspaceName adds the ipspaceName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetIpspaceName(ipspaceName *string) {
o.IpspaceName = ipspaceName
}
// WithIpspaceUUID adds the ipspaceUUID to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithIpspaceUUID(ipspaceUUID *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetIpspaceUUID(ipspaceUUID)
return o
}
// SetIpspaceUUID adds the ipspaceUuid to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetIpspaceUUID(ipspaceUUID *string) {
o.IpspaceUUID = ipspaceUUID
}
// WithMaxRecords adds the maxRecords to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithMaxRecords(maxRecords *int64) *NetworkEthernetBroadcastDomainsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMtu adds the mtu to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithMtu(mtu *int64) *NetworkEthernetBroadcastDomainsGetParams {
o.SetMtu(mtu)
return o
}
// SetMtu adds the mtu to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetMtu(mtu *int64) {
o.Mtu = mtu
}
// WithName adds the name to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithName(name *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithOrderBy(orderBy []string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPortsName adds the portsName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithPortsName(portsName *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetPortsName(portsName)
return o
}
// SetPortsName adds the portsName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetPortsName(portsName *string) {
o.PortsName = portsName
}
// WithPortsNodeName adds the portsNodeName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithPortsNodeName(portsNodeName *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetPortsNodeName(portsNodeName)
return o
}
// SetPortsNodeName adds the portsNodeName to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetPortsNodeName(portsNodeName *string) {
o.PortsNodeName = portsNodeName
}
// WithPortsUUID adds the portsUUID to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithPortsUUID(portsUUID *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetPortsUUID(portsUUID)
return o
}
// SetPortsUUID adds the portsUuid to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetPortsUUID(portsUUID *string) {
o.PortsUUID = portsUUID
}
// WithReturnRecords adds the returnRecords to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithReturnRecords(returnRecords *bool) *NetworkEthernetBroadcastDomainsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithReturnTimeout(returnTimeout *int64) *NetworkEthernetBroadcastDomainsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) WithUUID(uuid *string) *NetworkEthernetBroadcastDomainsGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ethernet broadcast domains get params
func (o *NetworkEthernetBroadcastDomainsGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetBroadcastDomainsGetParams) 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.IpspaceName != nil {
// query param ipspace.name
var qrIpspaceName string
if o.IpspaceName != nil {
qrIpspaceName = *o.IpspaceName
}
qIpspaceName := qrIpspaceName
if qIpspaceName != "" {
if err := r.SetQueryParam("ipspace.name", qIpspaceName); err != nil {
return err
}
}
}
if o.IpspaceUUID != nil {
// query param ipspace.uuid
var qrIpspaceUUID string
if o.IpspaceUUID != nil {
qrIpspaceUUID = *o.IpspaceUUID
}
qIpspaceUUID := qrIpspaceUUID
if qIpspaceUUID != "" {
if err := r.SetQueryParam("ipspace.uuid", qIpspaceUUID); 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.Mtu != nil {
// query param mtu
var qrMtu int64
if o.Mtu != nil {
qrMtu = *o.Mtu
}
qMtu := swag.FormatInt64(qrMtu)
if qMtu != "" {
if err := r.SetQueryParam("mtu", qMtu); 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.PortsName != nil {
// query param ports.name
var qrPortsName string
if o.PortsName != nil {
qrPortsName = *o.PortsName
}
qPortsName := qrPortsName
if qPortsName != "" {
if err := r.SetQueryParam("ports.name", qPortsName); err != nil {
return err
}
}
}
if o.PortsNodeName != nil {
// query param ports.node.name
var qrPortsNodeName string
if o.PortsNodeName != nil {
qrPortsNodeName = *o.PortsNodeName
}
qPortsNodeName := qrPortsNodeName
if qPortsNodeName != "" {
if err := r.SetQueryParam("ports.node.name", qPortsNodeName); err != nil {
return err
}
}
}
if o.PortsUUID != nil {
// query param ports.uuid
var qrPortsUUID string
if o.PortsUUID != nil {
qrPortsUUID = *o.PortsUUID
}
qPortsUUID := qrPortsUUID
if qPortsUUID != "" {
if err := r.SetQueryParam("ports.uuid", qPortsUUID); 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
}
// bindParamNetworkEthernetBroadcastDomainsGet binds the parameter fields
func (o *NetworkEthernetBroadcastDomainsGetParams) 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
}
// bindParamNetworkEthernetBroadcastDomainsGet binds the parameter order_by
func (o *NetworkEthernetBroadcastDomainsGetParams) 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/networking/network_ip_interface_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_interface_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPInterfaceModifyParams creates a new NetworkIPInterfaceModifyParams 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 NewNetworkIPInterfaceModifyParams() *NetworkIPInterfaceModifyParams {
return &NetworkIPInterfaceModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPInterfaceModifyParamsWithTimeout creates a new NetworkIPInterfaceModifyParams object
// with the ability to set a timeout on a request.
func NewNetworkIPInterfaceModifyParamsWithTimeout(timeout time.Duration) *NetworkIPInterfaceModifyParams {
return &NetworkIPInterfaceModifyParams{
timeout: timeout,
}
}
// NewNetworkIPInterfaceModifyParamsWithContext creates a new NetworkIPInterfaceModifyParams object
// with the ability to set a context for a request.
func NewNetworkIPInterfaceModifyParamsWithContext(ctx context.Context) *NetworkIPInterfaceModifyParams {
return &NetworkIPInterfaceModifyParams{
Context: ctx,
}
}
// NewNetworkIPInterfaceModifyParamsWithHTTPClient creates a new NetworkIPInterfaceModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPInterfaceModifyParamsWithHTTPClient(client *http.Client) *NetworkIPInterfaceModifyParams {
return &NetworkIPInterfaceModifyParams{
HTTPClient: client,
}
}
/*
NetworkIPInterfaceModifyParams contains all the parameters to send to the API endpoint
for the network ip interface modify operation.
Typically these are written to a http.Request.
*/
type NetworkIPInterfaceModifyParams struct {
// Info.
Info *models.IPInterface
/* UUID.
IP interface UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip interface modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceModifyParams) WithDefaults() *NetworkIPInterfaceModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip interface modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) WithTimeout(timeout time.Duration) *NetworkIPInterfaceModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) WithContext(ctx context.Context) *NetworkIPInterfaceModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) WithHTTPClient(client *http.Client) *NetworkIPInterfaceModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) WithInfo(info *models.IPInterface) *NetworkIPInterfaceModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) SetInfo(info *models.IPInterface) {
o.Info = info
}
// WithUUID adds the uuid to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) WithUUID(uuid string) *NetworkIPInterfaceModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip interface modify params
func (o *NetworkIPInterfaceModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPInterfaceModifyParams) 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 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/networking/network_ethernet_ports_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_ports_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkEthernetPortsGetReader is a Reader for the NetworkEthernetPortsGet structure.
type NetworkEthernetPortsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkEthernetPortsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkEthernetPortsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkEthernetPortsGetDefault(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
}
}
// NewNetworkEthernetPortsGetOK creates a NetworkEthernetPortsGetOK with default headers values
func NewNetworkEthernetPortsGetOK() *NetworkEthernetPortsGetOK {
return &NetworkEthernetPortsGetOK{}
}
/*
NetworkEthernetPortsGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkEthernetPortsGetOK struct {
Payload *models.PortResponse
}
// IsSuccess returns true when this network ethernet ports get o k response has a 2xx status code
func (o *NetworkEthernetPortsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network ethernet ports get o k response has a 3xx status code
func (o *NetworkEthernetPortsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network ethernet ports get o k response has a 4xx status code
func (o *NetworkEthernetPortsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network ethernet ports get o k response has a 5xx status code
func (o *NetworkEthernetPortsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network ethernet ports get o k response a status code equal to that given
func (o *NetworkEthernetPortsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkEthernetPortsGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/ports][%d] networkEthernetPortsGetOK %+v", 200, o.Payload)
}
func (o *NetworkEthernetPortsGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/ports][%d] networkEthernetPortsGetOK %+v", 200, o.Payload)
}
func (o *NetworkEthernetPortsGetOK) GetPayload() *models.PortResponse {
return o.Payload
}
func (o *NetworkEthernetPortsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PortResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkEthernetPortsGetDefault creates a NetworkEthernetPortsGetDefault with default headers values
func NewNetworkEthernetPortsGetDefault(code int) *NetworkEthernetPortsGetDefault {
return &NetworkEthernetPortsGetDefault{
_statusCode: code,
}
}
/*
NetworkEthernetPortsGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkEthernetPortsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ethernet ports get default response
func (o *NetworkEthernetPortsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ethernet ports get default response has a 2xx status code
func (o *NetworkEthernetPortsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ethernet ports get default response has a 3xx status code
func (o *NetworkEthernetPortsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ethernet ports get default response has a 4xx status code
func (o *NetworkEthernetPortsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ethernet ports get default response has a 5xx status code
func (o *NetworkEthernetPortsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ethernet ports get default response a status code equal to that given
func (o *NetworkEthernetPortsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkEthernetPortsGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/ports][%d] network_ethernet_ports_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetPortsGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/ports][%d] network_ethernet_ports_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetPortsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkEthernetPortsGetDefault) 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/networking/ipspace_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ipspace_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIpspaceGetParams creates a new IpspaceGetParams 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 NewIpspaceGetParams() *IpspaceGetParams {
return &IpspaceGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewIpspaceGetParamsWithTimeout creates a new IpspaceGetParams object
// with the ability to set a timeout on a request.
func NewIpspaceGetParamsWithTimeout(timeout time.Duration) *IpspaceGetParams {
return &IpspaceGetParams{
timeout: timeout,
}
}
// NewIpspaceGetParamsWithContext creates a new IpspaceGetParams object
// with the ability to set a context for a request.
func NewIpspaceGetParamsWithContext(ctx context.Context) *IpspaceGetParams {
return &IpspaceGetParams{
Context: ctx,
}
}
// NewIpspaceGetParamsWithHTTPClient creates a new IpspaceGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewIpspaceGetParamsWithHTTPClient(client *http.Client) *IpspaceGetParams {
return &IpspaceGetParams{
HTTPClient: client,
}
}
/*
IpspaceGetParams contains all the parameters to send to the API endpoint
for the ipspace get operation.
Typically these are written to a http.Request.
*/
type IpspaceGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
IPspace UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the ipspace get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspaceGetParams) WithDefaults() *IpspaceGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ipspace get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IpspaceGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the ipspace get params
func (o *IpspaceGetParams) WithTimeout(timeout time.Duration) *IpspaceGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ipspace get params
func (o *IpspaceGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ipspace get params
func (o *IpspaceGetParams) WithContext(ctx context.Context) *IpspaceGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ipspace get params
func (o *IpspaceGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ipspace get params
func (o *IpspaceGetParams) WithHTTPClient(client *http.Client) *IpspaceGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ipspace get params
func (o *IpspaceGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the ipspace get params
func (o *IpspaceGetParams) WithFields(fields []string) *IpspaceGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the ipspace get params
func (o *IpspaceGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the ipspace get params
func (o *IpspaceGetParams) WithUUID(uuid string) *IpspaceGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the ipspace get params
func (o *IpspaceGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IpspaceGetParams) 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
}
// bindParamIpspaceGet binds the parameter fields
func (o *IpspaceGetParams) 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/networking/fc_switch_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_switch_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcSwitchGetParams creates a new FcSwitchGetParams 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 NewFcSwitchGetParams() *FcSwitchGetParams {
return &FcSwitchGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcSwitchGetParamsWithTimeout creates a new FcSwitchGetParams object
// with the ability to set a timeout on a request.
func NewFcSwitchGetParamsWithTimeout(timeout time.Duration) *FcSwitchGetParams {
return &FcSwitchGetParams{
timeout: timeout,
}
}
// NewFcSwitchGetParamsWithContext creates a new FcSwitchGetParams object
// with the ability to set a context for a request.
func NewFcSwitchGetParamsWithContext(ctx context.Context) *FcSwitchGetParams {
return &FcSwitchGetParams{
Context: ctx,
}
}
// NewFcSwitchGetParamsWithHTTPClient creates a new FcSwitchGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcSwitchGetParamsWithHTTPClient(client *http.Client) *FcSwitchGetParams {
return &FcSwitchGetParams{
HTTPClient: client,
}
}
/*
FcSwitchGetParams contains all the parameters to send to the API endpoint
for the fc switch get operation.
Typically these are written to a http.Request.
*/
type FcSwitchGetParams struct {
/* CacheMaximumAge.
The maximum age of data in the Fibre Channel fabric cache before it should be refreshed from the fabric. The default is 15 minutes.
Format: iso8601
Default: "15 minutes"
*/
CacheMaximumAge *string
/* FabricName.
The WWN of the primary switch of the Fibre Channel fabric.
*/
FabricName string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Wwn.
The WWN of the Fibre Channel switch.
*/
Wwn string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc switch get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcSwitchGetParams) WithDefaults() *FcSwitchGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc switch get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcSwitchGetParams) SetDefaults() {
var (
cacheMaximumAgeDefault = string("15 minutes")
)
val := FcSwitchGetParams{
CacheMaximumAge: &cacheMaximumAgeDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fc switch get params
func (o *FcSwitchGetParams) WithTimeout(timeout time.Duration) *FcSwitchGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc switch get params
func (o *FcSwitchGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc switch get params
func (o *FcSwitchGetParams) WithContext(ctx context.Context) *FcSwitchGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc switch get params
func (o *FcSwitchGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc switch get params
func (o *FcSwitchGetParams) WithHTTPClient(client *http.Client) *FcSwitchGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc switch get params
func (o *FcSwitchGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCacheMaximumAge adds the cacheMaximumAge to the fc switch get params
func (o *FcSwitchGetParams) WithCacheMaximumAge(cacheMaximumAge *string) *FcSwitchGetParams {
o.SetCacheMaximumAge(cacheMaximumAge)
return o
}
// SetCacheMaximumAge adds the cacheMaximumAge to the fc switch get params
func (o *FcSwitchGetParams) SetCacheMaximumAge(cacheMaximumAge *string) {
o.CacheMaximumAge = cacheMaximumAge
}
// WithFabricName adds the fabricName to the fc switch get params
func (o *FcSwitchGetParams) WithFabricName(fabricName string) *FcSwitchGetParams {
o.SetFabricName(fabricName)
return o
}
// SetFabricName adds the fabricName to the fc switch get params
func (o *FcSwitchGetParams) SetFabricName(fabricName string) {
o.FabricName = fabricName
}
// WithFields adds the fields to the fc switch get params
func (o *FcSwitchGetParams) WithFields(fields []string) *FcSwitchGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc switch get params
func (o *FcSwitchGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithWwn adds the wwn to the fc switch get params
func (o *FcSwitchGetParams) WithWwn(wwn string) *FcSwitchGetParams {
o.SetWwn(wwn)
return o
}
// SetWwn adds the wwn to the fc switch get params
func (o *FcSwitchGetParams) SetWwn(wwn string) {
o.Wwn = wwn
}
// WriteToRequest writes these params to a swagger request
func (o *FcSwitchGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CacheMaximumAge != nil {
// query param cache.maximum_age
var qrCacheMaximumAge string
if o.CacheMaximumAge != nil {
qrCacheMaximumAge = *o.CacheMaximumAge
}
qCacheMaximumAge := qrCacheMaximumAge
if qCacheMaximumAge != "" {
if err := r.SetQueryParam("cache.maximum_age", qCacheMaximumAge); err != nil {
return err
}
}
}
// path param fabric.name
if err := r.SetPathParam("fabric.name", o.FabricName); 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 wwn
if err := r.SetPathParam("wwn", o.Wwn); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcSwitchGet binds the parameter fields
func (o *FcSwitchGetParams) 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/networking/network_ip_bgp_peer_group_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_group_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPBgpPeerGroupDeleteReader is a Reader for the NetworkIPBgpPeerGroupDelete structure.
type NetworkIPBgpPeerGroupDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPBgpPeerGroupDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPBgpPeerGroupDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPBgpPeerGroupDeleteDefault(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
}
}
// NewNetworkIPBgpPeerGroupDeleteOK creates a NetworkIPBgpPeerGroupDeleteOK with default headers values
func NewNetworkIPBgpPeerGroupDeleteOK() *NetworkIPBgpPeerGroupDeleteOK {
return &NetworkIPBgpPeerGroupDeleteOK{}
}
/*
NetworkIPBgpPeerGroupDeleteOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPBgpPeerGroupDeleteOK struct {
}
// IsSuccess returns true when this network Ip bgp peer group delete o k response has a 2xx status code
func (o *NetworkIPBgpPeerGroupDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip bgp peer group delete o k response has a 3xx status code
func (o *NetworkIPBgpPeerGroupDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip bgp peer group delete o k response has a 4xx status code
func (o *NetworkIPBgpPeerGroupDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip bgp peer group delete o k response has a 5xx status code
func (o *NetworkIPBgpPeerGroupDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip bgp peer group delete o k response a status code equal to that given
func (o *NetworkIPBgpPeerGroupDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPBgpPeerGroupDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ip/bgp/peer-groups/{uuid}][%d] networkIpBgpPeerGroupDeleteOK ", 200)
}
func (o *NetworkIPBgpPeerGroupDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ip/bgp/peer-groups/{uuid}][%d] networkIpBgpPeerGroupDeleteOK ", 200)
}
func (o *NetworkIPBgpPeerGroupDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewNetworkIPBgpPeerGroupDeleteDefault creates a NetworkIPBgpPeerGroupDeleteDefault with default headers values
func NewNetworkIPBgpPeerGroupDeleteDefault(code int) *NetworkIPBgpPeerGroupDeleteDefault {
return &NetworkIPBgpPeerGroupDeleteDefault{
_statusCode: code,
}
}
/*
NetworkIPBgpPeerGroupDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 53282019 | Internal error. Failed to remove BGP peer group on node. Wait a few minutes and try the command again. |
*/
type NetworkIPBgpPeerGroupDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip bgp peer group delete default response
func (o *NetworkIPBgpPeerGroupDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip bgp peer group delete default response has a 2xx status code
func (o *NetworkIPBgpPeerGroupDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip bgp peer group delete default response has a 3xx status code
func (o *NetworkIPBgpPeerGroupDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip bgp peer group delete default response has a 4xx status code
func (o *NetworkIPBgpPeerGroupDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip bgp peer group delete default response has a 5xx status code
func (o *NetworkIPBgpPeerGroupDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip bgp peer group delete default response a status code equal to that given
func (o *NetworkIPBgpPeerGroupDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPBgpPeerGroupDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/ip/bgp/peer-groups/{uuid}][%d] network_ip_bgp_peer_group_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/ip/bgp/peer-groups/{uuid}][%d] network_ip_bgp_peer_group_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPBgpPeerGroupDeleteDefault) 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/networking/switch_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewSwitchGetParams creates a new SwitchGetParams 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 NewSwitchGetParams() *SwitchGetParams {
return &SwitchGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSwitchGetParamsWithTimeout creates a new SwitchGetParams object
// with the ability to set a timeout on a request.
func NewSwitchGetParamsWithTimeout(timeout time.Duration) *SwitchGetParams {
return &SwitchGetParams{
timeout: timeout,
}
}
// NewSwitchGetParamsWithContext creates a new SwitchGetParams object
// with the ability to set a context for a request.
func NewSwitchGetParamsWithContext(ctx context.Context) *SwitchGetParams {
return &SwitchGetParams{
Context: ctx,
}
}
// NewSwitchGetParamsWithHTTPClient creates a new SwitchGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSwitchGetParamsWithHTTPClient(client *http.Client) *SwitchGetParams {
return &SwitchGetParams{
HTTPClient: client,
}
}
/*
SwitchGetParams contains all the parameters to send to the API endpoint
for the switch get operation.
Typically these are written to a http.Request.
*/
type SwitchGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Name.
Name
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the switch get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchGetParams) WithDefaults() *SwitchGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the switch get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the switch get params
func (o *SwitchGetParams) WithTimeout(timeout time.Duration) *SwitchGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the switch get params
func (o *SwitchGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the switch get params
func (o *SwitchGetParams) WithContext(ctx context.Context) *SwitchGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the switch get params
func (o *SwitchGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the switch get params
func (o *SwitchGetParams) WithHTTPClient(client *http.Client) *SwitchGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the switch get params
func (o *SwitchGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the switch get params
func (o *SwitchGetParams) WithFields(fields []string) *SwitchGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the switch get params
func (o *SwitchGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithName adds the name to the switch get params
func (o *SwitchGetParams) WithName(name string) *SwitchGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the switch get params
func (o *SwitchGetParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *SwitchGetParams) 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 name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSwitchGet binds the parameter fields
func (o *SwitchGetParams) 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/networking/http_proxy_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewHTTPProxyGetParams creates a new HTTPProxyGetParams 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 NewHTTPProxyGetParams() *HTTPProxyGetParams {
return &HTTPProxyGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewHTTPProxyGetParamsWithTimeout creates a new HTTPProxyGetParams object
// with the ability to set a timeout on a request.
func NewHTTPProxyGetParamsWithTimeout(timeout time.Duration) *HTTPProxyGetParams {
return &HTTPProxyGetParams{
timeout: timeout,
}
}
// NewHTTPProxyGetParamsWithContext creates a new HTTPProxyGetParams object
// with the ability to set a context for a request.
func NewHTTPProxyGetParamsWithContext(ctx context.Context) *HTTPProxyGetParams {
return &HTTPProxyGetParams{
Context: ctx,
}
}
// NewHTTPProxyGetParamsWithHTTPClient creates a new HTTPProxyGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewHTTPProxyGetParamsWithHTTPClient(client *http.Client) *HTTPProxyGetParams {
return &HTTPProxyGetParams{
HTTPClient: client,
}
}
/*
HTTPProxyGetParams contains all the parameters to send to the API endpoint
for the http proxy get operation.
Typically these are written to a http.Request.
*/
type HTTPProxyGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
HTTP proxy UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the http proxy get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyGetParams) WithDefaults() *HTTPProxyGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the http proxy get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the http proxy get params
func (o *HTTPProxyGetParams) WithTimeout(timeout time.Duration) *HTTPProxyGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the http proxy get params
func (o *HTTPProxyGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the http proxy get params
func (o *HTTPProxyGetParams) WithContext(ctx context.Context) *HTTPProxyGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the http proxy get params
func (o *HTTPProxyGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the http proxy get params
func (o *HTTPProxyGetParams) WithHTTPClient(client *http.Client) *HTTPProxyGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the http proxy get params
func (o *HTTPProxyGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the http proxy get params
func (o *HTTPProxyGetParams) WithFields(fields []string) *HTTPProxyGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the http proxy get params
func (o *HTTPProxyGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the http proxy get params
func (o *HTTPProxyGetParams) WithUUID(uuid string) *HTTPProxyGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the http proxy get params
func (o *HTTPProxyGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *HTTPProxyGetParams) 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
}
// bindParamHTTPProxyGet binds the parameter fields
func (o *HTTPProxyGetParams) 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/networking/network_ethernet_broadcast_domain_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_broadcast_domain_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetBroadcastDomainDeleteParams creates a new NetworkEthernetBroadcastDomainDeleteParams 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 NewNetworkEthernetBroadcastDomainDeleteParams() *NetworkEthernetBroadcastDomainDeleteParams {
return &NetworkEthernetBroadcastDomainDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetBroadcastDomainDeleteParamsWithTimeout creates a new NetworkEthernetBroadcastDomainDeleteParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetBroadcastDomainDeleteParamsWithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainDeleteParams {
return &NetworkEthernetBroadcastDomainDeleteParams{
timeout: timeout,
}
}
// NewNetworkEthernetBroadcastDomainDeleteParamsWithContext creates a new NetworkEthernetBroadcastDomainDeleteParams object
// with the ability to set a context for a request.
func NewNetworkEthernetBroadcastDomainDeleteParamsWithContext(ctx context.Context) *NetworkEthernetBroadcastDomainDeleteParams {
return &NetworkEthernetBroadcastDomainDeleteParams{
Context: ctx,
}
}
// NewNetworkEthernetBroadcastDomainDeleteParamsWithHTTPClient creates a new NetworkEthernetBroadcastDomainDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetBroadcastDomainDeleteParamsWithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainDeleteParams {
return &NetworkEthernetBroadcastDomainDeleteParams{
HTTPClient: client,
}
}
/*
NetworkEthernetBroadcastDomainDeleteParams contains all the parameters to send to the API endpoint
for the network ethernet broadcast domain delete operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetBroadcastDomainDeleteParams struct {
/* UUID.
Broadcast domain UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ethernet broadcast domain delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainDeleteParams) WithDefaults() *NetworkEthernetBroadcastDomainDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet broadcast domain delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) WithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) WithContext(ctx context.Context) *NetworkEthernetBroadcastDomainDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) WithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) WithUUID(uuid string) *NetworkEthernetBroadcastDomainDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ethernet broadcast domain delete params
func (o *NetworkEthernetBroadcastDomainDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetBroadcastDomainDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/http_proxy_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// HTTPProxyCollectionGetReader is a Reader for the HTTPProxyCollectionGet structure.
type HTTPProxyCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *HTTPProxyCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewHTTPProxyCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewHTTPProxyCollectionGetDefault(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
}
}
// NewHTTPProxyCollectionGetOK creates a HTTPProxyCollectionGetOK with default headers values
func NewHTTPProxyCollectionGetOK() *HTTPProxyCollectionGetOK {
return &HTTPProxyCollectionGetOK{}
}
/*
HTTPProxyCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type HTTPProxyCollectionGetOK struct {
Payload *models.NetworkHTTPProxyResponse
}
// IsSuccess returns true when this http proxy collection get o k response has a 2xx status code
func (o *HTTPProxyCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this http proxy collection get o k response has a 3xx status code
func (o *HTTPProxyCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this http proxy collection get o k response has a 4xx status code
func (o *HTTPProxyCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this http proxy collection get o k response has a 5xx status code
func (o *HTTPProxyCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this http proxy collection get o k response a status code equal to that given
func (o *HTTPProxyCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *HTTPProxyCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/http-proxy][%d] httpProxyCollectionGetOK %+v", 200, o.Payload)
}
func (o *HTTPProxyCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/http-proxy][%d] httpProxyCollectionGetOK %+v", 200, o.Payload)
}
func (o *HTTPProxyCollectionGetOK) GetPayload() *models.NetworkHTTPProxyResponse {
return o.Payload
}
func (o *HTTPProxyCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NetworkHTTPProxyResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewHTTPProxyCollectionGetDefault creates a HTTPProxyCollectionGetDefault with default headers values
func NewHTTPProxyCollectionGetDefault(code int) *HTTPProxyCollectionGetDefault {
return &HTTPProxyCollectionGetDefault{
_statusCode: code,
}
}
/*
HTTPProxyCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type HTTPProxyCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the http proxy collection get default response
func (o *HTTPProxyCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this http proxy collection get default response has a 2xx status code
func (o *HTTPProxyCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this http proxy collection get default response has a 3xx status code
func (o *HTTPProxyCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this http proxy collection get default response has a 4xx status code
func (o *HTTPProxyCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this http proxy collection get default response has a 5xx status code
func (o *HTTPProxyCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this http proxy collection get default response a status code equal to that given
func (o *HTTPProxyCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *HTTPProxyCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/http-proxy][%d] http_proxy_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/http-proxy][%d] http_proxy_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *HTTPProxyCollectionGetDefault) 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/networking/fc_zone_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_zone_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcZoneGetReader is a Reader for the FcZoneGet structure.
type FcZoneGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcZoneGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcZoneGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcZoneGetDefault(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
}
}
// NewFcZoneGetOK creates a FcZoneGetOK with default headers values
func NewFcZoneGetOK() *FcZoneGetOK {
return &FcZoneGetOK{}
}
/*
FcZoneGetOK describes a response with status code 200, with default header values.
OK
*/
type FcZoneGetOK struct {
Payload *models.FcZone
}
// IsSuccess returns true when this fc zone get o k response has a 2xx status code
func (o *FcZoneGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc zone get o k response has a 3xx status code
func (o *FcZoneGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc zone get o k response has a 4xx status code
func (o *FcZoneGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc zone get o k response has a 5xx status code
func (o *FcZoneGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc zone get o k response a status code equal to that given
func (o *FcZoneGetOK) IsCode(code int) bool {
return code == 200
}
func (o *FcZoneGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/zones/{name}][%d] fcZoneGetOK %+v", 200, o.Payload)
}
func (o *FcZoneGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/zones/{name}][%d] fcZoneGetOK %+v", 200, o.Payload)
}
func (o *FcZoneGetOK) GetPayload() *models.FcZone {
return o.Payload
}
func (o *FcZoneGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.FcZone)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcZoneGetDefault creates a FcZoneGetDefault with default headers values
func NewFcZoneGetDefault(code int) *FcZoneGetDefault {
return &FcZoneGetDefault{
_statusCode: code,
}
}
/*
FcZoneGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5375053 | The Fibre Channel fabric specified by name in the request URI was not found in the FC fabric cache. |
*/
type FcZoneGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc zone get default response
func (o *FcZoneGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc zone get default response has a 2xx status code
func (o *FcZoneGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc zone get default response has a 3xx status code
func (o *FcZoneGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc zone get default response has a 4xx status code
func (o *FcZoneGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc zone get default response has a 5xx status code
func (o *FcZoneGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc zone get default response a status code equal to that given
func (o *FcZoneGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcZoneGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/zones/{name}][%d] fc_zone_get default %+v", o._statusCode, o.Payload)
}
func (o *FcZoneGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/zones/{name}][%d] fc_zone_get default %+v", o._statusCode, o.Payload)
}
func (o *FcZoneGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcZoneGetDefault) 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/networking/fc_switch_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_switch_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcSwitchCollectionGetReader is a Reader for the FcSwitchCollectionGet structure.
type FcSwitchCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcSwitchCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcSwitchCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcSwitchCollectionGetDefault(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
}
}
// NewFcSwitchCollectionGetOK creates a FcSwitchCollectionGetOK with default headers values
func NewFcSwitchCollectionGetOK() *FcSwitchCollectionGetOK {
return &FcSwitchCollectionGetOK{}
}
/*
FcSwitchCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type FcSwitchCollectionGetOK struct {
Payload *models.FcSwitchResponse
}
// IsSuccess returns true when this fc switch collection get o k response has a 2xx status code
func (o *FcSwitchCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc switch collection get o k response has a 3xx status code
func (o *FcSwitchCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc switch collection get o k response has a 4xx status code
func (o *FcSwitchCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc switch collection get o k response has a 5xx status code
func (o *FcSwitchCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc switch collection get o k response a status code equal to that given
func (o *FcSwitchCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *FcSwitchCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/switches][%d] fcSwitchCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcSwitchCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/switches][%d] fcSwitchCollectionGetOK %+v", 200, o.Payload)
}
func (o *FcSwitchCollectionGetOK) GetPayload() *models.FcSwitchResponse {
return o.Payload
}
func (o *FcSwitchCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.FcSwitchResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcSwitchCollectionGetDefault creates a FcSwitchCollectionGetDefault with default headers values
func NewFcSwitchCollectionGetDefault(code int) *FcSwitchCollectionGetDefault {
return &FcSwitchCollectionGetDefault{
_statusCode: code,
}
}
/*
FcSwitchCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5375053 | The Fibre Channel fabric specified by name in the request URI was not found in the FC fabric cache. |
*/
type FcSwitchCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc switch collection get default response
func (o *FcSwitchCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc switch collection get default response has a 2xx status code
func (o *FcSwitchCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc switch collection get default response has a 3xx status code
func (o *FcSwitchCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc switch collection get default response has a 4xx status code
func (o *FcSwitchCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc switch collection get default response has a 5xx status code
func (o *FcSwitchCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc switch collection get default response a status code equal to that given
func (o *FcSwitchCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcSwitchCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/switches][%d] fc_switch_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcSwitchCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/fabrics/{fabric.name}/switches][%d] fc_switch_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *FcSwitchCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcSwitchCollectionGetDefault) 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/networking/switch_port_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_port_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// SwitchPortCollectionGetReader is a Reader for the SwitchPortCollectionGet structure.
type SwitchPortCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SwitchPortCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSwitchPortCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSwitchPortCollectionGetDefault(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
}
}
// NewSwitchPortCollectionGetOK creates a SwitchPortCollectionGetOK with default headers values
func NewSwitchPortCollectionGetOK() *SwitchPortCollectionGetOK {
return &SwitchPortCollectionGetOK{}
}
/*
SwitchPortCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type SwitchPortCollectionGetOK struct {
Payload *models.SwitchPortResponse
}
// IsSuccess returns true when this switch port collection get o k response has a 2xx status code
func (o *SwitchPortCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this switch port collection get o k response has a 3xx status code
func (o *SwitchPortCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this switch port collection get o k response has a 4xx status code
func (o *SwitchPortCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this switch port collection get o k response has a 5xx status code
func (o *SwitchPortCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this switch port collection get o k response a status code equal to that given
func (o *SwitchPortCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SwitchPortCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports][%d] switchPortCollectionGetOK %+v", 200, o.Payload)
}
func (o *SwitchPortCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports][%d] switchPortCollectionGetOK %+v", 200, o.Payload)
}
func (o *SwitchPortCollectionGetOK) GetPayload() *models.SwitchPortResponse {
return o.Payload
}
func (o *SwitchPortCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SwitchPortResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSwitchPortCollectionGetDefault creates a SwitchPortCollectionGetDefault with default headers values
func NewSwitchPortCollectionGetDefault(code int) *SwitchPortCollectionGetDefault {
return &SwitchPortCollectionGetDefault{
_statusCode: code,
}
}
/*
SwitchPortCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type SwitchPortCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the switch port collection get default response
func (o *SwitchPortCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this switch port collection get default response has a 2xx status code
func (o *SwitchPortCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this switch port collection get default response has a 3xx status code
func (o *SwitchPortCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this switch port collection get default response has a 4xx status code
func (o *SwitchPortCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this switch port collection get default response has a 5xx status code
func (o *SwitchPortCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this switch port collection get default response a status code equal to that given
func (o *SwitchPortCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SwitchPortCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports][%d] switch_port_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchPortCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/switch/ports][%d] switch_port_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchPortCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SwitchPortCollectionGetDefault) 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/networking/network_ip_service_policy_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_service_policy_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPServicePolicyGetReader is a Reader for the NetworkIPServicePolicyGet structure.
type NetworkIPServicePolicyGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPServicePolicyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPServicePolicyGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPServicePolicyGetDefault(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
}
}
// NewNetworkIPServicePolicyGetOK creates a NetworkIPServicePolicyGetOK with default headers values
func NewNetworkIPServicePolicyGetOK() *NetworkIPServicePolicyGetOK {
return &NetworkIPServicePolicyGetOK{}
}
/*
NetworkIPServicePolicyGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPServicePolicyGetOK struct {
Payload *models.IPServicePolicy
}
// IsSuccess returns true when this network Ip service policy get o k response has a 2xx status code
func (o *NetworkIPServicePolicyGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip service policy get o k response has a 3xx status code
func (o *NetworkIPServicePolicyGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip service policy get o k response has a 4xx status code
func (o *NetworkIPServicePolicyGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip service policy get o k response has a 5xx status code
func (o *NetworkIPServicePolicyGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip service policy get o k response a status code equal to that given
func (o *NetworkIPServicePolicyGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPServicePolicyGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/service-policies/{uuid}][%d] networkIpServicePolicyGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPServicePolicyGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/service-policies/{uuid}][%d] networkIpServicePolicyGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPServicePolicyGetOK) GetPayload() *models.IPServicePolicy {
return o.Payload
}
func (o *NetworkIPServicePolicyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IPServicePolicy)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPServicePolicyGetDefault creates a NetworkIPServicePolicyGetDefault with default headers values
func NewNetworkIPServicePolicyGetDefault(code int) *NetworkIPServicePolicyGetDefault {
return &NetworkIPServicePolicyGetDefault{
_statusCode: code,
}
}
/*
NetworkIPServicePolicyGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPServicePolicyGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip service policy get default response
func (o *NetworkIPServicePolicyGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip service policy get default response has a 2xx status code
func (o *NetworkIPServicePolicyGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip service policy get default response has a 3xx status code
func (o *NetworkIPServicePolicyGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip service policy get default response has a 4xx status code
func (o *NetworkIPServicePolicyGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip service policy get default response has a 5xx status code
func (o *NetworkIPServicePolicyGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip service policy get default response a status code equal to that given
func (o *NetworkIPServicePolicyGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPServicePolicyGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/service-policies/{uuid}][%d] network_ip_service_policy_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPServicePolicyGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/service-policies/{uuid}][%d] network_ip_service_policy_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPServicePolicyGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPServicePolicyGetDefault) 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/networking/interfaces_metrics_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/interfaces_metrics_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// InterfacesMetricsCollectionGetReader is a Reader for the InterfacesMetricsCollectionGet structure.
type InterfacesMetricsCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *InterfacesMetricsCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewInterfacesMetricsCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewInterfacesMetricsCollectionGetDefault(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
}
}
// NewInterfacesMetricsCollectionGetOK creates a InterfacesMetricsCollectionGetOK with default headers values
func NewInterfacesMetricsCollectionGetOK() *InterfacesMetricsCollectionGetOK {
return &InterfacesMetricsCollectionGetOK{}
}
/*
InterfacesMetricsCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type InterfacesMetricsCollectionGetOK struct {
Payload *models.InterfaceMetricsResponse
}
// IsSuccess returns true when this interfaces metrics collection get o k response has a 2xx status code
func (o *InterfacesMetricsCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this interfaces metrics collection get o k response has a 3xx status code
func (o *InterfacesMetricsCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this interfaces metrics collection get o k response has a 4xx status code
func (o *InterfacesMetricsCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this interfaces metrics collection get o k response has a 5xx status code
func (o *InterfacesMetricsCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this interfaces metrics collection get o k response a status code equal to that given
func (o *InterfacesMetricsCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *InterfacesMetricsCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}/metrics][%d] interfacesMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *InterfacesMetricsCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}/metrics][%d] interfacesMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *InterfacesMetricsCollectionGetOK) GetPayload() *models.InterfaceMetricsResponse {
return o.Payload
}
func (o *InterfacesMetricsCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.InterfaceMetricsResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewInterfacesMetricsCollectionGetDefault creates a InterfacesMetricsCollectionGetDefault with default headers values
func NewInterfacesMetricsCollectionGetDefault(code int) *InterfacesMetricsCollectionGetDefault {
return &InterfacesMetricsCollectionGetDefault{
_statusCode: code,
}
}
/*
InterfacesMetricsCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type InterfacesMetricsCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the interfaces metrics collection get default response
func (o *InterfacesMetricsCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this interfaces metrics collection get default response has a 2xx status code
func (o *InterfacesMetricsCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this interfaces metrics collection get default response has a 3xx status code
func (o *InterfacesMetricsCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this interfaces metrics collection get default response has a 4xx status code
func (o *InterfacesMetricsCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this interfaces metrics collection get default response has a 5xx status code
func (o *InterfacesMetricsCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this interfaces metrics collection get default response a status code equal to that given
func (o *InterfacesMetricsCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *InterfacesMetricsCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}/metrics][%d] interfaces_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *InterfacesMetricsCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}/metrics][%d] interfaces_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *InterfacesMetricsCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *InterfacesMetricsCollectionGetDefault) 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/networking/port_metrics_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/port_metrics_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// PortMetricsCollectionGetReader is a Reader for the PortMetricsCollectionGet structure.
type PortMetricsCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PortMetricsCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPortMetricsCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPortMetricsCollectionGetDefault(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
}
}
// NewPortMetricsCollectionGetOK creates a PortMetricsCollectionGetOK with default headers values
func NewPortMetricsCollectionGetOK() *PortMetricsCollectionGetOK {
return &PortMetricsCollectionGetOK{}
}
/*
PortMetricsCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type PortMetricsCollectionGetOK struct {
Payload *models.PortMetricsResponse
}
// IsSuccess returns true when this port metrics collection get o k response has a 2xx status code
func (o *PortMetricsCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this port metrics collection get o k response has a 3xx status code
func (o *PortMetricsCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this port metrics collection get o k response has a 4xx status code
func (o *PortMetricsCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this port metrics collection get o k response has a 5xx status code
func (o *PortMetricsCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this port metrics collection get o k response a status code equal to that given
func (o *PortMetricsCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PortMetricsCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/ports/{uuid}/metrics][%d] portMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *PortMetricsCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/ports/{uuid}/metrics][%d] portMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *PortMetricsCollectionGetOK) GetPayload() *models.PortMetricsResponse {
return o.Payload
}
func (o *PortMetricsCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PortMetricsResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPortMetricsCollectionGetDefault creates a PortMetricsCollectionGetDefault with default headers values
func NewPortMetricsCollectionGetDefault(code int) *PortMetricsCollectionGetDefault {
return &PortMetricsCollectionGetDefault{
_statusCode: code,
}
}
/*
PortMetricsCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type PortMetricsCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the port metrics collection get default response
func (o *PortMetricsCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this port metrics collection get default response has a 2xx status code
func (o *PortMetricsCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this port metrics collection get default response has a 3xx status code
func (o *PortMetricsCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this port metrics collection get default response has a 4xx status code
func (o *PortMetricsCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this port metrics collection get default response has a 5xx status code
func (o *PortMetricsCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this port metrics collection get default response a status code equal to that given
func (o *PortMetricsCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PortMetricsCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/ports/{uuid}/metrics][%d] port_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PortMetricsCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/ports/{uuid}/metrics][%d] port_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PortMetricsCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PortMetricsCollectionGetDefault) 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/networking/network_ip_route_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_route_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPRouteGetReader is a Reader for the NetworkIPRouteGet structure.
type NetworkIPRouteGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPRouteGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPRouteGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPRouteGetDefault(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
}
}
// NewNetworkIPRouteGetOK creates a NetworkIPRouteGetOK with default headers values
func NewNetworkIPRouteGetOK() *NetworkIPRouteGetOK {
return &NetworkIPRouteGetOK{}
}
/*
NetworkIPRouteGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPRouteGetOK struct {
Payload *models.NetworkRoute
}
// IsSuccess returns true when this network Ip route get o k response has a 2xx status code
func (o *NetworkIPRouteGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip route get o k response has a 3xx status code
func (o *NetworkIPRouteGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip route get o k response has a 4xx status code
func (o *NetworkIPRouteGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip route get o k response has a 5xx status code
func (o *NetworkIPRouteGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip route get o k response a status code equal to that given
func (o *NetworkIPRouteGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPRouteGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/routes/{uuid}][%d] networkIpRouteGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPRouteGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/routes/{uuid}][%d] networkIpRouteGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPRouteGetOK) GetPayload() *models.NetworkRoute {
return o.Payload
}
func (o *NetworkIPRouteGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NetworkRoute)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPRouteGetDefault creates a NetworkIPRouteGetDefault with default headers values
func NewNetworkIPRouteGetDefault(code int) *NetworkIPRouteGetDefault {
return &NetworkIPRouteGetDefault{
_statusCode: code,
}
}
/*
NetworkIPRouteGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPRouteGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip route get default response
func (o *NetworkIPRouteGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip route get default response has a 2xx status code
func (o *NetworkIPRouteGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip route get default response has a 3xx status code
func (o *NetworkIPRouteGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip route get default response has a 4xx status code
func (o *NetworkIPRouteGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip route get default response has a 5xx status code
func (o *NetworkIPRouteGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip route get default response a status code equal to that given
func (o *NetworkIPRouteGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPRouteGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/routes/{uuid}][%d] network_ip_route_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRouteGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/routes/{uuid}][%d] network_ip_route_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRouteGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPRouteGetDefault) 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/networking/network_ip_bgp_peer_group_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_group_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPBgpPeerGroupGetParams creates a new NetworkIPBgpPeerGroupGetParams 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 NewNetworkIPBgpPeerGroupGetParams() *NetworkIPBgpPeerGroupGetParams {
return &NetworkIPBgpPeerGroupGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPBgpPeerGroupGetParamsWithTimeout creates a new NetworkIPBgpPeerGroupGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPBgpPeerGroupGetParamsWithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupGetParams {
return &NetworkIPBgpPeerGroupGetParams{
timeout: timeout,
}
}
// NewNetworkIPBgpPeerGroupGetParamsWithContext creates a new NetworkIPBgpPeerGroupGetParams object
// with the ability to set a context for a request.
func NewNetworkIPBgpPeerGroupGetParamsWithContext(ctx context.Context) *NetworkIPBgpPeerGroupGetParams {
return &NetworkIPBgpPeerGroupGetParams{
Context: ctx,
}
}
// NewNetworkIPBgpPeerGroupGetParamsWithHTTPClient creates a new NetworkIPBgpPeerGroupGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPBgpPeerGroupGetParamsWithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupGetParams {
return &NetworkIPBgpPeerGroupGetParams{
HTTPClient: client,
}
}
/*
NetworkIPBgpPeerGroupGetParams contains all the parameters to send to the API endpoint
for the network ip bgp peer group get operation.
Typically these are written to a http.Request.
*/
type NetworkIPBgpPeerGroupGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
UUID of the peer group
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip bgp peer group get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupGetParams) WithDefaults() *NetworkIPBgpPeerGroupGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip bgp peer group get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) WithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) WithContext(ctx context.Context) *NetworkIPBgpPeerGroupGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) WithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) WithFields(fields []string) *NetworkIPBgpPeerGroupGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) WithUUID(uuid string) *NetworkIPBgpPeerGroupGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip bgp peer group get params
func (o *NetworkIPBgpPeerGroupGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPBgpPeerGroupGetParams) 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
}
// bindParamNetworkIPBgpPeerGroupGet binds the parameter fields
func (o *NetworkIPBgpPeerGroupGetParams) 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/networking/performance_fc_interface_metric_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/performance_fc_interface_metric_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// PerformanceFcInterfaceMetricCollectionGetReader is a Reader for the PerformanceFcInterfaceMetricCollectionGet structure.
type PerformanceFcInterfaceMetricCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PerformanceFcInterfaceMetricCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPerformanceFcInterfaceMetricCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPerformanceFcInterfaceMetricCollectionGetDefault(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
}
}
// NewPerformanceFcInterfaceMetricCollectionGetOK creates a PerformanceFcInterfaceMetricCollectionGetOK with default headers values
func NewPerformanceFcInterfaceMetricCollectionGetOK() *PerformanceFcInterfaceMetricCollectionGetOK {
return &PerformanceFcInterfaceMetricCollectionGetOK{}
}
/*
PerformanceFcInterfaceMetricCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type PerformanceFcInterfaceMetricCollectionGetOK struct {
Payload *models.PerformanceFcInterfaceMetricResponse
}
// IsSuccess returns true when this performance fc interface metric collection get o k response has a 2xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this performance fc interface metric collection get o k response has a 3xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this performance fc interface metric collection get o k response has a 4xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this performance fc interface metric collection get o k response has a 5xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this performance fc interface metric collection get o k response a status code equal to that given
func (o *PerformanceFcInterfaceMetricCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PerformanceFcInterfaceMetricCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}/metrics][%d] performanceFcInterfaceMetricCollectionGetOK %+v", 200, o.Payload)
}
func (o *PerformanceFcInterfaceMetricCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}/metrics][%d] performanceFcInterfaceMetricCollectionGetOK %+v", 200, o.Payload)
}
func (o *PerformanceFcInterfaceMetricCollectionGetOK) GetPayload() *models.PerformanceFcInterfaceMetricResponse {
return o.Payload
}
func (o *PerformanceFcInterfaceMetricCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PerformanceFcInterfaceMetricResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPerformanceFcInterfaceMetricCollectionGetDefault creates a PerformanceFcInterfaceMetricCollectionGetDefault with default headers values
func NewPerformanceFcInterfaceMetricCollectionGetDefault(code int) *PerformanceFcInterfaceMetricCollectionGetDefault {
return &PerformanceFcInterfaceMetricCollectionGetDefault{
_statusCode: code,
}
}
/*
PerformanceFcInterfaceMetricCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type PerformanceFcInterfaceMetricCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the performance fc interface metric collection get default response
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this performance fc interface metric collection get default response has a 2xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this performance fc interface metric collection get default response has a 3xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this performance fc interface metric collection get default response has a 4xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this performance fc interface metric collection get default response has a 5xx status code
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this performance fc interface metric collection get default response a status code equal to that given
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}/metrics][%d] performance_fc_interface_metric_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}/metrics][%d] performance_fc_interface_metric_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PerformanceFcInterfaceMetricCollectionGetDefault) 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/networking/switch_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewSwitchCreateParams creates a new SwitchCreateParams 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 NewSwitchCreateParams() *SwitchCreateParams {
return &SwitchCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewSwitchCreateParamsWithTimeout creates a new SwitchCreateParams object
// with the ability to set a timeout on a request.
func NewSwitchCreateParamsWithTimeout(timeout time.Duration) *SwitchCreateParams {
return &SwitchCreateParams{
timeout: timeout,
}
}
// NewSwitchCreateParamsWithContext creates a new SwitchCreateParams object
// with the ability to set a context for a request.
func NewSwitchCreateParamsWithContext(ctx context.Context) *SwitchCreateParams {
return &SwitchCreateParams{
Context: ctx,
}
}
// NewSwitchCreateParamsWithHTTPClient creates a new SwitchCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewSwitchCreateParamsWithHTTPClient(client *http.Client) *SwitchCreateParams {
return &SwitchCreateParams{
HTTPClient: client,
}
}
/*
SwitchCreateParams contains all the parameters to send to the API endpoint
for the switch create operation.
Typically these are written to a http.Request.
*/
type SwitchCreateParams struct {
/* Info.
Info specification
*/
Info *models.Switch
/* ReturnRecords.
The default is false. If set to true, the records are returned.
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the switch create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchCreateParams) WithDefaults() *SwitchCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the switch create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := SwitchCreateParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the switch create params
func (o *SwitchCreateParams) WithTimeout(timeout time.Duration) *SwitchCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the switch create params
func (o *SwitchCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the switch create params
func (o *SwitchCreateParams) WithContext(ctx context.Context) *SwitchCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the switch create params
func (o *SwitchCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the switch create params
func (o *SwitchCreateParams) WithHTTPClient(client *http.Client) *SwitchCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the switch create params
func (o *SwitchCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the switch create params
func (o *SwitchCreateParams) WithInfo(info *models.Switch) *SwitchCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the switch create params
func (o *SwitchCreateParams) SetInfo(info *models.Switch) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the switch create params
func (o *SwitchCreateParams) WithReturnRecords(returnRecords *bool) *SwitchCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the switch create params
func (o *SwitchCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the switch create params
func (o *SwitchCreateParams) WithReturnTimeout(returnTimeout *int64) *SwitchCreateParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the switch create params
func (o *SwitchCreateParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *SwitchCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewHTTPProxyDeleteParams creates a new HTTPProxyDeleteParams 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 NewHTTPProxyDeleteParams() *HTTPProxyDeleteParams {
return &HTTPProxyDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewHTTPProxyDeleteParamsWithTimeout creates a new HTTPProxyDeleteParams object
// with the ability to set a timeout on a request.
func NewHTTPProxyDeleteParamsWithTimeout(timeout time.Duration) *HTTPProxyDeleteParams {
return &HTTPProxyDeleteParams{
timeout: timeout,
}
}
// NewHTTPProxyDeleteParamsWithContext creates a new HTTPProxyDeleteParams object
// with the ability to set a context for a request.
func NewHTTPProxyDeleteParamsWithContext(ctx context.Context) *HTTPProxyDeleteParams {
return &HTTPProxyDeleteParams{
Context: ctx,
}
}
// NewHTTPProxyDeleteParamsWithHTTPClient creates a new HTTPProxyDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewHTTPProxyDeleteParamsWithHTTPClient(client *http.Client) *HTTPProxyDeleteParams {
return &HTTPProxyDeleteParams{
HTTPClient: client,
}
}
/*
HTTPProxyDeleteParams contains all the parameters to send to the API endpoint
for the http proxy delete operation.
Typically these are written to a http.Request.
*/
type HTTPProxyDeleteParams struct {
/* UUID.
HTTP proxy UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the http proxy delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyDeleteParams) WithDefaults() *HTTPProxyDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the http proxy delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the http proxy delete params
func (o *HTTPProxyDeleteParams) WithTimeout(timeout time.Duration) *HTTPProxyDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the http proxy delete params
func (o *HTTPProxyDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the http proxy delete params
func (o *HTTPProxyDeleteParams) WithContext(ctx context.Context) *HTTPProxyDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the http proxy delete params
func (o *HTTPProxyDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the http proxy delete params
func (o *HTTPProxyDeleteParams) WithHTTPClient(client *http.Client) *HTTPProxyDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the http proxy delete params
func (o *HTTPProxyDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the http proxy delete params
func (o *HTTPProxyDeleteParams) WithUUID(uuid string) *HTTPProxyDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the http proxy delete params
func (o *HTTPProxyDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *HTTPProxyDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/performance_fc_port_metric_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/performance_fc_port_metric_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewPerformanceFcPortMetricCollectionGetParams creates a new PerformanceFcPortMetricCollectionGetParams 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 NewPerformanceFcPortMetricCollectionGetParams() *PerformanceFcPortMetricCollectionGetParams {
return &PerformanceFcPortMetricCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPerformanceFcPortMetricCollectionGetParamsWithTimeout creates a new PerformanceFcPortMetricCollectionGetParams object
// with the ability to set a timeout on a request.
func NewPerformanceFcPortMetricCollectionGetParamsWithTimeout(timeout time.Duration) *PerformanceFcPortMetricCollectionGetParams {
return &PerformanceFcPortMetricCollectionGetParams{
timeout: timeout,
}
}
// NewPerformanceFcPortMetricCollectionGetParamsWithContext creates a new PerformanceFcPortMetricCollectionGetParams object
// with the ability to set a context for a request.
func NewPerformanceFcPortMetricCollectionGetParamsWithContext(ctx context.Context) *PerformanceFcPortMetricCollectionGetParams {
return &PerformanceFcPortMetricCollectionGetParams{
Context: ctx,
}
}
// NewPerformanceFcPortMetricCollectionGetParamsWithHTTPClient creates a new PerformanceFcPortMetricCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPerformanceFcPortMetricCollectionGetParamsWithHTTPClient(client *http.Client) *PerformanceFcPortMetricCollectionGetParams {
return &PerformanceFcPortMetricCollectionGetParams{
HTTPClient: client,
}
}
/*
PerformanceFcPortMetricCollectionGetParams contains all the parameters to send to the API endpoint
for the performance fc port metric collection get operation.
Typically these are written to a http.Request.
*/
type PerformanceFcPortMetricCollectionGetParams 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
/* 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
/* UUID.
Unique identifier of the FC port.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the performance fc port metric collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PerformanceFcPortMetricCollectionGetParams) WithDefaults() *PerformanceFcPortMetricCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the performance fc port metric collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PerformanceFcPortMetricCollectionGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := PerformanceFcPortMetricCollectionGetParams{
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 performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithTimeout(timeout time.Duration) *PerformanceFcPortMetricCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithContext(ctx context.Context) *PerformanceFcPortMetricCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithHTTPClient(client *http.Client) *PerformanceFcPortMetricCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithDuration(duration *string) *PerformanceFcPortMetricCollectionGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithFields(fields []string) *PerformanceFcPortMetricCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithInterval(interval *string) *PerformanceFcPortMetricCollectionGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithIopsOther(iopsOther *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithIopsRead(iopsRead *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithIopsTotal(iopsTotal *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithIopsWrite(iopsWrite *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithLatencyOther(latencyOther *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithLatencyRead(latencyRead *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithLatencyTotal(latencyTotal *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithLatencyWrite(latencyWrite *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithMaxRecords(maxRecords *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithOrderBy(orderBy []string) *PerformanceFcPortMetricCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithReturnRecords(returnRecords *bool) *PerformanceFcPortMetricCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithStatus(status *string) *PerformanceFcPortMetricCollectionGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetStatus(status *string) {
o.Status = status
}
// WithThroughputRead adds the throughputRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithThroughputRead(throughputRead *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithThroughputTotal(throughputTotal *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *PerformanceFcPortMetricCollectionGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithTimestamp(timestamp *string) *PerformanceFcPortMetricCollectionGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WithUUID adds the uuid to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) WithUUID(uuid string) *PerformanceFcPortMetricCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the performance fc port metric collection get params
func (o *PerformanceFcPortMetricCollectionGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PerformanceFcPortMetricCollectionGetParams) 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
}
}
}
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
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamPerformanceFcPortMetricCollectionGet binds the parameter fields
func (o *PerformanceFcPortMetricCollectionGetParams) 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
}
// bindParamPerformanceFcPortMetricCollectionGet binds the parameter order_by
func (o *PerformanceFcPortMetricCollectionGetParams) 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/networking/fc_zone_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_zone_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcZoneGetParams creates a new FcZoneGetParams 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 NewFcZoneGetParams() *FcZoneGetParams {
return &FcZoneGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcZoneGetParamsWithTimeout creates a new FcZoneGetParams object
// with the ability to set a timeout on a request.
func NewFcZoneGetParamsWithTimeout(timeout time.Duration) *FcZoneGetParams {
return &FcZoneGetParams{
timeout: timeout,
}
}
// NewFcZoneGetParamsWithContext creates a new FcZoneGetParams object
// with the ability to set a context for a request.
func NewFcZoneGetParamsWithContext(ctx context.Context) *FcZoneGetParams {
return &FcZoneGetParams{
Context: ctx,
}
}
// NewFcZoneGetParamsWithHTTPClient creates a new FcZoneGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcZoneGetParamsWithHTTPClient(client *http.Client) *FcZoneGetParams {
return &FcZoneGetParams{
HTTPClient: client,
}
}
/*
FcZoneGetParams contains all the parameters to send to the API endpoint
for the fc zone get operation.
Typically these are written to a http.Request.
*/
type FcZoneGetParams struct {
/* CacheMaximumAge.
The maximum age of data in the Fibre Channel fabric cache before it should be refreshed from the fabric. The default is 15 minutes.
Format: iso8601
Default: "15 minutes"
*/
CacheMaximumAge *string
/* FabricName.
The WWN of the primary switch of the Fibre Channel fabric.
*/
FabricName string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Name.
The name of a zone in the active zoneset the Fibre Channel fabric.
*/
Name string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc zone get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcZoneGetParams) WithDefaults() *FcZoneGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc zone get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcZoneGetParams) SetDefaults() {
var (
cacheMaximumAgeDefault = string("15 minutes")
)
val := FcZoneGetParams{
CacheMaximumAge: &cacheMaximumAgeDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fc zone get params
func (o *FcZoneGetParams) WithTimeout(timeout time.Duration) *FcZoneGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc zone get params
func (o *FcZoneGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc zone get params
func (o *FcZoneGetParams) WithContext(ctx context.Context) *FcZoneGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc zone get params
func (o *FcZoneGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc zone get params
func (o *FcZoneGetParams) WithHTTPClient(client *http.Client) *FcZoneGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc zone get params
func (o *FcZoneGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCacheMaximumAge adds the cacheMaximumAge to the fc zone get params
func (o *FcZoneGetParams) WithCacheMaximumAge(cacheMaximumAge *string) *FcZoneGetParams {
o.SetCacheMaximumAge(cacheMaximumAge)
return o
}
// SetCacheMaximumAge adds the cacheMaximumAge to the fc zone get params
func (o *FcZoneGetParams) SetCacheMaximumAge(cacheMaximumAge *string) {
o.CacheMaximumAge = cacheMaximumAge
}
// WithFabricName adds the fabricName to the fc zone get params
func (o *FcZoneGetParams) WithFabricName(fabricName string) *FcZoneGetParams {
o.SetFabricName(fabricName)
return o
}
// SetFabricName adds the fabricName to the fc zone get params
func (o *FcZoneGetParams) SetFabricName(fabricName string) {
o.FabricName = fabricName
}
// WithFields adds the fields to the fc zone get params
func (o *FcZoneGetParams) WithFields(fields []string) *FcZoneGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc zone get params
func (o *FcZoneGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithName adds the name to the fc zone get params
func (o *FcZoneGetParams) WithName(name string) *FcZoneGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the fc zone get params
func (o *FcZoneGetParams) SetName(name string) {
o.Name = name
}
// WriteToRequest writes these params to a swagger request
func (o *FcZoneGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CacheMaximumAge != nil {
// query param cache.maximum_age
var qrCacheMaximumAge string
if o.CacheMaximumAge != nil {
qrCacheMaximumAge = *o.CacheMaximumAge
}
qCacheMaximumAge := qrCacheMaximumAge
if qCacheMaximumAge != "" {
if err := r.SetQueryParam("cache.maximum_age", qCacheMaximumAge); err != nil {
return err
}
}
}
// path param fabric.name
if err := r.SetPathParam("fabric.name", o.FabricName); 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 name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcZoneGet binds the parameter fields
func (o *FcZoneGetParams) 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/networking/network_ip_routes_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_routes_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPRoutesGetReader is a Reader for the NetworkIPRoutesGet structure.
type NetworkIPRoutesGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPRoutesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPRoutesGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPRoutesGetDefault(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
}
}
// NewNetworkIPRoutesGetOK creates a NetworkIPRoutesGetOK with default headers values
func NewNetworkIPRoutesGetOK() *NetworkIPRoutesGetOK {
return &NetworkIPRoutesGetOK{}
}
/*
NetworkIPRoutesGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPRoutesGetOK struct {
Payload *models.NetworkRouteResponse
}
// IsSuccess returns true when this network Ip routes get o k response has a 2xx status code
func (o *NetworkIPRoutesGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip routes get o k response has a 3xx status code
func (o *NetworkIPRoutesGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip routes get o k response has a 4xx status code
func (o *NetworkIPRoutesGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip routes get o k response has a 5xx status code
func (o *NetworkIPRoutesGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip routes get o k response a status code equal to that given
func (o *NetworkIPRoutesGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPRoutesGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/routes][%d] networkIpRoutesGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPRoutesGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/routes][%d] networkIpRoutesGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPRoutesGetOK) GetPayload() *models.NetworkRouteResponse {
return o.Payload
}
func (o *NetworkIPRoutesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NetworkRouteResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPRoutesGetDefault creates a NetworkIPRoutesGetDefault with default headers values
func NewNetworkIPRoutesGetDefault(code int) *NetworkIPRoutesGetDefault {
return &NetworkIPRoutesGetDefault{
_statusCode: code,
}
}
/*
NetworkIPRoutesGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPRoutesGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip routes get default response
func (o *NetworkIPRoutesGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip routes get default response has a 2xx status code
func (o *NetworkIPRoutesGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip routes get default response has a 3xx status code
func (o *NetworkIPRoutesGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip routes get default response has a 4xx status code
func (o *NetworkIPRoutesGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip routes get default response has a 5xx status code
func (o *NetworkIPRoutesGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip routes get default response a status code equal to that given
func (o *NetworkIPRoutesGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPRoutesGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/routes][%d] network_ip_routes_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRoutesGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/routes][%d] network_ip_routes_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRoutesGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPRoutesGetDefault) 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/networking/switch_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// SwitchCollectionGetReader is a Reader for the SwitchCollectionGet structure.
type SwitchCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SwitchCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSwitchCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSwitchCollectionGetDefault(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
}
}
// NewSwitchCollectionGetOK creates a SwitchCollectionGetOK with default headers values
func NewSwitchCollectionGetOK() *SwitchCollectionGetOK {
return &SwitchCollectionGetOK{}
}
/*
SwitchCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type SwitchCollectionGetOK struct {
Payload *models.SwitchResponse
}
// IsSuccess returns true when this switch collection get o k response has a 2xx status code
func (o *SwitchCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this switch collection get o k response has a 3xx status code
func (o *SwitchCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this switch collection get o k response has a 4xx status code
func (o *SwitchCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this switch collection get o k response has a 5xx status code
func (o *SwitchCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this switch collection get o k response a status code equal to that given
func (o *SwitchCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SwitchCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switches][%d] switchCollectionGetOK %+v", 200, o.Payload)
}
func (o *SwitchCollectionGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/switches][%d] switchCollectionGetOK %+v", 200, o.Payload)
}
func (o *SwitchCollectionGetOK) GetPayload() *models.SwitchResponse {
return o.Payload
}
func (o *SwitchCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SwitchResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSwitchCollectionGetDefault creates a SwitchCollectionGetDefault with default headers values
func NewSwitchCollectionGetDefault(code int) *SwitchCollectionGetDefault {
return &SwitchCollectionGetDefault{
_statusCode: code,
}
}
/*
SwitchCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type SwitchCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the switch collection get default response
func (o *SwitchCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this switch collection get default response has a 2xx status code
func (o *SwitchCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this switch collection get default response has a 3xx status code
func (o *SwitchCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this switch collection get default response has a 4xx status code
func (o *SwitchCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this switch collection get default response has a 5xx status code
func (o *SwitchCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this switch collection get default response a status code equal to that given
func (o *SwitchCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SwitchCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switches][%d] switch_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/switches][%d] switch_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SwitchCollectionGetDefault) 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/networking/ip_subnet_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIPSubnetModifyParams creates a new IPSubnetModifyParams 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 NewIPSubnetModifyParams() *IPSubnetModifyParams {
return &IPSubnetModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewIPSubnetModifyParamsWithTimeout creates a new IPSubnetModifyParams object
// with the ability to set a timeout on a request.
func NewIPSubnetModifyParamsWithTimeout(timeout time.Duration) *IPSubnetModifyParams {
return &IPSubnetModifyParams{
timeout: timeout,
}
}
// NewIPSubnetModifyParamsWithContext creates a new IPSubnetModifyParams object
// with the ability to set a context for a request.
func NewIPSubnetModifyParamsWithContext(ctx context.Context) *IPSubnetModifyParams {
return &IPSubnetModifyParams{
Context: ctx,
}
}
// NewIPSubnetModifyParamsWithHTTPClient creates a new IPSubnetModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewIPSubnetModifyParamsWithHTTPClient(client *http.Client) *IPSubnetModifyParams {
return &IPSubnetModifyParams{
HTTPClient: client,
}
}
/*
IPSubnetModifyParams contains all the parameters to send to the API endpoint
for the ip subnet modify operation.
Typically these are written to a http.Request.
*/
type IPSubnetModifyParams struct {
// Info.
Info *models.IPSubnet
/* UUID.
IP subnet UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the ip subnet modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetModifyParams) WithDefaults() *IPSubnetModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ip subnet modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the ip subnet modify params
func (o *IPSubnetModifyParams) WithTimeout(timeout time.Duration) *IPSubnetModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ip subnet modify params
func (o *IPSubnetModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ip subnet modify params
func (o *IPSubnetModifyParams) WithContext(ctx context.Context) *IPSubnetModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ip subnet modify params
func (o *IPSubnetModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ip subnet modify params
func (o *IPSubnetModifyParams) WithHTTPClient(client *http.Client) *IPSubnetModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ip subnet modify params
func (o *IPSubnetModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the ip subnet modify params
func (o *IPSubnetModifyParams) WithInfo(info *models.IPSubnet) *IPSubnetModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the ip subnet modify params
func (o *IPSubnetModifyParams) SetInfo(info *models.IPSubnet) {
o.Info = info
}
// WithUUID adds the uuid to the ip subnet modify params
func (o *IPSubnetModifyParams) WithUUID(uuid string) *IPSubnetModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the ip subnet modify params
func (o *IPSubnetModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IPSubnetModifyParams) 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 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/networking/fc_interface_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcInterfaceGetReader is a Reader for the FcInterfaceGet structure.
type FcInterfaceGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcInterfaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcInterfaceGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcInterfaceGetDefault(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
}
}
// NewFcInterfaceGetOK creates a FcInterfaceGetOK with default headers values
func NewFcInterfaceGetOK() *FcInterfaceGetOK {
return &FcInterfaceGetOK{}
}
/*
FcInterfaceGetOK describes a response with status code 200, with default header values.
OK
*/
type FcInterfaceGetOK struct {
Payload *models.FcInterface
}
// IsSuccess returns true when this fc interface get o k response has a 2xx status code
func (o *FcInterfaceGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc interface get o k response has a 3xx status code
func (o *FcInterfaceGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc interface get o k response has a 4xx status code
func (o *FcInterfaceGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc interface get o k response has a 5xx status code
func (o *FcInterfaceGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc interface get o k response a status code equal to that given
func (o *FcInterfaceGetOK) IsCode(code int) bool {
return code == 200
}
func (o *FcInterfaceGetOK) Error() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}][%d] fcInterfaceGetOK %+v", 200, o.Payload)
}
func (o *FcInterfaceGetOK) String() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}][%d] fcInterfaceGetOK %+v", 200, o.Payload)
}
func (o *FcInterfaceGetOK) GetPayload() *models.FcInterface {
return o.Payload
}
func (o *FcInterfaceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.FcInterface)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcInterfaceGetDefault creates a FcInterfaceGetDefault with default headers values
func NewFcInterfaceGetDefault(code int) *FcInterfaceGetDefault {
return &FcInterfaceGetDefault{
_statusCode: code,
}
}
/*
FcInterfaceGetDefault describes a response with status code -1, with default header values.
Error
*/
type FcInterfaceGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc interface get default response
func (o *FcInterfaceGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc interface get default response has a 2xx status code
func (o *FcInterfaceGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc interface get default response has a 3xx status code
func (o *FcInterfaceGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc interface get default response has a 4xx status code
func (o *FcInterfaceGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc interface get default response has a 5xx status code
func (o *FcInterfaceGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc interface get default response a status code equal to that given
func (o *FcInterfaceGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcInterfaceGetDefault) Error() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}][%d] fc_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceGetDefault) String() string {
return fmt.Sprintf("[GET /network/fc/interfaces/{uuid}][%d] fc_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcInterfaceGetDefault) 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/networking/ip_service_policy_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_service_policy_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// IPServicePolicyModifyReader is a Reader for the IPServicePolicyModify structure.
type IPServicePolicyModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IPServicePolicyModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIPServicePolicyModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIPServicePolicyModifyDefault(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
}
}
// NewIPServicePolicyModifyOK creates a IPServicePolicyModifyOK with default headers values
func NewIPServicePolicyModifyOK() *IPServicePolicyModifyOK {
return &IPServicePolicyModifyOK{}
}
/*
IPServicePolicyModifyOK describes a response with status code 200, with default header values.
OK
*/
type IPServicePolicyModifyOK struct {
}
// IsSuccess returns true when this ip service policy modify o k response has a 2xx status code
func (o *IPServicePolicyModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ip service policy modify o k response has a 3xx status code
func (o *IPServicePolicyModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ip service policy modify o k response has a 4xx status code
func (o *IPServicePolicyModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ip service policy modify o k response has a 5xx status code
func (o *IPServicePolicyModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this ip service policy modify o k response a status code equal to that given
func (o *IPServicePolicyModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *IPServicePolicyModifyOK) Error() string {
return fmt.Sprintf("[PATCH /network/ip/service-policies/{uuid}][%d] ipServicePolicyModifyOK ", 200)
}
func (o *IPServicePolicyModifyOK) String() string {
return fmt.Sprintf("[PATCH /network/ip/service-policies/{uuid}][%d] ipServicePolicyModifyOK ", 200)
}
func (o *IPServicePolicyModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIPServicePolicyModifyDefault creates a IPServicePolicyModifyDefault with default headers values
func NewIPServicePolicyModifyDefault(code int) *IPServicePolicyModifyDefault {
return &IPServicePolicyModifyDefault{
_statusCode: code,
}
}
/*
IPServicePolicyModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1376669 | Port must reside in the same IPspace as the interface's SVM. |
| 53281929 | Service policies cannot combine block and file services. |
| 53281930 | Service policies maintained by the system cannot be renamed. |
| 53281931 | Service policy names cannot start with "default-". |
| 53281932 | Service cannot be added because the service does not exist for the specified SVM or IPspace. |
| 53281933 | A Cluster-scoped service cannot be added to a SVM-scoped service policy. |
| 53281934 | An SVM-scoped service cannot be added to a Cluster-scoped service policy. |
| 53281952 | The service policy on an SVM cannot be updated to include a block service. Use built-in service policies for SAN services. |
| 53281953 | The service policy on an SVM cannot be updated to include a new service. |
*/
type IPServicePolicyModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ip service policy modify default response
func (o *IPServicePolicyModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ip service policy modify default response has a 2xx status code
func (o *IPServicePolicyModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ip service policy modify default response has a 3xx status code
func (o *IPServicePolicyModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ip service policy modify default response has a 4xx status code
func (o *IPServicePolicyModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ip service policy modify default response has a 5xx status code
func (o *IPServicePolicyModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ip service policy modify default response a status code equal to that given
func (o *IPServicePolicyModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IPServicePolicyModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /network/ip/service-policies/{uuid}][%d] ip_service_policy_modify default %+v", o._statusCode, o.Payload)
}
func (o *IPServicePolicyModifyDefault) String() string {
return fmt.Sprintf("[PATCH /network/ip/service-policies/{uuid}][%d] ip_service_policy_modify default %+v", o._statusCode, o.Payload)
}
func (o *IPServicePolicyModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IPServicePolicyModifyDefault) 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/networking/network_ip_service_policies_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_service_policies_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPServicePoliciesGetReader is a Reader for the NetworkIPServicePoliciesGet structure.
type NetworkIPServicePoliciesGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPServicePoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPServicePoliciesGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPServicePoliciesGetDefault(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
}
}
// NewNetworkIPServicePoliciesGetOK creates a NetworkIPServicePoliciesGetOK with default headers values
func NewNetworkIPServicePoliciesGetOK() *NetworkIPServicePoliciesGetOK {
return &NetworkIPServicePoliciesGetOK{}
}
/*
NetworkIPServicePoliciesGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPServicePoliciesGetOK struct {
Payload *models.IPServicePolicyResponse
}
// IsSuccess returns true when this network Ip service policies get o k response has a 2xx status code
func (o *NetworkIPServicePoliciesGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip service policies get o k response has a 3xx status code
func (o *NetworkIPServicePoliciesGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip service policies get o k response has a 4xx status code
func (o *NetworkIPServicePoliciesGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip service policies get o k response has a 5xx status code
func (o *NetworkIPServicePoliciesGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip service policies get o k response a status code equal to that given
func (o *NetworkIPServicePoliciesGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPServicePoliciesGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/service-policies][%d] networkIpServicePoliciesGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPServicePoliciesGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/service-policies][%d] networkIpServicePoliciesGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPServicePoliciesGetOK) GetPayload() *models.IPServicePolicyResponse {
return o.Payload
}
func (o *NetworkIPServicePoliciesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IPServicePolicyResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPServicePoliciesGetDefault creates a NetworkIPServicePoliciesGetDefault with default headers values
func NewNetworkIPServicePoliciesGetDefault(code int) *NetworkIPServicePoliciesGetDefault {
return &NetworkIPServicePoliciesGetDefault{
_statusCode: code,
}
}
/*
NetworkIPServicePoliciesGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPServicePoliciesGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip service policies get default response
func (o *NetworkIPServicePoliciesGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip service policies get default response has a 2xx status code
func (o *NetworkIPServicePoliciesGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip service policies get default response has a 3xx status code
func (o *NetworkIPServicePoliciesGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip service policies get default response has a 4xx status code
func (o *NetworkIPServicePoliciesGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip service policies get default response has a 5xx status code
func (o *NetworkIPServicePoliciesGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip service policies get default response a status code equal to that given
func (o *NetworkIPServicePoliciesGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPServicePoliciesGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/service-policies][%d] network_ip_service_policies_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPServicePoliciesGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/service-policies][%d] network_ip_service_policies_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPServicePoliciesGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPServicePoliciesGetDefault) 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/networking/switch_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// SwitchGetReader is a Reader for the SwitchGet structure.
type SwitchGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SwitchGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSwitchGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSwitchGetDefault(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
}
}
// NewSwitchGetOK creates a SwitchGetOK with default headers values
func NewSwitchGetOK() *SwitchGetOK {
return &SwitchGetOK{}
}
/*
SwitchGetOK describes a response with status code 200, with default header values.
OK
*/
type SwitchGetOK struct {
Payload *models.Switch
}
// IsSuccess returns true when this switch get o k response has a 2xx status code
func (o *SwitchGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this switch get o k response has a 3xx status code
func (o *SwitchGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this switch get o k response has a 4xx status code
func (o *SwitchGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this switch get o k response has a 5xx status code
func (o *SwitchGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this switch get o k response a status code equal to that given
func (o *SwitchGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SwitchGetOK) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switches/{name}][%d] switchGetOK %+v", 200, o.Payload)
}
func (o *SwitchGetOK) String() string {
return fmt.Sprintf("[GET /network/ethernet/switches/{name}][%d] switchGetOK %+v", 200, o.Payload)
}
func (o *SwitchGetOK) GetPayload() *models.Switch {
return o.Payload
}
func (o *SwitchGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Switch)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSwitchGetDefault creates a SwitchGetDefault with default headers values
func NewSwitchGetDefault(code int) *SwitchGetDefault {
return &SwitchGetDefault{
_statusCode: code,
}
}
/*
SwitchGetDefault describes a response with status code -1, with default header values.
Error
*/
type SwitchGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the switch get default response
func (o *SwitchGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this switch get default response has a 2xx status code
func (o *SwitchGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this switch get default response has a 3xx status code
func (o *SwitchGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this switch get default response has a 4xx status code
func (o *SwitchGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this switch get default response has a 5xx status code
func (o *SwitchGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this switch get default response a status code equal to that given
func (o *SwitchGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SwitchGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ethernet/switches/{name}][%d] switch_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchGetDefault) String() string {
return fmt.Sprintf("[GET /network/ethernet/switches/{name}][%d] switch_get default %+v", o._statusCode, o.Payload)
}
func (o *SwitchGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SwitchGetDefault) 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/networking/ip_subnet_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewIPSubnetDeleteParams creates a new IPSubnetDeleteParams 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 NewIPSubnetDeleteParams() *IPSubnetDeleteParams {
return &IPSubnetDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewIPSubnetDeleteParamsWithTimeout creates a new IPSubnetDeleteParams object
// with the ability to set a timeout on a request.
func NewIPSubnetDeleteParamsWithTimeout(timeout time.Duration) *IPSubnetDeleteParams {
return &IPSubnetDeleteParams{
timeout: timeout,
}
}
// NewIPSubnetDeleteParamsWithContext creates a new IPSubnetDeleteParams object
// with the ability to set a context for a request.
func NewIPSubnetDeleteParamsWithContext(ctx context.Context) *IPSubnetDeleteParams {
return &IPSubnetDeleteParams{
Context: ctx,
}
}
// NewIPSubnetDeleteParamsWithHTTPClient creates a new IPSubnetDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewIPSubnetDeleteParamsWithHTTPClient(client *http.Client) *IPSubnetDeleteParams {
return &IPSubnetDeleteParams{
HTTPClient: client,
}
}
/*
IPSubnetDeleteParams contains all the parameters to send to the API endpoint
for the ip subnet delete operation.
Typically these are written to a http.Request.
*/
type IPSubnetDeleteParams struct {
/* UUID.
IP subnet UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the ip subnet delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetDeleteParams) WithDefaults() *IPSubnetDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the ip subnet delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IPSubnetDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the ip subnet delete params
func (o *IPSubnetDeleteParams) WithTimeout(timeout time.Duration) *IPSubnetDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the ip subnet delete params
func (o *IPSubnetDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the ip subnet delete params
func (o *IPSubnetDeleteParams) WithContext(ctx context.Context) *IPSubnetDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the ip subnet delete params
func (o *IPSubnetDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the ip subnet delete params
func (o *IPSubnetDeleteParams) WithHTTPClient(client *http.Client) *IPSubnetDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the ip subnet delete params
func (o *IPSubnetDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the ip subnet delete params
func (o *IPSubnetDeleteParams) WithUUID(uuid string) *IPSubnetDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the ip subnet delete params
func (o *IPSubnetDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *IPSubnetDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/network_ethernet_broadcast_domains_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_broadcast_domains_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetBroadcastDomainsCreateParams creates a new NetworkEthernetBroadcastDomainsCreateParams 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 NewNetworkEthernetBroadcastDomainsCreateParams() *NetworkEthernetBroadcastDomainsCreateParams {
return &NetworkEthernetBroadcastDomainsCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetBroadcastDomainsCreateParamsWithTimeout creates a new NetworkEthernetBroadcastDomainsCreateParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetBroadcastDomainsCreateParamsWithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainsCreateParams {
return &NetworkEthernetBroadcastDomainsCreateParams{
timeout: timeout,
}
}
// NewNetworkEthernetBroadcastDomainsCreateParamsWithContext creates a new NetworkEthernetBroadcastDomainsCreateParams object
// with the ability to set a context for a request.
func NewNetworkEthernetBroadcastDomainsCreateParamsWithContext(ctx context.Context) *NetworkEthernetBroadcastDomainsCreateParams {
return &NetworkEthernetBroadcastDomainsCreateParams{
Context: ctx,
}
}
// NewNetworkEthernetBroadcastDomainsCreateParamsWithHTTPClient creates a new NetworkEthernetBroadcastDomainsCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetBroadcastDomainsCreateParamsWithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainsCreateParams {
return &NetworkEthernetBroadcastDomainsCreateParams{
HTTPClient: client,
}
}
/*
NetworkEthernetBroadcastDomainsCreateParams contains all the parameters to send to the API endpoint
for the network ethernet broadcast domains create operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetBroadcastDomainsCreateParams struct {
/* Info.
Broadcast_domain parameters
*/
Info *models.BroadcastDomain
/* 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 network ethernet broadcast domains create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithDefaults() *NetworkEthernetBroadcastDomainsCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet broadcast domains create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := NetworkEthernetBroadcastDomainsCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithTimeout(timeout time.Duration) *NetworkEthernetBroadcastDomainsCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithContext(ctx context.Context) *NetworkEthernetBroadcastDomainsCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithHTTPClient(client *http.Client) *NetworkEthernetBroadcastDomainsCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithInfo(info *models.BroadcastDomain) *NetworkEthernetBroadcastDomainsCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetInfo(info *models.BroadcastDomain) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) WithReturnRecords(returnRecords *bool) *NetworkEthernetBroadcastDomainsCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ethernet broadcast domains create params
func (o *NetworkEthernetBroadcastDomainsCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetBroadcastDomainsCreateParams) 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/networking/port_metrics_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/port_metrics_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewPortMetricsCollectionGetParams creates a new PortMetricsCollectionGetParams 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 NewPortMetricsCollectionGetParams() *PortMetricsCollectionGetParams {
return &PortMetricsCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPortMetricsCollectionGetParamsWithTimeout creates a new PortMetricsCollectionGetParams object
// with the ability to set a timeout on a request.
func NewPortMetricsCollectionGetParamsWithTimeout(timeout time.Duration) *PortMetricsCollectionGetParams {
return &PortMetricsCollectionGetParams{
timeout: timeout,
}
}
// NewPortMetricsCollectionGetParamsWithContext creates a new PortMetricsCollectionGetParams object
// with the ability to set a context for a request.
func NewPortMetricsCollectionGetParamsWithContext(ctx context.Context) *PortMetricsCollectionGetParams {
return &PortMetricsCollectionGetParams{
Context: ctx,
}
}
// NewPortMetricsCollectionGetParamsWithHTTPClient creates a new PortMetricsCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPortMetricsCollectionGetParamsWithHTTPClient(client *http.Client) *PortMetricsCollectionGetParams {
return &PortMetricsCollectionGetParams{
HTTPClient: client,
}
}
/*
PortMetricsCollectionGetParams contains all the parameters to send to the API endpoint
for the port metrics collection get operation.
Typically these are written to a http.Request.
*/
type PortMetricsCollectionGetParams 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
/* 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
/* 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
/* UUID.
Unique identifier of the port.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the port metrics collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortMetricsCollectionGetParams) WithDefaults() *PortMetricsCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the port metrics collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PortMetricsCollectionGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := PortMetricsCollectionGetParams{
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 port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithTimeout(timeout time.Duration) *PortMetricsCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithContext(ctx context.Context) *PortMetricsCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithHTTPClient(client *http.Client) *PortMetricsCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithDuration(duration *string) *PortMetricsCollectionGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithFields(fields []string) *PortMetricsCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithInterval(interval *string) *PortMetricsCollectionGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithMaxRecords adds the maxRecords to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithMaxRecords(maxRecords *int64) *PortMetricsCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithOrderBy(orderBy []string) *PortMetricsCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithReturnRecords(returnRecords *bool) *PortMetricsCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *PortMetricsCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithStatus(status *string) *PortMetricsCollectionGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetStatus(status *string) {
o.Status = status
}
// WithThroughputRead adds the throughputRead to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithThroughputRead(throughputRead *int64) *PortMetricsCollectionGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithThroughputTotal(throughputTotal *int64) *PortMetricsCollectionGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *PortMetricsCollectionGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithTimestamp(timestamp *string) *PortMetricsCollectionGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WithUUID adds the uuid to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) WithUUID(uuid string) *PortMetricsCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the port metrics collection get params
func (o *PortMetricsCollectionGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *PortMetricsCollectionGetParams) 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.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
}
}
}
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
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamPortMetricsCollectionGet binds the parameter fields
func (o *PortMetricsCollectionGetParams) 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
}
// bindParamPortMetricsCollectionGet binds the parameter order_by
func (o *PortMetricsCollectionGetParams) 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/networking/ip_subnet_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// IPSubnetDeleteReader is a Reader for the IPSubnetDelete structure.
type IPSubnetDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IPSubnetDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIPSubnetDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewIPSubnetDeleteOK creates a IPSubnetDeleteOK with default headers values
func NewIPSubnetDeleteOK() *IPSubnetDeleteOK {
return &IPSubnetDeleteOK{}
}
/*
IPSubnetDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IPSubnetDeleteOK struct {
}
// IsSuccess returns true when this ip subnet delete o k response has a 2xx status code
func (o *IPSubnetDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ip subnet delete o k response has a 3xx status code
func (o *IPSubnetDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ip subnet delete o k response has a 4xx status code
func (o *IPSubnetDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ip subnet delete o k response has a 5xx status code
func (o *IPSubnetDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this ip subnet delete o k response a status code equal to that given
func (o *IPSubnetDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IPSubnetDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ip/subnets/{uuid}][%d] ipSubnetDeleteOK ", 200)
}
func (o *IPSubnetDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ip/subnets/{uuid}][%d] ipSubnetDeleteOK ", 200)
}
func (o *IPSubnetDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
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/networking/ip_subnet_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_subnet_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// IPSubnetGetReader is a Reader for the IPSubnetGet structure.
type IPSubnetGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IPSubnetGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIPSubnetGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIPSubnetGetDefault(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
}
}
// NewIPSubnetGetOK creates a IPSubnetGetOK with default headers values
func NewIPSubnetGetOK() *IPSubnetGetOK {
return &IPSubnetGetOK{}
}
/*
IPSubnetGetOK describes a response with status code 200, with default header values.
OK
*/
type IPSubnetGetOK struct {
Payload *models.IPSubnet
}
// IsSuccess returns true when this ip subnet get o k response has a 2xx status code
func (o *IPSubnetGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ip subnet get o k response has a 3xx status code
func (o *IPSubnetGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ip subnet get o k response has a 4xx status code
func (o *IPSubnetGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ip subnet get o k response has a 5xx status code
func (o *IPSubnetGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this ip subnet get o k response a status code equal to that given
func (o *IPSubnetGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IPSubnetGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/subnets/{uuid}][%d] ipSubnetGetOK %+v", 200, o.Payload)
}
func (o *IPSubnetGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/subnets/{uuid}][%d] ipSubnetGetOK %+v", 200, o.Payload)
}
func (o *IPSubnetGetOK) GetPayload() *models.IPSubnet {
return o.Payload
}
func (o *IPSubnetGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IPSubnet)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIPSubnetGetDefault creates a IPSubnetGetDefault with default headers values
func NewIPSubnetGetDefault(code int) *IPSubnetGetDefault {
return &IPSubnetGetDefault{
_statusCode: code,
}
}
/*
IPSubnetGetDefault describes a response with status code -1, with default header values.
Error
*/
type IPSubnetGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ip subnet get default response
func (o *IPSubnetGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ip subnet get default response has a 2xx status code
func (o *IPSubnetGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ip subnet get default response has a 3xx status code
func (o *IPSubnetGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ip subnet get default response has a 4xx status code
func (o *IPSubnetGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ip subnet get default response has a 5xx status code
func (o *IPSubnetGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ip subnet get default response a status code equal to that given
func (o *IPSubnetGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IPSubnetGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/subnets/{uuid}][%d] ip_subnet_get default %+v", o._statusCode, o.Payload)
}
func (o *IPSubnetGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/subnets/{uuid}][%d] ip_subnet_get default %+v", o._statusCode, o.Payload)
}
func (o *IPSubnetGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IPSubnetGetDefault) 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/networking/network_ip_interface_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_interface_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPInterfaceDeleteParams creates a new NetworkIPInterfaceDeleteParams 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 NewNetworkIPInterfaceDeleteParams() *NetworkIPInterfaceDeleteParams {
return &NetworkIPInterfaceDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPInterfaceDeleteParamsWithTimeout creates a new NetworkIPInterfaceDeleteParams object
// with the ability to set a timeout on a request.
func NewNetworkIPInterfaceDeleteParamsWithTimeout(timeout time.Duration) *NetworkIPInterfaceDeleteParams {
return &NetworkIPInterfaceDeleteParams{
timeout: timeout,
}
}
// NewNetworkIPInterfaceDeleteParamsWithContext creates a new NetworkIPInterfaceDeleteParams object
// with the ability to set a context for a request.
func NewNetworkIPInterfaceDeleteParamsWithContext(ctx context.Context) *NetworkIPInterfaceDeleteParams {
return &NetworkIPInterfaceDeleteParams{
Context: ctx,
}
}
// NewNetworkIPInterfaceDeleteParamsWithHTTPClient creates a new NetworkIPInterfaceDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPInterfaceDeleteParamsWithHTTPClient(client *http.Client) *NetworkIPInterfaceDeleteParams {
return &NetworkIPInterfaceDeleteParams{
HTTPClient: client,
}
}
/*
NetworkIPInterfaceDeleteParams contains all the parameters to send to the API endpoint
for the network ip interface delete operation.
Typically these are written to a http.Request.
*/
type NetworkIPInterfaceDeleteParams struct {
/* UUID.
IP interface UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip interface delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceDeleteParams) WithDefaults() *NetworkIPInterfaceDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip interface delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) WithTimeout(timeout time.Duration) *NetworkIPInterfaceDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) WithContext(ctx context.Context) *NetworkIPInterfaceDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) WithHTTPClient(client *http.Client) *NetworkIPInterfaceDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) WithUUID(uuid string) *NetworkIPInterfaceDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip interface delete params
func (o *NetworkIPInterfaceDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPInterfaceDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/switch_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/switch_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewSwitchModifyParams creates a new SwitchModifyParams 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 NewSwitchModifyParams() *SwitchModifyParams {
return &SwitchModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewSwitchModifyParamsWithTimeout creates a new SwitchModifyParams object
// with the ability to set a timeout on a request.
func NewSwitchModifyParamsWithTimeout(timeout time.Duration) *SwitchModifyParams {
return &SwitchModifyParams{
timeout: timeout,
}
}
// NewSwitchModifyParamsWithContext creates a new SwitchModifyParams object
// with the ability to set a context for a request.
func NewSwitchModifyParamsWithContext(ctx context.Context) *SwitchModifyParams {
return &SwitchModifyParams{
Context: ctx,
}
}
// NewSwitchModifyParamsWithHTTPClient creates a new SwitchModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewSwitchModifyParamsWithHTTPClient(client *http.Client) *SwitchModifyParams {
return &SwitchModifyParams{
HTTPClient: client,
}
}
/*
SwitchModifyParams contains all the parameters to send to the API endpoint
for the switch modify operation.
Typically these are written to a http.Request.
*/
type SwitchModifyParams struct {
/* Info.
Info specification
*/
Info *models.Switch
/* Name.
Switch Name
*/
Name string
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the switch modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchModifyParams) WithDefaults() *SwitchModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the switch modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SwitchModifyParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := SwitchModifyParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the switch modify params
func (o *SwitchModifyParams) WithTimeout(timeout time.Duration) *SwitchModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the switch modify params
func (o *SwitchModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the switch modify params
func (o *SwitchModifyParams) WithContext(ctx context.Context) *SwitchModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the switch modify params
func (o *SwitchModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the switch modify params
func (o *SwitchModifyParams) WithHTTPClient(client *http.Client) *SwitchModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the switch modify params
func (o *SwitchModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the switch modify params
func (o *SwitchModifyParams) WithInfo(info *models.Switch) *SwitchModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the switch modify params
func (o *SwitchModifyParams) SetInfo(info *models.Switch) {
o.Info = info
}
// WithName adds the name to the switch modify params
func (o *SwitchModifyParams) WithName(name string) *SwitchModifyParams {
o.SetName(name)
return o
}
// SetName adds the name to the switch modify params
func (o *SwitchModifyParams) SetName(name string) {
o.Name = name
}
// WithReturnTimeout adds the returnTimeout to the switch modify params
func (o *SwitchModifyParams) WithReturnTimeout(returnTimeout *int64) *SwitchModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the switch modify params
func (o *SwitchModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *SwitchModifyParams) 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 name
if err := r.SetPathParam("name", o.Name); err != nil {
return err
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcInterfaceCreateParams creates a new FcInterfaceCreateParams 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 NewFcInterfaceCreateParams() *FcInterfaceCreateParams {
return &FcInterfaceCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcInterfaceCreateParamsWithTimeout creates a new FcInterfaceCreateParams object
// with the ability to set a timeout on a request.
func NewFcInterfaceCreateParamsWithTimeout(timeout time.Duration) *FcInterfaceCreateParams {
return &FcInterfaceCreateParams{
timeout: timeout,
}
}
// NewFcInterfaceCreateParamsWithContext creates a new FcInterfaceCreateParams object
// with the ability to set a context for a request.
func NewFcInterfaceCreateParamsWithContext(ctx context.Context) *FcInterfaceCreateParams {
return &FcInterfaceCreateParams{
Context: ctx,
}
}
// NewFcInterfaceCreateParamsWithHTTPClient creates a new FcInterfaceCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcInterfaceCreateParamsWithHTTPClient(client *http.Client) *FcInterfaceCreateParams {
return &FcInterfaceCreateParams{
HTTPClient: client,
}
}
/*
FcInterfaceCreateParams contains all the parameters to send to the API endpoint
for the fc interface create operation.
Typically these are written to a http.Request.
*/
type FcInterfaceCreateParams struct {
/* Info.
The property values for the new FC interface.
*/
Info *models.FcInterface
/* 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 fc interface create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceCreateParams) WithDefaults() *FcInterfaceCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc interface create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcInterfaceCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := FcInterfaceCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the fc interface create params
func (o *FcInterfaceCreateParams) WithTimeout(timeout time.Duration) *FcInterfaceCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc interface create params
func (o *FcInterfaceCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc interface create params
func (o *FcInterfaceCreateParams) WithContext(ctx context.Context) *FcInterfaceCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc interface create params
func (o *FcInterfaceCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc interface create params
func (o *FcInterfaceCreateParams) WithHTTPClient(client *http.Client) *FcInterfaceCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc interface create params
func (o *FcInterfaceCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the fc interface create params
func (o *FcInterfaceCreateParams) WithInfo(info *models.FcInterface) *FcInterfaceCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the fc interface create params
func (o *FcInterfaceCreateParams) SetInfo(info *models.FcInterface) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the fc interface create params
func (o *FcInterfaceCreateParams) WithReturnRecords(returnRecords *bool) *FcInterfaceCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fc interface create params
func (o *FcInterfaceCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *FcInterfaceCreateParams) 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/networking/network_ip_bgp_peer_group_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_group_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPBgpPeerGroupDeleteParams creates a new NetworkIPBgpPeerGroupDeleteParams 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 NewNetworkIPBgpPeerGroupDeleteParams() *NetworkIPBgpPeerGroupDeleteParams {
return &NetworkIPBgpPeerGroupDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPBgpPeerGroupDeleteParamsWithTimeout creates a new NetworkIPBgpPeerGroupDeleteParams object
// with the ability to set a timeout on a request.
func NewNetworkIPBgpPeerGroupDeleteParamsWithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupDeleteParams {
return &NetworkIPBgpPeerGroupDeleteParams{
timeout: timeout,
}
}
// NewNetworkIPBgpPeerGroupDeleteParamsWithContext creates a new NetworkIPBgpPeerGroupDeleteParams object
// with the ability to set a context for a request.
func NewNetworkIPBgpPeerGroupDeleteParamsWithContext(ctx context.Context) *NetworkIPBgpPeerGroupDeleteParams {
return &NetworkIPBgpPeerGroupDeleteParams{
Context: ctx,
}
}
// NewNetworkIPBgpPeerGroupDeleteParamsWithHTTPClient creates a new NetworkIPBgpPeerGroupDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPBgpPeerGroupDeleteParamsWithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupDeleteParams {
return &NetworkIPBgpPeerGroupDeleteParams{
HTTPClient: client,
}
}
/*
NetworkIPBgpPeerGroupDeleteParams contains all the parameters to send to the API endpoint
for the network ip bgp peer group delete operation.
Typically these are written to a http.Request.
*/
type NetworkIPBgpPeerGroupDeleteParams struct {
/* UUID.
UUID of the peer group
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip bgp peer group delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupDeleteParams) WithDefaults() *NetworkIPBgpPeerGroupDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip bgp peer group delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) WithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) WithContext(ctx context.Context) *NetworkIPBgpPeerGroupDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) WithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithUUID adds the uuid to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) WithUUID(uuid string) *NetworkIPBgpPeerGroupDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip bgp peer group delete params
func (o *NetworkIPBgpPeerGroupDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPBgpPeerGroupDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// 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/networking/ipspaces_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ipspaces_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// IpspacesGetReader is a Reader for the IpspacesGet structure.
type IpspacesGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IpspacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIpspacesGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIpspacesGetDefault(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
}
}
// NewIpspacesGetOK creates a IpspacesGetOK with default headers values
func NewIpspacesGetOK() *IpspacesGetOK {
return &IpspacesGetOK{}
}
/*
IpspacesGetOK describes a response with status code 200, with default header values.
OK
*/
type IpspacesGetOK struct {
Payload *models.IpspaceResponse
}
// IsSuccess returns true when this ipspaces get o k response has a 2xx status code
func (o *IpspacesGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ipspaces get o k response has a 3xx status code
func (o *IpspacesGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ipspaces get o k response has a 4xx status code
func (o *IpspacesGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ipspaces get o k response has a 5xx status code
func (o *IpspacesGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this ipspaces get o k response a status code equal to that given
func (o *IpspacesGetOK) IsCode(code int) bool {
return code == 200
}
func (o *IpspacesGetOK) Error() string {
return fmt.Sprintf("[GET /network/ipspaces][%d] ipspacesGetOK %+v", 200, o.Payload)
}
func (o *IpspacesGetOK) String() string {
return fmt.Sprintf("[GET /network/ipspaces][%d] ipspacesGetOK %+v", 200, o.Payload)
}
func (o *IpspacesGetOK) GetPayload() *models.IpspaceResponse {
return o.Payload
}
func (o *IpspacesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IpspaceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewIpspacesGetDefault creates a IpspacesGetDefault with default headers values
func NewIpspacesGetDefault(code int) *IpspacesGetDefault {
return &IpspacesGetDefault{
_statusCode: code,
}
}
/*
IpspacesGetDefault describes a response with status code -1, with default header values.
Error
*/
type IpspacesGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ipspaces get default response
func (o *IpspacesGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ipspaces get default response has a 2xx status code
func (o *IpspacesGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ipspaces get default response has a 3xx status code
func (o *IpspacesGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ipspaces get default response has a 4xx status code
func (o *IpspacesGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ipspaces get default response has a 5xx status code
func (o *IpspacesGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ipspaces get default response a status code equal to that given
func (o *IpspacesGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IpspacesGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ipspaces][%d] ipspaces_get default %+v", o._statusCode, o.Payload)
}
func (o *IpspacesGetDefault) String() string {
return fmt.Sprintf("[GET /network/ipspaces][%d] ipspaces_get default %+v", o._statusCode, o.Payload)
}
func (o *IpspacesGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IpspacesGetDefault) 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/networking/network_ip_route_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_route_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPRouteDeleteReader is a Reader for the NetworkIPRouteDelete structure.
type NetworkIPRouteDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPRouteDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPRouteDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPRouteDeleteDefault(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
}
}
// NewNetworkIPRouteDeleteOK creates a NetworkIPRouteDeleteOK with default headers values
func NewNetworkIPRouteDeleteOK() *NetworkIPRouteDeleteOK {
return &NetworkIPRouteDeleteOK{}
}
/*
NetworkIPRouteDeleteOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPRouteDeleteOK struct {
}
// IsSuccess returns true when this network Ip route delete o k response has a 2xx status code
func (o *NetworkIPRouteDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip route delete o k response has a 3xx status code
func (o *NetworkIPRouteDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip route delete o k response has a 4xx status code
func (o *NetworkIPRouteDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip route delete o k response has a 5xx status code
func (o *NetworkIPRouteDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip route delete o k response a status code equal to that given
func (o *NetworkIPRouteDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPRouteDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ip/routes/{uuid}][%d] networkIpRouteDeleteOK ", 200)
}
func (o *NetworkIPRouteDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ip/routes/{uuid}][%d] networkIpRouteDeleteOK ", 200)
}
func (o *NetworkIPRouteDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewNetworkIPRouteDeleteDefault creates a NetworkIPRouteDeleteDefault with default headers values
func NewNetworkIPRouteDeleteDefault(code int) *NetworkIPRouteDeleteDefault {
return &NetworkIPRouteDeleteDefault{
_statusCode: code,
}
}
/*
NetworkIPRouteDeleteDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPRouteDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip route delete default response
func (o *NetworkIPRouteDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip route delete default response has a 2xx status code
func (o *NetworkIPRouteDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip route delete default response has a 3xx status code
func (o *NetworkIPRouteDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip route delete default response has a 4xx status code
func (o *NetworkIPRouteDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip route delete default response has a 5xx status code
func (o *NetworkIPRouteDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip route delete default response a status code equal to that given
func (o *NetworkIPRouteDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPRouteDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/ip/routes/{uuid}][%d] network_ip_route_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRouteDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/ip/routes/{uuid}][%d] network_ip_route_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRouteDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPRouteDeleteDefault) 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/networking/fc_switch_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_switch_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcSwitchCollectionGetParams creates a new FcSwitchCollectionGetParams 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 NewFcSwitchCollectionGetParams() *FcSwitchCollectionGetParams {
return &FcSwitchCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcSwitchCollectionGetParamsWithTimeout creates a new FcSwitchCollectionGetParams object
// with the ability to set a timeout on a request.
func NewFcSwitchCollectionGetParamsWithTimeout(timeout time.Duration) *FcSwitchCollectionGetParams {
return &FcSwitchCollectionGetParams{
timeout: timeout,
}
}
// NewFcSwitchCollectionGetParamsWithContext creates a new FcSwitchCollectionGetParams object
// with the ability to set a context for a request.
func NewFcSwitchCollectionGetParamsWithContext(ctx context.Context) *FcSwitchCollectionGetParams {
return &FcSwitchCollectionGetParams{
Context: ctx,
}
}
// NewFcSwitchCollectionGetParamsWithHTTPClient creates a new FcSwitchCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcSwitchCollectionGetParamsWithHTTPClient(client *http.Client) *FcSwitchCollectionGetParams {
return &FcSwitchCollectionGetParams{
HTTPClient: client,
}
}
/*
FcSwitchCollectionGetParams contains all the parameters to send to the API endpoint
for the fc switch collection get operation.
Typically these are written to a http.Request.
*/
type FcSwitchCollectionGetParams struct {
/* CacheAge.
Filter by cache.age
*/
CacheAge *string
/* CacheIsCurrent.
Filter by cache.is_current
*/
CacheIsCurrent *bool
/* CacheMaximumAge.
The maximum age of data in the Fibre Channel fabric cache before it should be refreshed from the fabric. The default is 15 minutes.
Format: iso8601
Default: "15 minutes"
*/
CacheMaximumAge *string
/* CacheUpdateTime.
Filter by cache.update_time
*/
CacheUpdateTime *string
/* DomainID.
Filter by domain_id
*/
DomainID *int64
/* FabricName.
The WWN of the primary switch of the Fibre Channel fabric.
*/
FabricName string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Name.
Filter by name
*/
Name *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* PortsAttachedDevicePortID.
Filter by ports.attached_device.port_id
*/
PortsAttachedDevicePortID *string
/* PortsAttachedDeviceWwpn.
Filter by ports.attached_device.wwpn
*/
PortsAttachedDeviceWwpn *string
/* PortsSlot.
Filter by ports.slot
*/
PortsSlot *string
/* PortsState.
Filter by ports.state
*/
PortsState *string
/* PortsType.
Filter by ports.type
*/
PortsType *string
/* PortsWwpn.
Filter by ports.wwpn
*/
PortsWwpn *string
/* Release.
Filter by release
*/
Release *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
/* Vendor.
Filter by vendor
*/
Vendor *string
/* Wwn.
Filter by wwn
*/
Wwn *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc switch collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcSwitchCollectionGetParams) WithDefaults() *FcSwitchCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc switch collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcSwitchCollectionGetParams) SetDefaults() {
var (
cacheMaximumAgeDefault = string("15 minutes")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FcSwitchCollectionGetParams{
CacheMaximumAge: &cacheMaximumAgeDefault,
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 switch collection get params
func (o *FcSwitchCollectionGetParams) WithTimeout(timeout time.Duration) *FcSwitchCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithContext(ctx context.Context) *FcSwitchCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithHTTPClient(client *http.Client) *FcSwitchCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCacheAge adds the cacheAge to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithCacheAge(cacheAge *string) *FcSwitchCollectionGetParams {
o.SetCacheAge(cacheAge)
return o
}
// SetCacheAge adds the cacheAge to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetCacheAge(cacheAge *string) {
o.CacheAge = cacheAge
}
// WithCacheIsCurrent adds the cacheIsCurrent to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithCacheIsCurrent(cacheIsCurrent *bool) *FcSwitchCollectionGetParams {
o.SetCacheIsCurrent(cacheIsCurrent)
return o
}
// SetCacheIsCurrent adds the cacheIsCurrent to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetCacheIsCurrent(cacheIsCurrent *bool) {
o.CacheIsCurrent = cacheIsCurrent
}
// WithCacheMaximumAge adds the cacheMaximumAge to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithCacheMaximumAge(cacheMaximumAge *string) *FcSwitchCollectionGetParams {
o.SetCacheMaximumAge(cacheMaximumAge)
return o
}
// SetCacheMaximumAge adds the cacheMaximumAge to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetCacheMaximumAge(cacheMaximumAge *string) {
o.CacheMaximumAge = cacheMaximumAge
}
// WithCacheUpdateTime adds the cacheUpdateTime to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithCacheUpdateTime(cacheUpdateTime *string) *FcSwitchCollectionGetParams {
o.SetCacheUpdateTime(cacheUpdateTime)
return o
}
// SetCacheUpdateTime adds the cacheUpdateTime to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetCacheUpdateTime(cacheUpdateTime *string) {
o.CacheUpdateTime = cacheUpdateTime
}
// WithDomainID adds the domainID to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithDomainID(domainID *int64) *FcSwitchCollectionGetParams {
o.SetDomainID(domainID)
return o
}
// SetDomainID adds the domainId to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetDomainID(domainID *int64) {
o.DomainID = domainID
}
// WithFabricName adds the fabricName to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithFabricName(fabricName string) *FcSwitchCollectionGetParams {
o.SetFabricName(fabricName)
return o
}
// SetFabricName adds the fabricName to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetFabricName(fabricName string) {
o.FabricName = fabricName
}
// WithFields adds the fields to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithFields(fields []string) *FcSwitchCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithMaxRecords(maxRecords *int64) *FcSwitchCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithName(name *string) *FcSwitchCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithOrderBy(orderBy []string) *FcSwitchCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPortsAttachedDevicePortID adds the portsAttachedDevicePortID to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsAttachedDevicePortID(portsAttachedDevicePortID *string) *FcSwitchCollectionGetParams {
o.SetPortsAttachedDevicePortID(portsAttachedDevicePortID)
return o
}
// SetPortsAttachedDevicePortID adds the portsAttachedDevicePortId to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsAttachedDevicePortID(portsAttachedDevicePortID *string) {
o.PortsAttachedDevicePortID = portsAttachedDevicePortID
}
// WithPortsAttachedDeviceWwpn adds the portsAttachedDeviceWwpn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsAttachedDeviceWwpn(portsAttachedDeviceWwpn *string) *FcSwitchCollectionGetParams {
o.SetPortsAttachedDeviceWwpn(portsAttachedDeviceWwpn)
return o
}
// SetPortsAttachedDeviceWwpn adds the portsAttachedDeviceWwpn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsAttachedDeviceWwpn(portsAttachedDeviceWwpn *string) {
o.PortsAttachedDeviceWwpn = portsAttachedDeviceWwpn
}
// WithPortsSlot adds the portsSlot to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsSlot(portsSlot *string) *FcSwitchCollectionGetParams {
o.SetPortsSlot(portsSlot)
return o
}
// SetPortsSlot adds the portsSlot to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsSlot(portsSlot *string) {
o.PortsSlot = portsSlot
}
// WithPortsState adds the portsState to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsState(portsState *string) *FcSwitchCollectionGetParams {
o.SetPortsState(portsState)
return o
}
// SetPortsState adds the portsState to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsState(portsState *string) {
o.PortsState = portsState
}
// WithPortsType adds the portsType to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsType(portsType *string) *FcSwitchCollectionGetParams {
o.SetPortsType(portsType)
return o
}
// SetPortsType adds the portsType to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsType(portsType *string) {
o.PortsType = portsType
}
// WithPortsWwpn adds the portsWwpn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithPortsWwpn(portsWwpn *string) *FcSwitchCollectionGetParams {
o.SetPortsWwpn(portsWwpn)
return o
}
// SetPortsWwpn adds the portsWwpn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetPortsWwpn(portsWwpn *string) {
o.PortsWwpn = portsWwpn
}
// WithRelease adds the release to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithRelease(release *string) *FcSwitchCollectionGetParams {
o.SetRelease(release)
return o
}
// SetRelease adds the release to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetRelease(release *string) {
o.Release = release
}
// WithReturnRecords adds the returnRecords to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithReturnRecords(returnRecords *bool) *FcSwitchCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *FcSwitchCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithVendor adds the vendor to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithVendor(vendor *string) *FcSwitchCollectionGetParams {
o.SetVendor(vendor)
return o
}
// SetVendor adds the vendor to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetVendor(vendor *string) {
o.Vendor = vendor
}
// WithWwn adds the wwn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) WithWwn(wwn *string) *FcSwitchCollectionGetParams {
o.SetWwn(wwn)
return o
}
// SetWwn adds the wwn to the fc switch collection get params
func (o *FcSwitchCollectionGetParams) SetWwn(wwn *string) {
o.Wwn = wwn
}
// WriteToRequest writes these params to a swagger request
func (o *FcSwitchCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CacheAge != nil {
// query param cache.age
var qrCacheAge string
if o.CacheAge != nil {
qrCacheAge = *o.CacheAge
}
qCacheAge := qrCacheAge
if qCacheAge != "" {
if err := r.SetQueryParam("cache.age", qCacheAge); err != nil {
return err
}
}
}
if o.CacheIsCurrent != nil {
// query param cache.is_current
var qrCacheIsCurrent bool
if o.CacheIsCurrent != nil {
qrCacheIsCurrent = *o.CacheIsCurrent
}
qCacheIsCurrent := swag.FormatBool(qrCacheIsCurrent)
if qCacheIsCurrent != "" {
if err := r.SetQueryParam("cache.is_current", qCacheIsCurrent); err != nil {
return err
}
}
}
if o.CacheMaximumAge != nil {
// query param cache.maximum_age
var qrCacheMaximumAge string
if o.CacheMaximumAge != nil {
qrCacheMaximumAge = *o.CacheMaximumAge
}
qCacheMaximumAge := qrCacheMaximumAge
if qCacheMaximumAge != "" {
if err := r.SetQueryParam("cache.maximum_age", qCacheMaximumAge); err != nil {
return err
}
}
}
if o.CacheUpdateTime != nil {
// query param cache.update_time
var qrCacheUpdateTime string
if o.CacheUpdateTime != nil {
qrCacheUpdateTime = *o.CacheUpdateTime
}
qCacheUpdateTime := qrCacheUpdateTime
if qCacheUpdateTime != "" {
if err := r.SetQueryParam("cache.update_time", qCacheUpdateTime); err != nil {
return err
}
}
}
if o.DomainID != nil {
// query param domain_id
var qrDomainID int64
if o.DomainID != nil {
qrDomainID = *o.DomainID
}
qDomainID := swag.FormatInt64(qrDomainID)
if qDomainID != "" {
if err := r.SetQueryParam("domain_id", qDomainID); err != nil {
return err
}
}
}
// path param fabric.name
if err := r.SetPathParam("fabric.name", o.FabricName); err != nil {
return err
}
if o.Fields != nil {
// binding items for fields
joinedFields := o.bindParamFields(reg)
// query array param fields
if err := r.SetQueryParam("fields", joinedFields...); err != nil {
return err
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.PortsAttachedDevicePortID != nil {
// query param ports.attached_device.port_id
var qrPortsAttachedDevicePortID string
if o.PortsAttachedDevicePortID != nil {
qrPortsAttachedDevicePortID = *o.PortsAttachedDevicePortID
}
qPortsAttachedDevicePortID := qrPortsAttachedDevicePortID
if qPortsAttachedDevicePortID != "" {
if err := r.SetQueryParam("ports.attached_device.port_id", qPortsAttachedDevicePortID); err != nil {
return err
}
}
}
if o.PortsAttachedDeviceWwpn != nil {
// query param ports.attached_device.wwpn
var qrPortsAttachedDeviceWwpn string
if o.PortsAttachedDeviceWwpn != nil {
qrPortsAttachedDeviceWwpn = *o.PortsAttachedDeviceWwpn
}
qPortsAttachedDeviceWwpn := qrPortsAttachedDeviceWwpn
if qPortsAttachedDeviceWwpn != "" {
if err := r.SetQueryParam("ports.attached_device.wwpn", qPortsAttachedDeviceWwpn); err != nil {
return err
}
}
}
if o.PortsSlot != nil {
// query param ports.slot
var qrPortsSlot string
if o.PortsSlot != nil {
qrPortsSlot = *o.PortsSlot
}
qPortsSlot := qrPortsSlot
if qPortsSlot != "" {
if err := r.SetQueryParam("ports.slot", qPortsSlot); err != nil {
return err
}
}
}
if o.PortsState != nil {
// query param ports.state
var qrPortsState string
if o.PortsState != nil {
qrPortsState = *o.PortsState
}
qPortsState := qrPortsState
if qPortsState != "" {
if err := r.SetQueryParam("ports.state", qPortsState); err != nil {
return err
}
}
}
if o.PortsType != nil {
// query param ports.type
var qrPortsType string
if o.PortsType != nil {
qrPortsType = *o.PortsType
}
qPortsType := qrPortsType
if qPortsType != "" {
if err := r.SetQueryParam("ports.type", qPortsType); err != nil {
return err
}
}
}
if o.PortsWwpn != nil {
// query param ports.wwpn
var qrPortsWwpn string
if o.PortsWwpn != nil {
qrPortsWwpn = *o.PortsWwpn
}
qPortsWwpn := qrPortsWwpn
if qPortsWwpn != "" {
if err := r.SetQueryParam("ports.wwpn", qPortsWwpn); err != nil {
return err
}
}
}
if o.Release != nil {
// query param release
var qrRelease string
if o.Release != nil {
qrRelease = *o.Release
}
qRelease := qrRelease
if qRelease != "" {
if err := r.SetQueryParam("release", qRelease); 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.Vendor != nil {
// query param vendor
var qrVendor string
if o.Vendor != nil {
qrVendor = *o.Vendor
}
qVendor := qrVendor
if qVendor != "" {
if err := r.SetQueryParam("vendor", qVendor); err != nil {
return err
}
}
}
if o.Wwn != nil {
// query param wwn
var qrWwn string
if o.Wwn != nil {
qrWwn = *o.Wwn
}
qWwn := qrWwn
if qWwn != "" {
if err := r.SetQueryParam("wwn", qWwn); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFcSwitchCollectionGet binds the parameter fields
func (o *FcSwitchCollectionGetParams) 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
}
// bindParamFcSwitchCollectionGet binds the parameter order_by
func (o *FcSwitchCollectionGetParams) 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/networking/network_ip_bgp_peer_groups_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_groups_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPBgpPeerGroupsGetReader is a Reader for the NetworkIPBgpPeerGroupsGet structure.
type NetworkIPBgpPeerGroupsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPBgpPeerGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPBgpPeerGroupsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPBgpPeerGroupsGetDefault(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
}
}
// NewNetworkIPBgpPeerGroupsGetOK creates a NetworkIPBgpPeerGroupsGetOK with default headers values
func NewNetworkIPBgpPeerGroupsGetOK() *NetworkIPBgpPeerGroupsGetOK {
return &NetworkIPBgpPeerGroupsGetOK{}
}
/*
NetworkIPBgpPeerGroupsGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPBgpPeerGroupsGetOK struct {
Payload *models.BgpPeerGroupResponse
}
// IsSuccess returns true when this network Ip bgp peer groups get o k response has a 2xx status code
func (o *NetworkIPBgpPeerGroupsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip bgp peer groups get o k response has a 3xx status code
func (o *NetworkIPBgpPeerGroupsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip bgp peer groups get o k response has a 4xx status code
func (o *NetworkIPBgpPeerGroupsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip bgp peer groups get o k response has a 5xx status code
func (o *NetworkIPBgpPeerGroupsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip bgp peer groups get o k response a status code equal to that given
func (o *NetworkIPBgpPeerGroupsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPBgpPeerGroupsGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups][%d] networkIpBgpPeerGroupsGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPBgpPeerGroupsGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups][%d] networkIpBgpPeerGroupsGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPBgpPeerGroupsGetOK) GetPayload() *models.BgpPeerGroupResponse {
return o.Payload
}
func (o *NetworkIPBgpPeerGroupsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.BgpPeerGroupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPBgpPeerGroupsGetDefault creates a NetworkIPBgpPeerGroupsGetDefault with default headers values
func NewNetworkIPBgpPeerGroupsGetDefault(code int) *NetworkIPBgpPeerGroupsGetDefault {
return &NetworkIPBgpPeerGroupsGetDefault{
_statusCode: code,
}
}
/*
NetworkIPBgpPeerGroupsGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPBgpPeerGroupsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip bgp peer groups get default response
func (o *NetworkIPBgpPeerGroupsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip bgp peer groups get default response has a 2xx status code
func (o *NetworkIPBgpPeerGroupsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip bgp peer groups get default response has a 3xx status code
func (o *NetworkIPBgpPeerGroupsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip bgp peer groups get default response has a 4xx status code
func (o *NetworkIPBgpPeerGroupsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip bgp peer groups get default response has a 5xx status code
func (o *NetworkIPBgpPeerGroupsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip bgp peer groups get default response a status code equal to that given
func (o *NetworkIPBgpPeerGroupsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPBgpPeerGroupsGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups][%d] network_ip_bgp_peer_groups_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupsGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups][%d] network_ip_bgp_peer_groups_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPBgpPeerGroupsGetDefault) 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/networking/fc_interface_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcInterfaceDeleteReader is a Reader for the FcInterfaceDelete structure.
type FcInterfaceDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcInterfaceDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewFcInterfaceDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcInterfaceDeleteDefault(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
}
}
// NewFcInterfaceDeleteOK creates a FcInterfaceDeleteOK with default headers values
func NewFcInterfaceDeleteOK() *FcInterfaceDeleteOK {
return &FcInterfaceDeleteOK{}
}
/*
FcInterfaceDeleteOK describes a response with status code 200, with default header values.
OK
*/
type FcInterfaceDeleteOK struct {
}
// IsSuccess returns true when this fc interface delete o k response has a 2xx status code
func (o *FcInterfaceDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc interface delete o k response has a 3xx status code
func (o *FcInterfaceDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc interface delete o k response has a 4xx status code
func (o *FcInterfaceDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this fc interface delete o k response has a 5xx status code
func (o *FcInterfaceDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this fc interface delete o k response a status code equal to that given
func (o *FcInterfaceDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *FcInterfaceDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/fc/interfaces/{uuid}][%d] fcInterfaceDeleteOK ", 200)
}
func (o *FcInterfaceDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/fc/interfaces/{uuid}][%d] fcInterfaceDeleteOK ", 200)
}
func (o *FcInterfaceDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewFcInterfaceDeleteDefault creates a FcInterfaceDeleteDefault with default headers values
func NewFcInterfaceDeleteDefault(code int) *FcInterfaceDeleteDefault {
return &FcInterfaceDeleteDefault{
_statusCode: code,
}
}
/*
FcInterfaceDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 53280992 | The FC interface could not be deleted because it is enabled. |
*/
type FcInterfaceDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc interface delete default response
func (o *FcInterfaceDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc interface delete default response has a 2xx status code
func (o *FcInterfaceDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc interface delete default response has a 3xx status code
func (o *FcInterfaceDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc interface delete default response has a 4xx status code
func (o *FcInterfaceDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc interface delete default response has a 5xx status code
func (o *FcInterfaceDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc interface delete default response a status code equal to that given
func (o *FcInterfaceDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcInterfaceDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/fc/interfaces/{uuid}][%d] fc_interface_delete default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/fc/interfaces/{uuid}][%d] fc_interface_delete default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcInterfaceDeleteDefault) 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/networking/network_ip_routes_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_routes_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPRoutesCreateReader is a Reader for the NetworkIPRoutesCreate structure.
type NetworkIPRoutesCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPRoutesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewNetworkIPRoutesCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPRoutesCreateDefault(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
}
}
// NewNetworkIPRoutesCreateCreated creates a NetworkIPRoutesCreateCreated with default headers values
func NewNetworkIPRoutesCreateCreated() *NetworkIPRoutesCreateCreated {
return &NetworkIPRoutesCreateCreated{}
}
/*
NetworkIPRoutesCreateCreated describes a response with status code 201, with default header values.
Created
*/
type NetworkIPRoutesCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.NetworkRouteResponse
}
// IsSuccess returns true when this network Ip routes create created response has a 2xx status code
func (o *NetworkIPRoutesCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip routes create created response has a 3xx status code
func (o *NetworkIPRoutesCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip routes create created response has a 4xx status code
func (o *NetworkIPRoutesCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip routes create created response has a 5xx status code
func (o *NetworkIPRoutesCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip routes create created response a status code equal to that given
func (o *NetworkIPRoutesCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *NetworkIPRoutesCreateCreated) Error() string {
return fmt.Sprintf("[POST /network/ip/routes][%d] networkIpRoutesCreateCreated %+v", 201, o.Payload)
}
func (o *NetworkIPRoutesCreateCreated) String() string {
return fmt.Sprintf("[POST /network/ip/routes][%d] networkIpRoutesCreateCreated %+v", 201, o.Payload)
}
func (o *NetworkIPRoutesCreateCreated) GetPayload() *models.NetworkRouteResponse {
return o.Payload
}
func (o *NetworkIPRoutesCreateCreated) 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.NetworkRouteResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPRoutesCreateDefault creates a NetworkIPRoutesCreateDefault with default headers values
func NewNetworkIPRoutesCreateDefault(code int) *NetworkIPRoutesCreateDefault {
return &NetworkIPRoutesCreateDefault{
_statusCode: code,
}
}
/*
NetworkIPRoutesCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1966345 | Duplicate route exists. |
| 1967080 | The destination.address is missing. |
| 1967081 | The specified SVM must exist in the specified IPspace. |
| 1967082 | The specified ipspace.uuid and ipspace.name refer to different IPspaces. |
| 1967146 | The specified svm.name is not valid. |
| 2 | The specified svm.uuid is not valid. |
*/
type NetworkIPRoutesCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip routes create default response
func (o *NetworkIPRoutesCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip routes create default response has a 2xx status code
func (o *NetworkIPRoutesCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip routes create default response has a 3xx status code
func (o *NetworkIPRoutesCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip routes create default response has a 4xx status code
func (o *NetworkIPRoutesCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip routes create default response has a 5xx status code
func (o *NetworkIPRoutesCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip routes create default response a status code equal to that given
func (o *NetworkIPRoutesCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPRoutesCreateDefault) Error() string {
return fmt.Sprintf("[POST /network/ip/routes][%d] network_ip_routes_create default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRoutesCreateDefault) String() string {
return fmt.Sprintf("[POST /network/ip/routes][%d] network_ip_routes_create default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPRoutesCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPRoutesCreateDefault) 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/networking/network_ip_bgp_peer_group_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_group_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPBgpPeerGroupGetReader is a Reader for the NetworkIPBgpPeerGroupGet structure.
type NetworkIPBgpPeerGroupGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPBgpPeerGroupGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPBgpPeerGroupGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPBgpPeerGroupGetDefault(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
}
}
// NewNetworkIPBgpPeerGroupGetOK creates a NetworkIPBgpPeerGroupGetOK with default headers values
func NewNetworkIPBgpPeerGroupGetOK() *NetworkIPBgpPeerGroupGetOK {
return &NetworkIPBgpPeerGroupGetOK{}
}
/*
NetworkIPBgpPeerGroupGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPBgpPeerGroupGetOK struct {
Payload *models.BgpPeerGroup
}
// IsSuccess returns true when this network Ip bgp peer group get o k response has a 2xx status code
func (o *NetworkIPBgpPeerGroupGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip bgp peer group get o k response has a 3xx status code
func (o *NetworkIPBgpPeerGroupGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip bgp peer group get o k response has a 4xx status code
func (o *NetworkIPBgpPeerGroupGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip bgp peer group get o k response has a 5xx status code
func (o *NetworkIPBgpPeerGroupGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip bgp peer group get o k response a status code equal to that given
func (o *NetworkIPBgpPeerGroupGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPBgpPeerGroupGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups/{uuid}][%d] networkIpBgpPeerGroupGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPBgpPeerGroupGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups/{uuid}][%d] networkIpBgpPeerGroupGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPBgpPeerGroupGetOK) GetPayload() *models.BgpPeerGroup {
return o.Payload
}
func (o *NetworkIPBgpPeerGroupGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.BgpPeerGroup)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPBgpPeerGroupGetDefault creates a NetworkIPBgpPeerGroupGetDefault with default headers values
func NewNetworkIPBgpPeerGroupGetDefault(code int) *NetworkIPBgpPeerGroupGetDefault {
return &NetworkIPBgpPeerGroupGetDefault{
_statusCode: code,
}
}
/*
NetworkIPBgpPeerGroupGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPBgpPeerGroupGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip bgp peer group get default response
func (o *NetworkIPBgpPeerGroupGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip bgp peer group get default response has a 2xx status code
func (o *NetworkIPBgpPeerGroupGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip bgp peer group get default response has a 3xx status code
func (o *NetworkIPBgpPeerGroupGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip bgp peer group get default response has a 4xx status code
func (o *NetworkIPBgpPeerGroupGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip bgp peer group get default response has a 5xx status code
func (o *NetworkIPBgpPeerGroupGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip bgp peer group get default response a status code equal to that given
func (o *NetworkIPBgpPeerGroupGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPBgpPeerGroupGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups/{uuid}][%d] network_ip_bgp_peer_group_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/bgp/peer-groups/{uuid}][%d] network_ip_bgp_peer_group_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPBgpPeerGroupGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPBgpPeerGroupGetDefault) 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/networking/network_ethernet_port_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_port_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetPortModifyParams creates a new NetworkEthernetPortModifyParams 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 NewNetworkEthernetPortModifyParams() *NetworkEthernetPortModifyParams {
return &NetworkEthernetPortModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetPortModifyParamsWithTimeout creates a new NetworkEthernetPortModifyParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetPortModifyParamsWithTimeout(timeout time.Duration) *NetworkEthernetPortModifyParams {
return &NetworkEthernetPortModifyParams{
timeout: timeout,
}
}
// NewNetworkEthernetPortModifyParamsWithContext creates a new NetworkEthernetPortModifyParams object
// with the ability to set a context for a request.
func NewNetworkEthernetPortModifyParamsWithContext(ctx context.Context) *NetworkEthernetPortModifyParams {
return &NetworkEthernetPortModifyParams{
Context: ctx,
}
}
// NewNetworkEthernetPortModifyParamsWithHTTPClient creates a new NetworkEthernetPortModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetPortModifyParamsWithHTTPClient(client *http.Client) *NetworkEthernetPortModifyParams {
return &NetworkEthernetPortModifyParams{
HTTPClient: client,
}
}
/*
NetworkEthernetPortModifyParams contains all the parameters to send to the API endpoint
for the network ethernet port modify operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetPortModifyParams struct {
// Info.
Info *models.Port
/* UUID.
Port UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ethernet port modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortModifyParams) WithDefaults() *NetworkEthernetPortModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet port modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) WithTimeout(timeout time.Duration) *NetworkEthernetPortModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) WithContext(ctx context.Context) *NetworkEthernetPortModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) WithHTTPClient(client *http.Client) *NetworkEthernetPortModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) WithInfo(info *models.Port) *NetworkEthernetPortModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) SetInfo(info *models.Port) {
o.Info = info
}
// WithUUID adds the uuid to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) WithUUID(uuid string) *NetworkEthernetPortModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ethernet port modify params
func (o *NetworkEthernetPortModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetPortModifyParams) 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 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/networking/fc_interface_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_interface_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// FcInterfaceCreateReader is a Reader for the FcInterfaceCreate structure.
type FcInterfaceCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *FcInterfaceCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewFcInterfaceCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewFcInterfaceCreateDefault(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
}
}
// NewFcInterfaceCreateCreated creates a FcInterfaceCreateCreated with default headers values
func NewFcInterfaceCreateCreated() *FcInterfaceCreateCreated {
return &FcInterfaceCreateCreated{}
}
/*
FcInterfaceCreateCreated describes a response with status code 201, with default header values.
Created
*/
type FcInterfaceCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.FcInterfaceResponse
}
// IsSuccess returns true when this fc interface create created response has a 2xx status code
func (o *FcInterfaceCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this fc interface create created response has a 3xx status code
func (o *FcInterfaceCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this fc interface create created response has a 4xx status code
func (o *FcInterfaceCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this fc interface create created response has a 5xx status code
func (o *FcInterfaceCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this fc interface create created response a status code equal to that given
func (o *FcInterfaceCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *FcInterfaceCreateCreated) Error() string {
return fmt.Sprintf("[POST /network/fc/interfaces][%d] fcInterfaceCreateCreated %+v", 201, o.Payload)
}
func (o *FcInterfaceCreateCreated) String() string {
return fmt.Sprintf("[POST /network/fc/interfaces][%d] fcInterfaceCreateCreated %+v", 201, o.Payload)
}
func (o *FcInterfaceCreateCreated) GetPayload() *models.FcInterfaceResponse {
return o.Payload
}
func (o *FcInterfaceCreateCreated) 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.FcInterfaceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewFcInterfaceCreateDefault creates a FcInterfaceCreateDefault with default headers values
func NewFcInterfaceCreateDefault(code int) *FcInterfaceCreateDefault {
return &FcInterfaceCreateDefault{
_statusCode: code,
}
}
/*
FcInterfaceCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1966140 | An interface with the same name already exists. |
| 1966217 | The specified port is not valid on the node provided. |
| 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. |
| 5373966 | A Fibre Channel interface with the _fcp_ protocol cannot be created in an SVM that is configured for NVMe. |
| 5374102 | The specified Fibre Channel interface cannot be created because the Fibre Channel adapter is down. Bring the adapter up and try again. |
| 5374871 | The Fibre Channel port identified by the specified UUID does not refer to the same port as that identified by the specified node name and/or port name. |
| 5374872 | If either `location.port.node.name` or `location.port.name` is supplied, both properties must be supplied. |
| 5374873 | The Fibre Channel port must be specified using either `location.port.uuid` or `location.port.node.name` and `location.port.name`. |
| 72089652 | An NVMe service must be created before creating a Fibre Channel interface using the NVMe over FC data protocol. |
| 72089672 | The specified Fibre Channel port does not support the NVMe over FC data protocol. |
| 72089900 | A Fibre Channel interface with the _fc\_nvme_ protocol cannot be created in an SVM that is configured for a SAN protocol. |
*/
type FcInterfaceCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the fc interface create default response
func (o *FcInterfaceCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this fc interface create default response has a 2xx status code
func (o *FcInterfaceCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this fc interface create default response has a 3xx status code
func (o *FcInterfaceCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this fc interface create default response has a 4xx status code
func (o *FcInterfaceCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this fc interface create default response has a 5xx status code
func (o *FcInterfaceCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this fc interface create default response a status code equal to that given
func (o *FcInterfaceCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *FcInterfaceCreateDefault) Error() string {
return fmt.Sprintf("[POST /network/fc/interfaces][%d] fc_interface_create default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceCreateDefault) String() string {
return fmt.Sprintf("[POST /network/fc/interfaces][%d] fc_interface_create default %+v", o._statusCode, o.Payload)
}
func (o *FcInterfaceCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *FcInterfaceCreateDefault) 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/networking/network_ethernet_ports_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_ports_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkEthernetPortsCreateReader is a Reader for the NetworkEthernetPortsCreate structure.
type NetworkEthernetPortsCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkEthernetPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewNetworkEthernetPortsCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkEthernetPortsCreateDefault(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
}
}
// NewNetworkEthernetPortsCreateCreated creates a NetworkEthernetPortsCreateCreated with default headers values
func NewNetworkEthernetPortsCreateCreated() *NetworkEthernetPortsCreateCreated {
return &NetworkEthernetPortsCreateCreated{}
}
/*
NetworkEthernetPortsCreateCreated describes a response with status code 201, with default header values.
Created
*/
type NetworkEthernetPortsCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.PortResponse
}
// IsSuccess returns true when this network ethernet ports create created response has a 2xx status code
func (o *NetworkEthernetPortsCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network ethernet ports create created response has a 3xx status code
func (o *NetworkEthernetPortsCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this network ethernet ports create created response has a 4xx status code
func (o *NetworkEthernetPortsCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this network ethernet ports create created response has a 5xx status code
func (o *NetworkEthernetPortsCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this network ethernet ports create created response a status code equal to that given
func (o *NetworkEthernetPortsCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *NetworkEthernetPortsCreateCreated) Error() string {
return fmt.Sprintf("[POST /network/ethernet/ports][%d] networkEthernetPortsCreateCreated %+v", 201, o.Payload)
}
func (o *NetworkEthernetPortsCreateCreated) String() string {
return fmt.Sprintf("[POST /network/ethernet/ports][%d] networkEthernetPortsCreateCreated %+v", 201, o.Payload)
}
func (o *NetworkEthernetPortsCreateCreated) GetPayload() *models.PortResponse {
return o.Payload
}
func (o *NetworkEthernetPortsCreateCreated) 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.PortResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkEthernetPortsCreateDefault creates a NetworkEthernetPortsCreateDefault with default headers values
func NewNetworkEthernetPortsCreateDefault(code int) *NetworkEthernetPortsCreateDefault {
return &NetworkEthernetPortsCreateDefault{
_statusCode: code,
}
}
/*
NetworkEthernetPortsCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1376361 | Port is already a member of a LAG. |
| 1966189 | Port is the home port or current port of an interface. |
| 1967083 | The specified type is not valid. |
| 1967084 | The specified node UUID is not valid. |
| 1967085 | The specified node name is not valid. |
| 1967086 | Node name and UUID must match if both are provided. |
| 1967087 | The specified broadcast domain UUID is not valid. |
| 1967088 | The specified broadcast domain name does not exist in the specified IPspace. |
| 1967089 | The specified broadcast domain UUID, name, and IPspace name do not match. |
| 1967090 | The specified VLAN base port UUID is not valid. |
| 1967091 | The specified VLAN base port name and node name are not valid. |
| 1967092 | The specified node does not match the node specified for the VLAN base port. |
| 1967093 | The specified VLAN base port UUID, name, and VLAN base port node name do not match. |
| 1967094 | The specified LAG member port UUID is not valid. |
| 1967095 | The specified LAG member port name and node name combination is not valid. |
| 1967096 | The specified node does not match the specified LAG member port node. |
| 1967097 | The specified LAG member ports UUID, name, and node name do not match. |
| 1967098 | VLAN POST operation has failed because admin status could not be set for the specified port. |
| 1967099 | Partial success of the VLAN POST operation. Verify the state of the created VLAN for more information. |
| 1967100 | LAG POST operation failed because admin status could not be set. |
| 1967101 | Partial success of the LAG POST operation. Verify the state of the created LAG for more information. |
| 1967102 | POST operation might have left the configuration in an inconsistent state. Check the configuration. |
| 1967148 | Failure to remove port from broadcast domain. |
| 1967149 | Failure to add port to broadcast domain. |
| 1967175 | VLANs cannot be created on ports in the Cluster IPspace. |
*/
type NetworkEthernetPortsCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ethernet ports create default response
func (o *NetworkEthernetPortsCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ethernet ports create default response has a 2xx status code
func (o *NetworkEthernetPortsCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ethernet ports create default response has a 3xx status code
func (o *NetworkEthernetPortsCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ethernet ports create default response has a 4xx status code
func (o *NetworkEthernetPortsCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ethernet ports create default response has a 5xx status code
func (o *NetworkEthernetPortsCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ethernet ports create default response a status code equal to that given
func (o *NetworkEthernetPortsCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkEthernetPortsCreateDefault) Error() string {
return fmt.Sprintf("[POST /network/ethernet/ports][%d] network_ethernet_ports_create default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetPortsCreateDefault) String() string {
return fmt.Sprintf("[POST /network/ethernet/ports][%d] network_ethernet_ports_create default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetPortsCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkEthernetPortsCreateDefault) 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/networking/network_ip_interface_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_interface_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkIPInterfaceGetReader is a Reader for the NetworkIPInterfaceGet structure.
type NetworkIPInterfaceGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkIPInterfaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkIPInterfaceGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkIPInterfaceGetDefault(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
}
}
// NewNetworkIPInterfaceGetOK creates a NetworkIPInterfaceGetOK with default headers values
func NewNetworkIPInterfaceGetOK() *NetworkIPInterfaceGetOK {
return &NetworkIPInterfaceGetOK{}
}
/*
NetworkIPInterfaceGetOK describes a response with status code 200, with default header values.
OK
*/
type NetworkIPInterfaceGetOK struct {
Payload *models.IPInterface
}
// IsSuccess returns true when this network Ip interface get o k response has a 2xx status code
func (o *NetworkIPInterfaceGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network Ip interface get o k response has a 3xx status code
func (o *NetworkIPInterfaceGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network Ip interface get o k response has a 4xx status code
func (o *NetworkIPInterfaceGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network Ip interface get o k response has a 5xx status code
func (o *NetworkIPInterfaceGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this network Ip interface get o k response a status code equal to that given
func (o *NetworkIPInterfaceGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkIPInterfaceGetOK) Error() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}][%d] networkIpInterfaceGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPInterfaceGetOK) String() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}][%d] networkIpInterfaceGetOK %+v", 200, o.Payload)
}
func (o *NetworkIPInterfaceGetOK) GetPayload() *models.IPInterface {
return o.Payload
}
func (o *NetworkIPInterfaceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.IPInterface)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNetworkIPInterfaceGetDefault creates a NetworkIPInterfaceGetDefault with default headers values
func NewNetworkIPInterfaceGetDefault(code int) *NetworkIPInterfaceGetDefault {
return &NetworkIPInterfaceGetDefault{
_statusCode: code,
}
}
/*
NetworkIPInterfaceGetDefault describes a response with status code -1, with default header values.
Error
*/
type NetworkIPInterfaceGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ip interface get default response
func (o *NetworkIPInterfaceGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ip interface get default response has a 2xx status code
func (o *NetworkIPInterfaceGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ip interface get default response has a 3xx status code
func (o *NetworkIPInterfaceGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ip interface get default response has a 4xx status code
func (o *NetworkIPInterfaceGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ip interface get default response has a 5xx status code
func (o *NetworkIPInterfaceGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ip interface get default response a status code equal to that given
func (o *NetworkIPInterfaceGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkIPInterfaceGetDefault) Error() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}][%d] network_ip_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPInterfaceGetDefault) String() string {
return fmt.Sprintf("[GET /network/ip/interfaces/{uuid}][%d] network_ip_interface_get default %+v", o._statusCode, o.Payload)
}
func (o *NetworkIPInterfaceGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkIPInterfaceGetDefault) 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/networking/network_ip_bgp_peer_groups_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_bgp_peer_groups_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPBgpPeerGroupsGetParams creates a new NetworkIPBgpPeerGroupsGetParams 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 NewNetworkIPBgpPeerGroupsGetParams() *NetworkIPBgpPeerGroupsGetParams {
return &NetworkIPBgpPeerGroupsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPBgpPeerGroupsGetParamsWithTimeout creates a new NetworkIPBgpPeerGroupsGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPBgpPeerGroupsGetParamsWithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupsGetParams {
return &NetworkIPBgpPeerGroupsGetParams{
timeout: timeout,
}
}
// NewNetworkIPBgpPeerGroupsGetParamsWithContext creates a new NetworkIPBgpPeerGroupsGetParams object
// with the ability to set a context for a request.
func NewNetworkIPBgpPeerGroupsGetParamsWithContext(ctx context.Context) *NetworkIPBgpPeerGroupsGetParams {
return &NetworkIPBgpPeerGroupsGetParams{
Context: ctx,
}
}
// NewNetworkIPBgpPeerGroupsGetParamsWithHTTPClient creates a new NetworkIPBgpPeerGroupsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPBgpPeerGroupsGetParamsWithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupsGetParams {
return &NetworkIPBgpPeerGroupsGetParams{
HTTPClient: client,
}
}
/*
NetworkIPBgpPeerGroupsGetParams contains all the parameters to send to the API endpoint
for the network ip bgp peer groups get operation.
Typically these are written to a http.Request.
*/
type NetworkIPBgpPeerGroupsGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* IpspaceName.
Filter by ipspace.name
*/
IpspaceName *string
/* IpspaceUUID.
Filter by ipspace.uuid
*/
IpspaceUUID *string
/* LocalInterfaceIPAddress.
Filter by local.interface.ip.address
*/
LocalInterfaceIPAddress *string
/* LocalInterfaceName.
Filter by local.interface.name
*/
LocalInterfaceName *string
/* LocalInterfaceUUID.
Filter by local.interface.uuid
*/
LocalInterfaceUUID *string
/* LocalPortName.
Filter by local.port.name
*/
LocalPortName *string
/* LocalPortNodeName.
Filter by local.port.node.name
*/
LocalPortNodeName *string
/* LocalPortUUID.
Filter by local.port.uuid
*/
LocalPortUUID *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
/* PeerAddress.
Filter by peer.address
*/
PeerAddress *string
/* PeerAsn.
Filter by peer.asn
*/
PeerAsn *int64
/* PeerIsNextHop.
Filter by peer.is_next_hop
*/
PeerIsNextHop *bool
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* State.
Filter by state
*/
State *string
/* UUID.
Filter by uuid
*/
UUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip bgp peer groups get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupsGetParams) WithDefaults() *NetworkIPBgpPeerGroupsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip bgp peer groups get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPBgpPeerGroupsGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := NetworkIPBgpPeerGroupsGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithTimeout(timeout time.Duration) *NetworkIPBgpPeerGroupsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithContext(ctx context.Context) *NetworkIPBgpPeerGroupsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithHTTPClient(client *http.Client) *NetworkIPBgpPeerGroupsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithFields(fields []string) *NetworkIPBgpPeerGroupsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIpspaceName adds the ipspaceName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithIpspaceName(ipspaceName *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetIpspaceName(ipspaceName)
return o
}
// SetIpspaceName adds the ipspaceName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetIpspaceName(ipspaceName *string) {
o.IpspaceName = ipspaceName
}
// WithIpspaceUUID adds the ipspaceUUID to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithIpspaceUUID(ipspaceUUID *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetIpspaceUUID(ipspaceUUID)
return o
}
// SetIpspaceUUID adds the ipspaceUuid to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetIpspaceUUID(ipspaceUUID *string) {
o.IpspaceUUID = ipspaceUUID
}
// WithLocalInterfaceIPAddress adds the localInterfaceIPAddress to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalInterfaceIPAddress(localInterfaceIPAddress *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalInterfaceIPAddress(localInterfaceIPAddress)
return o
}
// SetLocalInterfaceIPAddress adds the localInterfaceIpAddress to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalInterfaceIPAddress(localInterfaceIPAddress *string) {
o.LocalInterfaceIPAddress = localInterfaceIPAddress
}
// WithLocalInterfaceName adds the localInterfaceName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalInterfaceName(localInterfaceName *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalInterfaceName(localInterfaceName)
return o
}
// SetLocalInterfaceName adds the localInterfaceName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalInterfaceName(localInterfaceName *string) {
o.LocalInterfaceName = localInterfaceName
}
// WithLocalInterfaceUUID adds the localInterfaceUUID to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalInterfaceUUID(localInterfaceUUID *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalInterfaceUUID(localInterfaceUUID)
return o
}
// SetLocalInterfaceUUID adds the localInterfaceUuid to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalInterfaceUUID(localInterfaceUUID *string) {
o.LocalInterfaceUUID = localInterfaceUUID
}
// WithLocalPortName adds the localPortName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalPortName(localPortName *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalPortName(localPortName)
return o
}
// SetLocalPortName adds the localPortName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalPortName(localPortName *string) {
o.LocalPortName = localPortName
}
// WithLocalPortNodeName adds the localPortNodeName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalPortNodeName(localPortNodeName *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalPortNodeName(localPortNodeName)
return o
}
// SetLocalPortNodeName adds the localPortNodeName to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalPortNodeName(localPortNodeName *string) {
o.LocalPortNodeName = localPortNodeName
}
// WithLocalPortUUID adds the localPortUUID to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithLocalPortUUID(localPortUUID *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetLocalPortUUID(localPortUUID)
return o
}
// SetLocalPortUUID adds the localPortUuid to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetLocalPortUUID(localPortUUID *string) {
o.LocalPortUUID = localPortUUID
}
// WithMaxRecords adds the maxRecords to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithMaxRecords(maxRecords *int64) *NetworkIPBgpPeerGroupsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithName(name *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithOrderBy(orderBy []string) *NetworkIPBgpPeerGroupsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPeerAddress adds the peerAddress to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithPeerAddress(peerAddress *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetPeerAddress(peerAddress)
return o
}
// SetPeerAddress adds the peerAddress to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetPeerAddress(peerAddress *string) {
o.PeerAddress = peerAddress
}
// WithPeerAsn adds the peerAsn to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithPeerAsn(peerAsn *int64) *NetworkIPBgpPeerGroupsGetParams {
o.SetPeerAsn(peerAsn)
return o
}
// SetPeerAsn adds the peerAsn to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetPeerAsn(peerAsn *int64) {
o.PeerAsn = peerAsn
}
// WithPeerIsNextHop adds the peerIsNextHop to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithPeerIsNextHop(peerIsNextHop *bool) *NetworkIPBgpPeerGroupsGetParams {
o.SetPeerIsNextHop(peerIsNextHop)
return o
}
// SetPeerIsNextHop adds the peerIsNextHop to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetPeerIsNextHop(peerIsNextHop *bool) {
o.PeerIsNextHop = peerIsNextHop
}
// WithReturnRecords adds the returnRecords to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithReturnRecords(returnRecords *bool) *NetworkIPBgpPeerGroupsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithReturnTimeout(returnTimeout *int64) *NetworkIPBgpPeerGroupsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithState adds the state to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithState(state *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetState(state)
return o
}
// SetState adds the state to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetState(state *string) {
o.State = state
}
// WithUUID adds the uuid to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) WithUUID(uuid *string) *NetworkIPBgpPeerGroupsGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip bgp peer groups get params
func (o *NetworkIPBgpPeerGroupsGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPBgpPeerGroupsGetParams) 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.IpspaceName != nil {
// query param ipspace.name
var qrIpspaceName string
if o.IpspaceName != nil {
qrIpspaceName = *o.IpspaceName
}
qIpspaceName := qrIpspaceName
if qIpspaceName != "" {
if err := r.SetQueryParam("ipspace.name", qIpspaceName); err != nil {
return err
}
}
}
if o.IpspaceUUID != nil {
// query param ipspace.uuid
var qrIpspaceUUID string
if o.IpspaceUUID != nil {
qrIpspaceUUID = *o.IpspaceUUID
}
qIpspaceUUID := qrIpspaceUUID
if qIpspaceUUID != "" {
if err := r.SetQueryParam("ipspace.uuid", qIpspaceUUID); err != nil {
return err
}
}
}
if o.LocalInterfaceIPAddress != nil {
// query param local.interface.ip.address
var qrLocalInterfaceIPAddress string
if o.LocalInterfaceIPAddress != nil {
qrLocalInterfaceIPAddress = *o.LocalInterfaceIPAddress
}
qLocalInterfaceIPAddress := qrLocalInterfaceIPAddress
if qLocalInterfaceIPAddress != "" {
if err := r.SetQueryParam("local.interface.ip.address", qLocalInterfaceIPAddress); err != nil {
return err
}
}
}
if o.LocalInterfaceName != nil {
// query param local.interface.name
var qrLocalInterfaceName string
if o.LocalInterfaceName != nil {
qrLocalInterfaceName = *o.LocalInterfaceName
}
qLocalInterfaceName := qrLocalInterfaceName
if qLocalInterfaceName != "" {
if err := r.SetQueryParam("local.interface.name", qLocalInterfaceName); err != nil {
return err
}
}
}
if o.LocalInterfaceUUID != nil {
// query param local.interface.uuid
var qrLocalInterfaceUUID string
if o.LocalInterfaceUUID != nil {
qrLocalInterfaceUUID = *o.LocalInterfaceUUID
}
qLocalInterfaceUUID := qrLocalInterfaceUUID
if qLocalInterfaceUUID != "" {
if err := r.SetQueryParam("local.interface.uuid", qLocalInterfaceUUID); err != nil {
return err
}
}
}
if o.LocalPortName != nil {
// query param local.port.name
var qrLocalPortName string
if o.LocalPortName != nil {
qrLocalPortName = *o.LocalPortName
}
qLocalPortName := qrLocalPortName
if qLocalPortName != "" {
if err := r.SetQueryParam("local.port.name", qLocalPortName); err != nil {
return err
}
}
}
if o.LocalPortNodeName != nil {
// query param local.port.node.name
var qrLocalPortNodeName string
if o.LocalPortNodeName != nil {
qrLocalPortNodeName = *o.LocalPortNodeName
}
qLocalPortNodeName := qrLocalPortNodeName
if qLocalPortNodeName != "" {
if err := r.SetQueryParam("local.port.node.name", qLocalPortNodeName); err != nil {
return err
}
}
}
if o.LocalPortUUID != nil {
// query param local.port.uuid
var qrLocalPortUUID string
if o.LocalPortUUID != nil {
qrLocalPortUUID = *o.LocalPortUUID
}
qLocalPortUUID := qrLocalPortUUID
if qLocalPortUUID != "" {
if err := r.SetQueryParam("local.port.uuid", qLocalPortUUID); 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.PeerAddress != nil {
// query param peer.address
var qrPeerAddress string
if o.PeerAddress != nil {
qrPeerAddress = *o.PeerAddress
}
qPeerAddress := qrPeerAddress
if qPeerAddress != "" {
if err := r.SetQueryParam("peer.address", qPeerAddress); err != nil {
return err
}
}
}
if o.PeerAsn != nil {
// query param peer.asn
var qrPeerAsn int64
if o.PeerAsn != nil {
qrPeerAsn = *o.PeerAsn
}
qPeerAsn := swag.FormatInt64(qrPeerAsn)
if qPeerAsn != "" {
if err := r.SetQueryParam("peer.asn", qPeerAsn); err != nil {
return err
}
}
}
if o.PeerIsNextHop != nil {
// query param peer.is_next_hop
var qrPeerIsNextHop bool
if o.PeerIsNextHop != nil {
qrPeerIsNextHop = *o.PeerIsNextHop
}
qPeerIsNextHop := swag.FormatBool(qrPeerIsNextHop)
if qPeerIsNextHop != "" {
if err := r.SetQueryParam("peer.is_next_hop", qPeerIsNextHop); err != nil {
return err
}
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.State != nil {
// query param state
var qrState string
if o.State != nil {
qrState = *o.State
}
qState := qrState
if qState != "" {
if err := r.SetQueryParam("state", qState); err != nil {
return err
}
}
}
if o.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
}
// bindParamNetworkIPBgpPeerGroupsGet binds the parameter fields
func (o *NetworkIPBgpPeerGroupsGetParams) 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
}
// bindParamNetworkIPBgpPeerGroupsGet binds the parameter order_by
func (o *NetworkIPBgpPeerGroupsGetParams) 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/networking/ip_service_policy_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/ip_service_policy_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// IPServicePolicyDeleteReader is a Reader for the IPServicePolicyDelete structure.
type IPServicePolicyDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IPServicePolicyDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIPServicePolicyDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIPServicePolicyDeleteDefault(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
}
}
// NewIPServicePolicyDeleteOK creates a IPServicePolicyDeleteOK with default headers values
func NewIPServicePolicyDeleteOK() *IPServicePolicyDeleteOK {
return &IPServicePolicyDeleteOK{}
}
/*
IPServicePolicyDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IPServicePolicyDeleteOK struct {
}
// IsSuccess returns true when this ip service policy delete o k response has a 2xx status code
func (o *IPServicePolicyDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ip service policy delete o k response has a 3xx status code
func (o *IPServicePolicyDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ip service policy delete o k response has a 4xx status code
func (o *IPServicePolicyDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ip service policy delete o k response has a 5xx status code
func (o *IPServicePolicyDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this ip service policy delete o k response a status code equal to that given
func (o *IPServicePolicyDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IPServicePolicyDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ip/service-policies/{uuid}][%d] ipServicePolicyDeleteOK ", 200)
}
func (o *IPServicePolicyDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ip/service-policies/{uuid}][%d] ipServicePolicyDeleteOK ", 200)
}
func (o *IPServicePolicyDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIPServicePolicyDeleteDefault creates a IPServicePolicyDeleteDefault with default headers values
func NewIPServicePolicyDeleteDefault(code int) *IPServicePolicyDeleteDefault {
return &IPServicePolicyDeleteDefault{
_statusCode: code,
}
}
/*
IPServicePolicyDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 53281927 | Service policies owned by the system cannot be deleted. |
| 53281928 | Service policies assigned to LIFs cannot be deleted. |
*/
type IPServicePolicyDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ip service policy delete default response
func (o *IPServicePolicyDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ip service policy delete default response has a 2xx status code
func (o *IPServicePolicyDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ip service policy delete default response has a 3xx status code
func (o *IPServicePolicyDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ip service policy delete default response has a 4xx status code
func (o *IPServicePolicyDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ip service policy delete default response has a 5xx status code
func (o *IPServicePolicyDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ip service policy delete default response a status code equal to that given
func (o *IPServicePolicyDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IPServicePolicyDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/ip/service-policies/{uuid}][%d] ip_service_policy_delete default %+v", o._statusCode, o.Payload)
}
func (o *IPServicePolicyDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/ip/service-policies/{uuid}][%d] ip_service_policy_delete default %+v", o._statusCode, o.Payload)
}
func (o *IPServicePolicyDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IPServicePolicyDeleteDefault) 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/networking/http_proxy_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// HTTPProxyCreateReader is a Reader for the HTTPProxyCreate structure.
type HTTPProxyCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *HTTPProxyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewHTTPProxyCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewHTTPProxyCreateDefault(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
}
}
// NewHTTPProxyCreateCreated creates a HTTPProxyCreateCreated with default headers values
func NewHTTPProxyCreateCreated() *HTTPProxyCreateCreated {
return &HTTPProxyCreateCreated{}
}
/*
HTTPProxyCreateCreated describes a response with status code 201, with default header values.
Created
*/
type HTTPProxyCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.NetworkHTTPProxyResponse
}
// IsSuccess returns true when this http proxy create created response has a 2xx status code
func (o *HTTPProxyCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this http proxy create created response has a 3xx status code
func (o *HTTPProxyCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this http proxy create created response has a 4xx status code
func (o *HTTPProxyCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this http proxy create created response has a 5xx status code
func (o *HTTPProxyCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this http proxy create created response a status code equal to that given
func (o *HTTPProxyCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *HTTPProxyCreateCreated) Error() string {
return fmt.Sprintf("[POST /network/http-proxy][%d] httpProxyCreateCreated %+v", 201, o.Payload)
}
func (o *HTTPProxyCreateCreated) String() string {
return fmt.Sprintf("[POST /network/http-proxy][%d] httpProxyCreateCreated %+v", 201, o.Payload)
}
func (o *HTTPProxyCreateCreated) GetPayload() *models.NetworkHTTPProxyResponse {
return o.Payload
}
func (o *HTTPProxyCreateCreated) 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.NetworkHTTPProxyResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewHTTPProxyCreateDefault creates a HTTPProxyCreateDefault with default headers values
func NewHTTPProxyCreateDefault(code int) *HTTPProxyCreateDefault {
return &HTTPProxyCreateDefault{
_statusCode: code,
}
}
/*
HTTPProxyCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 26214473 | HTTP proxy configuration is not valid. |
| 26214476 | The "IPspace" parameter should not be specified in the SVM context. |
| 26214477 | The specified IPspace does not exist. |
| 23724130 | Cannot use an IPv6 name server address because there are no IPv6 interfaces. |
| 26214481 | Username and password cannot be empty when HTTP proxy authentication is enabled. |
| 26214482 | Username and password cannot be specified when HTTP proxy authentication is disabled. |
*/
type HTTPProxyCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the http proxy create default response
func (o *HTTPProxyCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this http proxy create default response has a 2xx status code
func (o *HTTPProxyCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this http proxy create default response has a 3xx status code
func (o *HTTPProxyCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this http proxy create default response has a 4xx status code
func (o *HTTPProxyCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this http proxy create default response has a 5xx status code
func (o *HTTPProxyCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this http proxy create default response a status code equal to that given
func (o *HTTPProxyCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *HTTPProxyCreateDefault) Error() string {
return fmt.Sprintf("[POST /network/http-proxy][%d] http_proxy_create default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyCreateDefault) String() string {
return fmt.Sprintf("[POST /network/http-proxy][%d] http_proxy_create default %+v", o._statusCode, o.Payload)
}
func (o *HTTPProxyCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *HTTPProxyCreateDefault) 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/networking/network_ip_interface_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ip_interface_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkIPInterfaceGetParams creates a new NetworkIPInterfaceGetParams 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 NewNetworkIPInterfaceGetParams() *NetworkIPInterfaceGetParams {
return &NetworkIPInterfaceGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkIPInterfaceGetParamsWithTimeout creates a new NetworkIPInterfaceGetParams object
// with the ability to set a timeout on a request.
func NewNetworkIPInterfaceGetParamsWithTimeout(timeout time.Duration) *NetworkIPInterfaceGetParams {
return &NetworkIPInterfaceGetParams{
timeout: timeout,
}
}
// NewNetworkIPInterfaceGetParamsWithContext creates a new NetworkIPInterfaceGetParams object
// with the ability to set a context for a request.
func NewNetworkIPInterfaceGetParamsWithContext(ctx context.Context) *NetworkIPInterfaceGetParams {
return &NetworkIPInterfaceGetParams{
Context: ctx,
}
}
// NewNetworkIPInterfaceGetParamsWithHTTPClient creates a new NetworkIPInterfaceGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkIPInterfaceGetParamsWithHTTPClient(client *http.Client) *NetworkIPInterfaceGetParams {
return &NetworkIPInterfaceGetParams{
HTTPClient: client,
}
}
/*
NetworkIPInterfaceGetParams contains all the parameters to send to the API endpoint
for the network ip interface get operation.
Typically these are written to a http.Request.
*/
type NetworkIPInterfaceGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
IP interface UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the network ip interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceGetParams) WithDefaults() *NetworkIPInterfaceGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ip interface get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkIPInterfaceGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) WithTimeout(timeout time.Duration) *NetworkIPInterfaceGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) WithContext(ctx context.Context) *NetworkIPInterfaceGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) WithHTTPClient(client *http.Client) *NetworkIPInterfaceGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) WithFields(fields []string) *NetworkIPInterfaceGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) WithUUID(uuid string) *NetworkIPInterfaceGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the network ip interface get params
func (o *NetworkIPInterfaceGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkIPInterfaceGetParams) 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
}
// bindParamNetworkIPInterfaceGet binds the parameter fields
func (o *NetworkIPInterfaceGetParams) 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/networking/network_ethernet_ports_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_ports_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewNetworkEthernetPortsCreateParams creates a new NetworkEthernetPortsCreateParams 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 NewNetworkEthernetPortsCreateParams() *NetworkEthernetPortsCreateParams {
return &NetworkEthernetPortsCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewNetworkEthernetPortsCreateParamsWithTimeout creates a new NetworkEthernetPortsCreateParams object
// with the ability to set a timeout on a request.
func NewNetworkEthernetPortsCreateParamsWithTimeout(timeout time.Duration) *NetworkEthernetPortsCreateParams {
return &NetworkEthernetPortsCreateParams{
timeout: timeout,
}
}
// NewNetworkEthernetPortsCreateParamsWithContext creates a new NetworkEthernetPortsCreateParams object
// with the ability to set a context for a request.
func NewNetworkEthernetPortsCreateParamsWithContext(ctx context.Context) *NetworkEthernetPortsCreateParams {
return &NetworkEthernetPortsCreateParams{
Context: ctx,
}
}
// NewNetworkEthernetPortsCreateParamsWithHTTPClient creates a new NetworkEthernetPortsCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewNetworkEthernetPortsCreateParamsWithHTTPClient(client *http.Client) *NetworkEthernetPortsCreateParams {
return &NetworkEthernetPortsCreateParams{
HTTPClient: client,
}
}
/*
NetworkEthernetPortsCreateParams contains all the parameters to send to the API endpoint
for the network ethernet ports create operation.
Typically these are written to a http.Request.
*/
type NetworkEthernetPortsCreateParams struct {
/* Info.
Port parameters
*/
Info *models.Port
/* 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 network ethernet ports create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortsCreateParams) WithDefaults() *NetworkEthernetPortsCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the network ethernet ports create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NetworkEthernetPortsCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := NetworkEthernetPortsCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) WithTimeout(timeout time.Duration) *NetworkEthernetPortsCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) WithContext(ctx context.Context) *NetworkEthernetPortsCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) WithHTTPClient(client *http.Client) *NetworkEthernetPortsCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) WithInfo(info *models.Port) *NetworkEthernetPortsCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) SetInfo(info *models.Port) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) WithReturnRecords(returnRecords *bool) *NetworkEthernetPortsCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the network ethernet ports create params
func (o *NetworkEthernetPortsCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *NetworkEthernetPortsCreateParams) 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/networking/http_proxy_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/http_proxy_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewHTTPProxyModifyParams creates a new HTTPProxyModifyParams 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 NewHTTPProxyModifyParams() *HTTPProxyModifyParams {
return &HTTPProxyModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewHTTPProxyModifyParamsWithTimeout creates a new HTTPProxyModifyParams object
// with the ability to set a timeout on a request.
func NewHTTPProxyModifyParamsWithTimeout(timeout time.Duration) *HTTPProxyModifyParams {
return &HTTPProxyModifyParams{
timeout: timeout,
}
}
// NewHTTPProxyModifyParamsWithContext creates a new HTTPProxyModifyParams object
// with the ability to set a context for a request.
func NewHTTPProxyModifyParamsWithContext(ctx context.Context) *HTTPProxyModifyParams {
return &HTTPProxyModifyParams{
Context: ctx,
}
}
// NewHTTPProxyModifyParamsWithHTTPClient creates a new HTTPProxyModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewHTTPProxyModifyParamsWithHTTPClient(client *http.Client) *HTTPProxyModifyParams {
return &HTTPProxyModifyParams{
HTTPClient: client,
}
}
/*
HTTPProxyModifyParams contains all the parameters to send to the API endpoint
for the http proxy modify operation.
Typically these are written to a http.Request.
*/
type HTTPProxyModifyParams struct {
/* Info.
Information specification
*/
Info *models.NetworkHTTPProxy
/* UUID.
HTTP proxy UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the http proxy modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyModifyParams) WithDefaults() *HTTPProxyModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the http proxy modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *HTTPProxyModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the http proxy modify params
func (o *HTTPProxyModifyParams) WithTimeout(timeout time.Duration) *HTTPProxyModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the http proxy modify params
func (o *HTTPProxyModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the http proxy modify params
func (o *HTTPProxyModifyParams) WithContext(ctx context.Context) *HTTPProxyModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the http proxy modify params
func (o *HTTPProxyModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the http proxy modify params
func (o *HTTPProxyModifyParams) WithHTTPClient(client *http.Client) *HTTPProxyModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the http proxy modify params
func (o *HTTPProxyModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the http proxy modify params
func (o *HTTPProxyModifyParams) WithInfo(info *models.NetworkHTTPProxy) *HTTPProxyModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the http proxy modify params
func (o *HTTPProxyModifyParams) SetInfo(info *models.NetworkHTTPProxy) {
o.Info = info
}
// WithUUID adds the uuid to the http proxy modify params
func (o *HTTPProxyModifyParams) WithUUID(uuid string) *HTTPProxyModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the http proxy modify params
func (o *HTTPProxyModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *HTTPProxyModifyParams) 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 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/networking/fc_port_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/fc_port_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NewFcPortGetParams creates a new FcPortGetParams 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 NewFcPortGetParams() *FcPortGetParams {
return &FcPortGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFcPortGetParamsWithTimeout creates a new FcPortGetParams object
// with the ability to set a timeout on a request.
func NewFcPortGetParamsWithTimeout(timeout time.Duration) *FcPortGetParams {
return &FcPortGetParams{
timeout: timeout,
}
}
// NewFcPortGetParamsWithContext creates a new FcPortGetParams object
// with the ability to set a context for a request.
func NewFcPortGetParamsWithContext(ctx context.Context) *FcPortGetParams {
return &FcPortGetParams{
Context: ctx,
}
}
// NewFcPortGetParamsWithHTTPClient creates a new FcPortGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFcPortGetParamsWithHTTPClient(client *http.Client) *FcPortGetParams {
return &FcPortGetParams{
HTTPClient: client,
}
}
/*
FcPortGetParams contains all the parameters to send to the API endpoint
for the fc port get operation.
Typically these are written to a http.Request.
*/
type FcPortGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
The unique identifier for the FC port.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the fc port get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcPortGetParams) WithDefaults() *FcPortGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the fc port get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FcPortGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the fc port get params
func (o *FcPortGetParams) WithTimeout(timeout time.Duration) *FcPortGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the fc port get params
func (o *FcPortGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the fc port get params
func (o *FcPortGetParams) WithContext(ctx context.Context) *FcPortGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the fc port get params
func (o *FcPortGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the fc port get params
func (o *FcPortGetParams) WithHTTPClient(client *http.Client) *FcPortGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the fc port get params
func (o *FcPortGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the fc port get params
func (o *FcPortGetParams) WithFields(fields []string) *FcPortGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the fc port get params
func (o *FcPortGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the fc port get params
func (o *FcPortGetParams) WithUUID(uuid string) *FcPortGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the fc port get params
func (o *FcPortGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *FcPortGetParams) 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
}
// bindParamFcPortGet binds the parameter fields
func (o *FcPortGetParams) 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/networking/network_ethernet_broadcast_domain_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/networking/network_ethernet_broadcast_domain_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package networking
// 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"
)
// NetworkEthernetBroadcastDomainDeleteReader is a Reader for the NetworkEthernetBroadcastDomainDelete structure.
type NetworkEthernetBroadcastDomainDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NetworkEthernetBroadcastDomainDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNetworkEthernetBroadcastDomainDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNetworkEthernetBroadcastDomainDeleteDefault(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
}
}
// NewNetworkEthernetBroadcastDomainDeleteOK creates a NetworkEthernetBroadcastDomainDeleteOK with default headers values
func NewNetworkEthernetBroadcastDomainDeleteOK() *NetworkEthernetBroadcastDomainDeleteOK {
return &NetworkEthernetBroadcastDomainDeleteOK{}
}
/*
NetworkEthernetBroadcastDomainDeleteOK describes a response with status code 200, with default header values.
OK
*/
type NetworkEthernetBroadcastDomainDeleteOK struct {
}
// IsSuccess returns true when this network ethernet broadcast domain delete o k response has a 2xx status code
func (o *NetworkEthernetBroadcastDomainDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this network ethernet broadcast domain delete o k response has a 3xx status code
func (o *NetworkEthernetBroadcastDomainDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this network ethernet broadcast domain delete o k response has a 4xx status code
func (o *NetworkEthernetBroadcastDomainDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this network ethernet broadcast domain delete o k response has a 5xx status code
func (o *NetworkEthernetBroadcastDomainDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this network ethernet broadcast domain delete o k response a status code equal to that given
func (o *NetworkEthernetBroadcastDomainDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *NetworkEthernetBroadcastDomainDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /network/ethernet/broadcast-domains/{uuid}][%d] networkEthernetBroadcastDomainDeleteOK ", 200)
}
func (o *NetworkEthernetBroadcastDomainDeleteOK) String() string {
return fmt.Sprintf("[DELETE /network/ethernet/broadcast-domains/{uuid}][%d] networkEthernetBroadcastDomainDeleteOK ", 200)
}
func (o *NetworkEthernetBroadcastDomainDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewNetworkEthernetBroadcastDomainDeleteDefault creates a NetworkEthernetBroadcastDomainDeleteDefault with default headers values
func NewNetworkEthernetBroadcastDomainDeleteDefault(code int) *NetworkEthernetBroadcastDomainDeleteDefault {
return &NetworkEthernetBroadcastDomainDeleteDefault{
_statusCode: code,
}
}
/*
NetworkEthernetBroadcastDomainDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 1967103 | A broadcast domain with ports cannot be deleted. |
*/
type NetworkEthernetBroadcastDomainDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the network ethernet broadcast domain delete default response
func (o *NetworkEthernetBroadcastDomainDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this network ethernet broadcast domain delete default response has a 2xx status code
func (o *NetworkEthernetBroadcastDomainDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this network ethernet broadcast domain delete default response has a 3xx status code
func (o *NetworkEthernetBroadcastDomainDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this network ethernet broadcast domain delete default response has a 4xx status code
func (o *NetworkEthernetBroadcastDomainDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this network ethernet broadcast domain delete default response has a 5xx status code
func (o *NetworkEthernetBroadcastDomainDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this network ethernet broadcast domain delete default response a status code equal to that given
func (o *NetworkEthernetBroadcastDomainDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NetworkEthernetBroadcastDomainDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /network/ethernet/broadcast-domains/{uuid}][%d] network_ethernet_broadcast_domain_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetBroadcastDomainDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /network/ethernet/broadcast-domains/{uuid}][%d] network_ethernet_broadcast_domain_delete default %+v", o._statusCode, o.Payload)
}
func (o *NetworkEthernetBroadcastDomainDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NetworkEthernetBroadcastDomainDeleteDefault) 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.