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/cluster/schedule_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/schedule_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ScheduleCreateReader is a Reader for the ScheduleCreate structure.
type ScheduleCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ScheduleCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewScheduleCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewScheduleCreateDefault(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
}
}
// NewScheduleCreateCreated creates a ScheduleCreateCreated with default headers values
func NewScheduleCreateCreated() *ScheduleCreateCreated {
return &ScheduleCreateCreated{}
}
/*
ScheduleCreateCreated describes a response with status code 201, with default header values.
Created
*/
type ScheduleCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
}
// IsSuccess returns true when this schedule create created response has a 2xx status code
func (o *ScheduleCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this schedule create created response has a 3xx status code
func (o *ScheduleCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this schedule create created response has a 4xx status code
func (o *ScheduleCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this schedule create created response has a 5xx status code
func (o *ScheduleCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this schedule create created response a status code equal to that given
func (o *ScheduleCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *ScheduleCreateCreated) Error() string {
return fmt.Sprintf("[POST /cluster/schedules][%d] scheduleCreateCreated ", 201)
}
func (o *ScheduleCreateCreated) String() string {
return fmt.Sprintf("[POST /cluster/schedules][%d] scheduleCreateCreated ", 201)
}
func (o *ScheduleCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
return nil
}
// NewScheduleCreateDefault creates a ScheduleCreateDefault with default headers values
func NewScheduleCreateDefault(code int) *ScheduleCreateDefault {
return &ScheduleCreateDefault{
_statusCode: code,
}
}
/*
ScheduleCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 458788 | The schedule specified is not a valid schedule. |
| 459760 | The schedule specified is not a valid schedule. |
| 459763 | Schedule cannot be created locally using the remote cluster name as the owner. |
| 459764 | Cannot create a schedule with the same name as an existing schedule from the MetroCluster partner cluster but of a different schedule type. |
| 460783 | As this is a MetroCluster configuration and the local cluster is waiting for switchback, changes to non-system schedules are not allowed. |
| 460784 | An error occurred creating the remote cluster version of this schedule. |
*/
type ScheduleCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the schedule create default response
func (o *ScheduleCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this schedule create default response has a 2xx status code
func (o *ScheduleCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this schedule create default response has a 3xx status code
func (o *ScheduleCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this schedule create default response has a 4xx status code
func (o *ScheduleCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this schedule create default response has a 5xx status code
func (o *ScheduleCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this schedule create default response a status code equal to that given
func (o *ScheduleCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ScheduleCreateDefault) Error() string {
return fmt.Sprintf("[POST /cluster/schedules][%d] schedule_create default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleCreateDefault) String() string {
return fmt.Sprintf("[POST /cluster/schedules][%d] schedule_create default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ScheduleCreateDefault) 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/cluster/nodes_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/nodes_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewNodesGetParams creates a new NodesGetParams 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 NewNodesGetParams() *NodesGetParams {
return &NodesGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewNodesGetParamsWithTimeout creates a new NodesGetParams object
// with the ability to set a timeout on a request.
func NewNodesGetParamsWithTimeout(timeout time.Duration) *NodesGetParams {
return &NodesGetParams{
timeout: timeout,
}
}
// NewNodesGetParamsWithContext creates a new NodesGetParams object
// with the ability to set a context for a request.
func NewNodesGetParamsWithContext(ctx context.Context) *NodesGetParams {
return &NodesGetParams{
Context: ctx,
}
}
// NewNodesGetParamsWithHTTPClient creates a new NodesGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewNodesGetParamsWithHTTPClient(client *http.Client) *NodesGetParams {
return &NodesGetParams{
HTTPClient: client,
}
}
/*
NodesGetParams contains all the parameters to send to the API endpoint
for the nodes get operation.
Typically these are written to a http.Request.
*/
type NodesGetParams struct {
/* ClusterInterfacesIPAddress.
Filter by cluster_interfaces.ip.address
*/
ClusterInterfacesIPAddress *string
/* ClusterInterfacesName.
Filter by cluster_interfaces.name
*/
ClusterInterfacesName *string
/* ClusterInterfacesUUID.
Filter by cluster_interfaces.uuid
*/
ClusterInterfacesUUID *string
/* ControllerBoard.
Filter by controller.board
*/
ControllerBoard *string
/* ControllerCPUCount.
Filter by controller.cpu.count
*/
ControllerCPUCount *int64
/* ControllerCPUFirmwareRelease.
Filter by controller.cpu.firmware_release
*/
ControllerCPUFirmwareRelease *string
/* ControllerCPUProcessor.
Filter by controller.cpu.processor
*/
ControllerCPUProcessor *string
/* ControllerFailedFanCount.
Filter by controller.failed_fan.count
*/
ControllerFailedFanCount *int64
/* ControllerFailedFanMessageCode.
Filter by controller.failed_fan.message.code
*/
ControllerFailedFanMessageCode *string
/* ControllerFailedFanMessageMessage.
Filter by controller.failed_fan.message.message
*/
ControllerFailedFanMessageMessage *string
/* ControllerFailedPowerSupplyCount.
Filter by controller.failed_power_supply.count
*/
ControllerFailedPowerSupplyCount *int64
/* ControllerFailedPowerSupplyMessageCode.
Filter by controller.failed_power_supply.message.code
*/
ControllerFailedPowerSupplyMessageCode *string
/* ControllerFailedPowerSupplyMessageMessage.
Filter by controller.failed_power_supply.message.message
*/
ControllerFailedPowerSupplyMessageMessage *string
/* ControllerFlashCacheCapacity.
Filter by controller.flash_cache.capacity
*/
ControllerFlashCacheCapacity *int64
/* ControllerFlashCacheDeviceID.
Filter by controller.flash_cache.device_id
*/
ControllerFlashCacheDeviceID *int64
/* ControllerFlashCacheFirmwareFile.
Filter by controller.flash_cache.firmware_file
*/
ControllerFlashCacheFirmwareFile *string
/* ControllerFlashCacheFirmwareVersion.
Filter by controller.flash_cache.firmware_version
*/
ControllerFlashCacheFirmwareVersion *string
/* ControllerFlashCacheHardwareRevision.
Filter by controller.flash_cache.hardware_revision
*/
ControllerFlashCacheHardwareRevision *string
/* ControllerFlashCacheModel.
Filter by controller.flash_cache.model
*/
ControllerFlashCacheModel *string
/* ControllerFlashCachePartNumber.
Filter by controller.flash_cache.part_number
*/
ControllerFlashCachePartNumber *string
/* ControllerFlashCacheSerialNumber.
Filter by controller.flash_cache.serial_number
*/
ControllerFlashCacheSerialNumber *string
/* ControllerFlashCacheSlot.
Filter by controller.flash_cache.slot
*/
ControllerFlashCacheSlot *string
/* ControllerFlashCacheState.
Filter by controller.flash_cache.state
*/
ControllerFlashCacheState *string
/* ControllerFrusID.
Filter by controller.frus.id
*/
ControllerFrusID *string
/* ControllerFrusState.
Filter by controller.frus.state
*/
ControllerFrusState *string
/* ControllerFrusType.
Filter by controller.frus.type
*/
ControllerFrusType *string
/* ControllerMemorySize.
Filter by controller.memory_size
*/
ControllerMemorySize *int64
/* ControllerOverTemperature.
Filter by controller.over_temperature
*/
ControllerOverTemperature *string
/* Date.
Filter by date
*/
Date *string
/* ExternalCacheIsEnabled.
Filter by external_cache.is_enabled
*/
ExternalCacheIsEnabled *bool
/* ExternalCacheIsHyaEnabled.
Filter by external_cache.is_hya_enabled
*/
ExternalCacheIsHyaEnabled *bool
/* ExternalCacheIsRewarmEnabled.
Filter by external_cache.is_rewarm_enabled
*/
ExternalCacheIsRewarmEnabled *bool
/* ExternalCachePcsSize.
Filter by external_cache.pcs_size
*/
ExternalCachePcsSize *int64
/* Fields.
Specify the fields to return.
*/
Fields []string
/* HaAutoGiveback.
Filter by ha.auto_giveback
*/
HaAutoGiveback *bool
/* HaEnabled.
Filter by ha.enabled
*/
HaEnabled *bool
/* HaGivebackFailureCode.
Filter by ha.giveback.failure.code
*/
HaGivebackFailureCode *int64
/* HaGivebackFailureMessage.
Filter by ha.giveback.failure.message
*/
HaGivebackFailureMessage *string
/* HaGivebackState.
Filter by ha.giveback.state
*/
HaGivebackState *string
/* HaGivebackStatusAggregateName.
Filter by ha.giveback.status.aggregate.name
*/
HaGivebackStatusAggregateName *string
/* HaGivebackStatusAggregateUUID.
Filter by ha.giveback.status.aggregate.uuid
*/
HaGivebackStatusAggregateUUID *string
/* HaGivebackStatusErrorCode.
Filter by ha.giveback.status.error.code
*/
HaGivebackStatusErrorCode *string
/* HaGivebackStatusErrorMessage.
Filter by ha.giveback.status.error.message
*/
HaGivebackStatusErrorMessage *string
/* HaGivebackStatusState.
Filter by ha.giveback.status.state
*/
HaGivebackStatusState *string
/* HaInterconnectAdapter.
Filter by ha.interconnect.adapter
*/
HaInterconnectAdapter *string
/* HaInterconnectState.
Filter by ha.interconnect.state
*/
HaInterconnectState *string
/* HaPartnersName.
Filter by ha.partners.name
*/
HaPartnersName *string
/* HaPartnersUUID.
Filter by ha.partners.uuid
*/
HaPartnersUUID *string
/* HaPortsNumber.
Filter by ha.ports.number
*/
HaPortsNumber *int64
/* HaPortsState.
Filter by ha.ports.state
*/
HaPortsState *string
/* HaTakeoverFailureCode.
Filter by ha.takeover.failure.code
*/
HaTakeoverFailureCode *int64
/* HaTakeoverFailureMessage.
Filter by ha.takeover.failure.message
*/
HaTakeoverFailureMessage *string
/* HaTakeoverState.
Filter by ha.takeover.state
*/
HaTakeoverState *string
/* HwAssistStatusEnabled.
Filter by hw_assist.status.enabled
*/
HwAssistStatusEnabled *bool
/* HwAssistStatusLocalIP.
Filter by hw_assist.status.local.ip
*/
HwAssistStatusLocalIP *string
/* HwAssistStatusLocalPort.
Filter by hw_assist.status.local.port
*/
HwAssistStatusLocalPort *int64
/* HwAssistStatusLocalState.
Filter by hw_assist.status.local.state
*/
HwAssistStatusLocalState *string
/* HwAssistStatusPartnerIP.
Filter by hw_assist.status.partner.ip
*/
HwAssistStatusPartnerIP *string
/* HwAssistStatusPartnerPort.
Filter by hw_assist.status.partner.port
*/
HwAssistStatusPartnerPort *int64
/* HwAssistStatusPartnerState.
Filter by hw_assist.status.partner.state
*/
HwAssistStatusPartnerState *string
/* IsSparesLow.
Filter by is_spares_low
*/
IsSparesLow *bool
/* Location.
Filter by location
*/
Location *string
/* ManagementInterfacesIPAddress.
Filter by management_interfaces.ip.address
*/
ManagementInterfacesIPAddress *string
/* ManagementInterfacesName.
Filter by management_interfaces.name
*/
ManagementInterfacesName *string
/* ManagementInterfacesUUID.
Filter by management_interfaces.uuid
*/
ManagementInterfacesUUID *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Membership.
Filter by membership
*/
Membership *string
/* MetricDuration.
Filter by metric.duration
*/
MetricDuration *string
/* MetricProcessorUtilization.
Filter by metric.processor_utilization
*/
MetricProcessorUtilization *int64
/* MetricStatus.
Filter by metric.status
*/
MetricStatus *string
/* MetricTimestamp.
Filter by metric.timestamp
*/
MetricTimestamp *string
/* MetricUUID.
Filter by metric.uuid
*/
MetricUUID *string
/* MetroclusterCustomVlanCapable.
Filter by metrocluster.custom_vlan_capable
*/
MetroclusterCustomVlanCapable *bool
/* MetroclusterPortsName.
Filter by metrocluster.ports.name
*/
MetroclusterPortsName *string
/* MetroclusterType.
Filter by metrocluster.type
*/
MetroclusterType *string
/* Model.
Filter by model
*/
Model *string
/* Name.
Filter by name
*/
Name *string
/* NvramBatteryState.
Filter by nvram.battery_state
*/
NvramBatteryState *string
/* NvramID.
Filter by nvram.id
*/
NvramID *int64
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* Owner.
Filter by owner
*/
Owner *string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* SerialNumber.
Filter by serial_number
*/
SerialNumber *string
/* ServiceProcessorAPIServiceEnabled.
Filter by service_processor.api_service.enabled
*/
ServiceProcessorAPIServiceEnabled *bool
/* ServiceProcessorAPIServiceLimitAccess.
Filter by service_processor.api_service.limit_access
*/
ServiceProcessorAPIServiceLimitAccess *bool
/* ServiceProcessorAPIServicePort.
Filter by service_processor.api_service.port
*/
ServiceProcessorAPIServicePort *int64
/* ServiceProcessorAutoConfigIPV4Subnet.
Filter by service_processor.auto_config.ipv4_subnet
*/
ServiceProcessorAutoConfigIPV4Subnet *string
/* ServiceProcessorAutoConfigIPV6Subnet.
Filter by service_processor.auto_config.ipv6_subnet
*/
ServiceProcessorAutoConfigIPV6Subnet *string
/* ServiceProcessorAutoupdateEnabled.
Filter by service_processor.autoupdate_enabled
*/
ServiceProcessorAutoupdateEnabled *bool
/* ServiceProcessorBackupIsCurrent.
Filter by service_processor.backup.is_current
*/
ServiceProcessorBackupIsCurrent *bool
/* ServiceProcessorBackupState.
Filter by service_processor.backup.state
*/
ServiceProcessorBackupState *string
/* ServiceProcessorBackupVersion.
Filter by service_processor.backup.version
*/
ServiceProcessorBackupVersion *string
/* ServiceProcessorDhcpEnabled.
Filter by service_processor.dhcp_enabled
*/
ServiceProcessorDhcpEnabled *bool
/* ServiceProcessorFirmwareVersion.
Filter by service_processor.firmware_version
*/
ServiceProcessorFirmwareVersion *string
/* ServiceProcessorIPV4InterfaceAddress.
Filter by service_processor.ipv4_interface.address
*/
ServiceProcessorIPV4InterfaceAddress *string
/* ServiceProcessorIPV4InterfaceGateway.
Filter by service_processor.ipv4_interface.gateway
*/
ServiceProcessorIPV4InterfaceGateway *string
/* ServiceProcessorIPV4InterfaceNetmask.
Filter by service_processor.ipv4_interface.netmask
*/
ServiceProcessorIPV4InterfaceNetmask *string
/* ServiceProcessorIPV6InterfaceAddress.
Filter by service_processor.ipv6_interface.address
*/
ServiceProcessorIPV6InterfaceAddress *string
/* ServiceProcessorIPV6InterfaceGateway.
Filter by service_processor.ipv6_interface.gateway
*/
ServiceProcessorIPV6InterfaceGateway *string
/* ServiceProcessorIPV6InterfaceNetmask.
Filter by service_processor.ipv6_interface.netmask
*/
ServiceProcessorIPV6InterfaceNetmask *int64
/* ServiceProcessorIsIPConfigured.
Filter by service_processor.is_ip_configured
*/
ServiceProcessorIsIPConfigured *bool
/* ServiceProcessorLastUpdateState.
Filter by service_processor.last_update_state
*/
ServiceProcessorLastUpdateState *string
/* ServiceProcessorLinkStatus.
Filter by service_processor.link_status
*/
ServiceProcessorLinkStatus *string
/* ServiceProcessorMacAddress.
Filter by service_processor.mac_address
*/
ServiceProcessorMacAddress *string
/* ServiceProcessorPrimaryIsCurrent.
Filter by service_processor.primary.is_current
*/
ServiceProcessorPrimaryIsCurrent *bool
/* ServiceProcessorPrimaryState.
Filter by service_processor.primary.state
*/
ServiceProcessorPrimaryState *string
/* ServiceProcessorPrimaryVersion.
Filter by service_processor.primary.version
*/
ServiceProcessorPrimaryVersion *string
/* ServiceProcessorSSHInfoAllowedAddresses.
Filter by service_processor.ssh_info.allowed_addresses
*/
ServiceProcessorSSHInfoAllowedAddresses *string
/* ServiceProcessorState.
Filter by service_processor.state
*/
ServiceProcessorState *string
/* ServiceProcessorType.
Filter by service_processor.type
*/
ServiceProcessorType *string
/* SnaplockComplianceClockTime.
Filter by snaplock.compliance_clock_time
*/
SnaplockComplianceClockTime *string
/* State.
Filter by state
*/
State *string
/* StatisticsProcessorUtilizationBase.
Filter by statistics.processor_utilization_base
*/
StatisticsProcessorUtilizationBase *int64
/* StatisticsProcessorUtilizationRaw.
Filter by statistics.processor_utilization_raw
*/
StatisticsProcessorUtilizationRaw *int64
/* StatisticsStatus.
Filter by statistics.status
*/
StatisticsStatus *string
/* StatisticsTimestamp.
Filter by statistics.timestamp
*/
StatisticsTimestamp *string
/* StorageConfiguration.
Filter by storage_configuration
*/
StorageConfiguration *string
/* SystemID.
Filter by system_id
*/
SystemID *string
/* SystemMachineType.
Filter by system_machine_type
*/
SystemMachineType *string
/* Uptime.
Filter by uptime
*/
Uptime *int64
/* UUID.
Filter by uuid
*/
UUID *string
/* VendorSerialNumber.
Filter by vendor_serial_number
*/
VendorSerialNumber *string
/* VersionFull.
Filter by version.full
*/
VersionFull *string
/* VersionGeneration.
Filter by version.generation
*/
VersionGeneration *int64
/* VersionMajor.
Filter by version.major
*/
VersionMajor *int64
/* VersionMinor.
Filter by version.minor
*/
VersionMinor *int64
/* VMProviderType.
Filter by vm.provider_type
*/
VMProviderType *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the nodes get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodesGetParams) WithDefaults() *NodesGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the nodes get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodesGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := NodesGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the nodes get params
func (o *NodesGetParams) WithTimeout(timeout time.Duration) *NodesGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the nodes get params
func (o *NodesGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the nodes get params
func (o *NodesGetParams) WithContext(ctx context.Context) *NodesGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the nodes get params
func (o *NodesGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the nodes get params
func (o *NodesGetParams) WithHTTPClient(client *http.Client) *NodesGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the nodes get params
func (o *NodesGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithClusterInterfacesIPAddress adds the clusterInterfacesIPAddress to the nodes get params
func (o *NodesGetParams) WithClusterInterfacesIPAddress(clusterInterfacesIPAddress *string) *NodesGetParams {
o.SetClusterInterfacesIPAddress(clusterInterfacesIPAddress)
return o
}
// SetClusterInterfacesIPAddress adds the clusterInterfacesIpAddress to the nodes get params
func (o *NodesGetParams) SetClusterInterfacesIPAddress(clusterInterfacesIPAddress *string) {
o.ClusterInterfacesIPAddress = clusterInterfacesIPAddress
}
// WithClusterInterfacesName adds the clusterInterfacesName to the nodes get params
func (o *NodesGetParams) WithClusterInterfacesName(clusterInterfacesName *string) *NodesGetParams {
o.SetClusterInterfacesName(clusterInterfacesName)
return o
}
// SetClusterInterfacesName adds the clusterInterfacesName to the nodes get params
func (o *NodesGetParams) SetClusterInterfacesName(clusterInterfacesName *string) {
o.ClusterInterfacesName = clusterInterfacesName
}
// WithClusterInterfacesUUID adds the clusterInterfacesUUID to the nodes get params
func (o *NodesGetParams) WithClusterInterfacesUUID(clusterInterfacesUUID *string) *NodesGetParams {
o.SetClusterInterfacesUUID(clusterInterfacesUUID)
return o
}
// SetClusterInterfacesUUID adds the clusterInterfacesUuid to the nodes get params
func (o *NodesGetParams) SetClusterInterfacesUUID(clusterInterfacesUUID *string) {
o.ClusterInterfacesUUID = clusterInterfacesUUID
}
// WithControllerBoard adds the controllerBoard to the nodes get params
func (o *NodesGetParams) WithControllerBoard(controllerBoard *string) *NodesGetParams {
o.SetControllerBoard(controllerBoard)
return o
}
// SetControllerBoard adds the controllerBoard to the nodes get params
func (o *NodesGetParams) SetControllerBoard(controllerBoard *string) {
o.ControllerBoard = controllerBoard
}
// WithControllerCPUCount adds the controllerCPUCount to the nodes get params
func (o *NodesGetParams) WithControllerCPUCount(controllerCPUCount *int64) *NodesGetParams {
o.SetControllerCPUCount(controllerCPUCount)
return o
}
// SetControllerCPUCount adds the controllerCpuCount to the nodes get params
func (o *NodesGetParams) SetControllerCPUCount(controllerCPUCount *int64) {
o.ControllerCPUCount = controllerCPUCount
}
// WithControllerCPUFirmwareRelease adds the controllerCPUFirmwareRelease to the nodes get params
func (o *NodesGetParams) WithControllerCPUFirmwareRelease(controllerCPUFirmwareRelease *string) *NodesGetParams {
o.SetControllerCPUFirmwareRelease(controllerCPUFirmwareRelease)
return o
}
// SetControllerCPUFirmwareRelease adds the controllerCpuFirmwareRelease to the nodes get params
func (o *NodesGetParams) SetControllerCPUFirmwareRelease(controllerCPUFirmwareRelease *string) {
o.ControllerCPUFirmwareRelease = controllerCPUFirmwareRelease
}
// WithControllerCPUProcessor adds the controllerCPUProcessor to the nodes get params
func (o *NodesGetParams) WithControllerCPUProcessor(controllerCPUProcessor *string) *NodesGetParams {
o.SetControllerCPUProcessor(controllerCPUProcessor)
return o
}
// SetControllerCPUProcessor adds the controllerCpuProcessor to the nodes get params
func (o *NodesGetParams) SetControllerCPUProcessor(controllerCPUProcessor *string) {
o.ControllerCPUProcessor = controllerCPUProcessor
}
// WithControllerFailedFanCount adds the controllerFailedFanCount to the nodes get params
func (o *NodesGetParams) WithControllerFailedFanCount(controllerFailedFanCount *int64) *NodesGetParams {
o.SetControllerFailedFanCount(controllerFailedFanCount)
return o
}
// SetControllerFailedFanCount adds the controllerFailedFanCount to the nodes get params
func (o *NodesGetParams) SetControllerFailedFanCount(controllerFailedFanCount *int64) {
o.ControllerFailedFanCount = controllerFailedFanCount
}
// WithControllerFailedFanMessageCode adds the controllerFailedFanMessageCode to the nodes get params
func (o *NodesGetParams) WithControllerFailedFanMessageCode(controllerFailedFanMessageCode *string) *NodesGetParams {
o.SetControllerFailedFanMessageCode(controllerFailedFanMessageCode)
return o
}
// SetControllerFailedFanMessageCode adds the controllerFailedFanMessageCode to the nodes get params
func (o *NodesGetParams) SetControllerFailedFanMessageCode(controllerFailedFanMessageCode *string) {
o.ControllerFailedFanMessageCode = controllerFailedFanMessageCode
}
// WithControllerFailedFanMessageMessage adds the controllerFailedFanMessageMessage to the nodes get params
func (o *NodesGetParams) WithControllerFailedFanMessageMessage(controllerFailedFanMessageMessage *string) *NodesGetParams {
o.SetControllerFailedFanMessageMessage(controllerFailedFanMessageMessage)
return o
}
// SetControllerFailedFanMessageMessage adds the controllerFailedFanMessageMessage to the nodes get params
func (o *NodesGetParams) SetControllerFailedFanMessageMessage(controllerFailedFanMessageMessage *string) {
o.ControllerFailedFanMessageMessage = controllerFailedFanMessageMessage
}
// WithControllerFailedPowerSupplyCount adds the controllerFailedPowerSupplyCount to the nodes get params
func (o *NodesGetParams) WithControllerFailedPowerSupplyCount(controllerFailedPowerSupplyCount *int64) *NodesGetParams {
o.SetControllerFailedPowerSupplyCount(controllerFailedPowerSupplyCount)
return o
}
// SetControllerFailedPowerSupplyCount adds the controllerFailedPowerSupplyCount to the nodes get params
func (o *NodesGetParams) SetControllerFailedPowerSupplyCount(controllerFailedPowerSupplyCount *int64) {
o.ControllerFailedPowerSupplyCount = controllerFailedPowerSupplyCount
}
// WithControllerFailedPowerSupplyMessageCode adds the controllerFailedPowerSupplyMessageCode to the nodes get params
func (o *NodesGetParams) WithControllerFailedPowerSupplyMessageCode(controllerFailedPowerSupplyMessageCode *string) *NodesGetParams {
o.SetControllerFailedPowerSupplyMessageCode(controllerFailedPowerSupplyMessageCode)
return o
}
// SetControllerFailedPowerSupplyMessageCode adds the controllerFailedPowerSupplyMessageCode to the nodes get params
func (o *NodesGetParams) SetControllerFailedPowerSupplyMessageCode(controllerFailedPowerSupplyMessageCode *string) {
o.ControllerFailedPowerSupplyMessageCode = controllerFailedPowerSupplyMessageCode
}
// WithControllerFailedPowerSupplyMessageMessage adds the controllerFailedPowerSupplyMessageMessage to the nodes get params
func (o *NodesGetParams) WithControllerFailedPowerSupplyMessageMessage(controllerFailedPowerSupplyMessageMessage *string) *NodesGetParams {
o.SetControllerFailedPowerSupplyMessageMessage(controllerFailedPowerSupplyMessageMessage)
return o
}
// SetControllerFailedPowerSupplyMessageMessage adds the controllerFailedPowerSupplyMessageMessage to the nodes get params
func (o *NodesGetParams) SetControllerFailedPowerSupplyMessageMessage(controllerFailedPowerSupplyMessageMessage *string) {
o.ControllerFailedPowerSupplyMessageMessage = controllerFailedPowerSupplyMessageMessage
}
// WithControllerFlashCacheCapacity adds the controllerFlashCacheCapacity to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheCapacity(controllerFlashCacheCapacity *int64) *NodesGetParams {
o.SetControllerFlashCacheCapacity(controllerFlashCacheCapacity)
return o
}
// SetControllerFlashCacheCapacity adds the controllerFlashCacheCapacity to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheCapacity(controllerFlashCacheCapacity *int64) {
o.ControllerFlashCacheCapacity = controllerFlashCacheCapacity
}
// WithControllerFlashCacheDeviceID adds the controllerFlashCacheDeviceID to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheDeviceID(controllerFlashCacheDeviceID *int64) *NodesGetParams {
o.SetControllerFlashCacheDeviceID(controllerFlashCacheDeviceID)
return o
}
// SetControllerFlashCacheDeviceID adds the controllerFlashCacheDeviceId to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheDeviceID(controllerFlashCacheDeviceID *int64) {
o.ControllerFlashCacheDeviceID = controllerFlashCacheDeviceID
}
// WithControllerFlashCacheFirmwareFile adds the controllerFlashCacheFirmwareFile to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheFirmwareFile(controllerFlashCacheFirmwareFile *string) *NodesGetParams {
o.SetControllerFlashCacheFirmwareFile(controllerFlashCacheFirmwareFile)
return o
}
// SetControllerFlashCacheFirmwareFile adds the controllerFlashCacheFirmwareFile to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheFirmwareFile(controllerFlashCacheFirmwareFile *string) {
o.ControllerFlashCacheFirmwareFile = controllerFlashCacheFirmwareFile
}
// WithControllerFlashCacheFirmwareVersion adds the controllerFlashCacheFirmwareVersion to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheFirmwareVersion(controllerFlashCacheFirmwareVersion *string) *NodesGetParams {
o.SetControllerFlashCacheFirmwareVersion(controllerFlashCacheFirmwareVersion)
return o
}
// SetControllerFlashCacheFirmwareVersion adds the controllerFlashCacheFirmwareVersion to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheFirmwareVersion(controllerFlashCacheFirmwareVersion *string) {
o.ControllerFlashCacheFirmwareVersion = controllerFlashCacheFirmwareVersion
}
// WithControllerFlashCacheHardwareRevision adds the controllerFlashCacheHardwareRevision to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheHardwareRevision(controllerFlashCacheHardwareRevision *string) *NodesGetParams {
o.SetControllerFlashCacheHardwareRevision(controllerFlashCacheHardwareRevision)
return o
}
// SetControllerFlashCacheHardwareRevision adds the controllerFlashCacheHardwareRevision to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheHardwareRevision(controllerFlashCacheHardwareRevision *string) {
o.ControllerFlashCacheHardwareRevision = controllerFlashCacheHardwareRevision
}
// WithControllerFlashCacheModel adds the controllerFlashCacheModel to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheModel(controllerFlashCacheModel *string) *NodesGetParams {
o.SetControllerFlashCacheModel(controllerFlashCacheModel)
return o
}
// SetControllerFlashCacheModel adds the controllerFlashCacheModel to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheModel(controllerFlashCacheModel *string) {
o.ControllerFlashCacheModel = controllerFlashCacheModel
}
// WithControllerFlashCachePartNumber adds the controllerFlashCachePartNumber to the nodes get params
func (o *NodesGetParams) WithControllerFlashCachePartNumber(controllerFlashCachePartNumber *string) *NodesGetParams {
o.SetControllerFlashCachePartNumber(controllerFlashCachePartNumber)
return o
}
// SetControllerFlashCachePartNumber adds the controllerFlashCachePartNumber to the nodes get params
func (o *NodesGetParams) SetControllerFlashCachePartNumber(controllerFlashCachePartNumber *string) {
o.ControllerFlashCachePartNumber = controllerFlashCachePartNumber
}
// WithControllerFlashCacheSerialNumber adds the controllerFlashCacheSerialNumber to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheSerialNumber(controllerFlashCacheSerialNumber *string) *NodesGetParams {
o.SetControllerFlashCacheSerialNumber(controllerFlashCacheSerialNumber)
return o
}
// SetControllerFlashCacheSerialNumber adds the controllerFlashCacheSerialNumber to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheSerialNumber(controllerFlashCacheSerialNumber *string) {
o.ControllerFlashCacheSerialNumber = controllerFlashCacheSerialNumber
}
// WithControllerFlashCacheSlot adds the controllerFlashCacheSlot to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheSlot(controllerFlashCacheSlot *string) *NodesGetParams {
o.SetControllerFlashCacheSlot(controllerFlashCacheSlot)
return o
}
// SetControllerFlashCacheSlot adds the controllerFlashCacheSlot to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheSlot(controllerFlashCacheSlot *string) {
o.ControllerFlashCacheSlot = controllerFlashCacheSlot
}
// WithControllerFlashCacheState adds the controllerFlashCacheState to the nodes get params
func (o *NodesGetParams) WithControllerFlashCacheState(controllerFlashCacheState *string) *NodesGetParams {
o.SetControllerFlashCacheState(controllerFlashCacheState)
return o
}
// SetControllerFlashCacheState adds the controllerFlashCacheState to the nodes get params
func (o *NodesGetParams) SetControllerFlashCacheState(controllerFlashCacheState *string) {
o.ControllerFlashCacheState = controllerFlashCacheState
}
// WithControllerFrusID adds the controllerFrusID to the nodes get params
func (o *NodesGetParams) WithControllerFrusID(controllerFrusID *string) *NodesGetParams {
o.SetControllerFrusID(controllerFrusID)
return o
}
// SetControllerFrusID adds the controllerFrusId to the nodes get params
func (o *NodesGetParams) SetControllerFrusID(controllerFrusID *string) {
o.ControllerFrusID = controllerFrusID
}
// WithControllerFrusState adds the controllerFrusState to the nodes get params
func (o *NodesGetParams) WithControllerFrusState(controllerFrusState *string) *NodesGetParams {
o.SetControllerFrusState(controllerFrusState)
return o
}
// SetControllerFrusState adds the controllerFrusState to the nodes get params
func (o *NodesGetParams) SetControllerFrusState(controllerFrusState *string) {
o.ControllerFrusState = controllerFrusState
}
// WithControllerFrusType adds the controllerFrusType to the nodes get params
func (o *NodesGetParams) WithControllerFrusType(controllerFrusType *string) *NodesGetParams {
o.SetControllerFrusType(controllerFrusType)
return o
}
// SetControllerFrusType adds the controllerFrusType to the nodes get params
func (o *NodesGetParams) SetControllerFrusType(controllerFrusType *string) {
o.ControllerFrusType = controllerFrusType
}
// WithControllerMemorySize adds the controllerMemorySize to the nodes get params
func (o *NodesGetParams) WithControllerMemorySize(controllerMemorySize *int64) *NodesGetParams {
o.SetControllerMemorySize(controllerMemorySize)
return o
}
// SetControllerMemorySize adds the controllerMemorySize to the nodes get params
func (o *NodesGetParams) SetControllerMemorySize(controllerMemorySize *int64) {
o.ControllerMemorySize = controllerMemorySize
}
// WithControllerOverTemperature adds the controllerOverTemperature to the nodes get params
func (o *NodesGetParams) WithControllerOverTemperature(controllerOverTemperature *string) *NodesGetParams {
o.SetControllerOverTemperature(controllerOverTemperature)
return o
}
// SetControllerOverTemperature adds the controllerOverTemperature to the nodes get params
func (o *NodesGetParams) SetControllerOverTemperature(controllerOverTemperature *string) {
o.ControllerOverTemperature = controllerOverTemperature
}
// WithDate adds the date to the nodes get params
func (o *NodesGetParams) WithDate(date *string) *NodesGetParams {
o.SetDate(date)
return o
}
// SetDate adds the date to the nodes get params
func (o *NodesGetParams) SetDate(date *string) {
o.Date = date
}
// WithExternalCacheIsEnabled adds the externalCacheIsEnabled to the nodes get params
func (o *NodesGetParams) WithExternalCacheIsEnabled(externalCacheIsEnabled *bool) *NodesGetParams {
| 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/cluster/cluster_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterGetParams creates a new ClusterGetParams 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 NewClusterGetParams() *ClusterGetParams {
return &ClusterGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterGetParamsWithTimeout creates a new ClusterGetParams object
// with the ability to set a timeout on a request.
func NewClusterGetParamsWithTimeout(timeout time.Duration) *ClusterGetParams {
return &ClusterGetParams{
timeout: timeout,
}
}
// NewClusterGetParamsWithContext creates a new ClusterGetParams object
// with the ability to set a context for a request.
func NewClusterGetParamsWithContext(ctx context.Context) *ClusterGetParams {
return &ClusterGetParams{
Context: ctx,
}
}
// NewClusterGetParamsWithHTTPClient creates a new ClusterGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterGetParamsWithHTTPClient(client *http.Client) *ClusterGetParams {
return &ClusterGetParams{
HTTPClient: client,
}
}
/*
ClusterGetParams contains all the parameters to send to the API endpoint
for the cluster get operation.
Typically these are written to a http.Request.
*/
type ClusterGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterGetParams) WithDefaults() *ClusterGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the cluster get params
func (o *ClusterGetParams) WithTimeout(timeout time.Duration) *ClusterGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster get params
func (o *ClusterGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster get params
func (o *ClusterGetParams) WithContext(ctx context.Context) *ClusterGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster get params
func (o *ClusterGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster get params
func (o *ClusterGetParams) WithHTTPClient(client *http.Client) *ClusterGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster get params
func (o *ClusterGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the cluster get params
func (o *ClusterGetParams) WithFields(fields []string) *ClusterGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the cluster get params
func (o *ClusterGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterGetParams) 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 len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamClusterGet binds the parameter fields
func (o *ClusterGetParams) 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/cluster/software_history_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_history_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwareHistoryCollectionGetParams creates a new SoftwareHistoryCollectionGetParams 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 NewSoftwareHistoryCollectionGetParams() *SoftwareHistoryCollectionGetParams {
return &SoftwareHistoryCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwareHistoryCollectionGetParamsWithTimeout creates a new SoftwareHistoryCollectionGetParams object
// with the ability to set a timeout on a request.
func NewSoftwareHistoryCollectionGetParamsWithTimeout(timeout time.Duration) *SoftwareHistoryCollectionGetParams {
return &SoftwareHistoryCollectionGetParams{
timeout: timeout,
}
}
// NewSoftwareHistoryCollectionGetParamsWithContext creates a new SoftwareHistoryCollectionGetParams object
// with the ability to set a context for a request.
func NewSoftwareHistoryCollectionGetParamsWithContext(ctx context.Context) *SoftwareHistoryCollectionGetParams {
return &SoftwareHistoryCollectionGetParams{
Context: ctx,
}
}
// NewSoftwareHistoryCollectionGetParamsWithHTTPClient creates a new SoftwareHistoryCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwareHistoryCollectionGetParamsWithHTTPClient(client *http.Client) *SoftwareHistoryCollectionGetParams {
return &SoftwareHistoryCollectionGetParams{
HTTPClient: client,
}
}
/*
SoftwareHistoryCollectionGetParams contains all the parameters to send to the API endpoint
for the software history collection get operation.
Typically these are written to a http.Request.
*/
type SoftwareHistoryCollectionGetParams struct {
/* EndTime.
Filter by end_time
*/
EndTime *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* FromVersion.
Filter by from_version
*/
FromVersion *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* NodeName.
Filter by node.name
*/
NodeName *string
/* NodeUUID.
Filter by node.uuid
*/
NodeUUID *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* StartTime.
Filter by start_time
*/
StartTime *string
/* State.
Filter by state
*/
State *string
/* ToVersion.
Filter by to_version
*/
ToVersion *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the software history collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwareHistoryCollectionGetParams) WithDefaults() *SoftwareHistoryCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software history collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwareHistoryCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := SoftwareHistoryCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithTimeout(timeout time.Duration) *SoftwareHistoryCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithContext(ctx context.Context) *SoftwareHistoryCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithHTTPClient(client *http.Client) *SoftwareHistoryCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEndTime adds the endTime to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithEndTime(endTime *string) *SoftwareHistoryCollectionGetParams {
o.SetEndTime(endTime)
return o
}
// SetEndTime adds the endTime to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetEndTime(endTime *string) {
o.EndTime = endTime
}
// WithFields adds the fields to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithFields(fields []string) *SoftwareHistoryCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithFromVersion adds the fromVersion to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithFromVersion(fromVersion *string) *SoftwareHistoryCollectionGetParams {
o.SetFromVersion(fromVersion)
return o
}
// SetFromVersion adds the fromVersion to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetFromVersion(fromVersion *string) {
o.FromVersion = fromVersion
}
// WithMaxRecords adds the maxRecords to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithMaxRecords(maxRecords *int64) *SoftwareHistoryCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithNodeName adds the nodeName to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithNodeName(nodeName *string) *SoftwareHistoryCollectionGetParams {
o.SetNodeName(nodeName)
return o
}
// SetNodeName adds the nodeName to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetNodeName(nodeName *string) {
o.NodeName = nodeName
}
// WithNodeUUID adds the nodeUUID to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithNodeUUID(nodeUUID *string) *SoftwareHistoryCollectionGetParams {
o.SetNodeUUID(nodeUUID)
return o
}
// SetNodeUUID adds the nodeUuid to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetNodeUUID(nodeUUID *string) {
o.NodeUUID = nodeUUID
}
// WithOrderBy adds the orderBy to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithOrderBy(orderBy []string) *SoftwareHistoryCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithReturnRecords(returnRecords *bool) *SoftwareHistoryCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SoftwareHistoryCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStartTime adds the startTime to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithStartTime(startTime *string) *SoftwareHistoryCollectionGetParams {
o.SetStartTime(startTime)
return o
}
// SetStartTime adds the startTime to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetStartTime(startTime *string) {
o.StartTime = startTime
}
// WithState adds the state to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithState(state *string) *SoftwareHistoryCollectionGetParams {
o.SetState(state)
return o
}
// SetState adds the state to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetState(state *string) {
o.State = state
}
// WithToVersion adds the toVersion to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) WithToVersion(toVersion *string) *SoftwareHistoryCollectionGetParams {
o.SetToVersion(toVersion)
return o
}
// SetToVersion adds the toVersion to the software history collection get params
func (o *SoftwareHistoryCollectionGetParams) SetToVersion(toVersion *string) {
o.ToVersion = toVersion
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwareHistoryCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.EndTime != nil {
// query param end_time
var qrEndTime string
if o.EndTime != nil {
qrEndTime = *o.EndTime
}
qEndTime := qrEndTime
if qEndTime != "" {
if err := r.SetQueryParam("end_time", qEndTime); err != nil {
return err
}
}
}
if o.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.FromVersion != nil {
// query param from_version
var qrFromVersion string
if o.FromVersion != nil {
qrFromVersion = *o.FromVersion
}
qFromVersion := qrFromVersion
if qFromVersion != "" {
if err := r.SetQueryParam("from_version", qFromVersion); err != nil {
return err
}
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.NodeName != nil {
// query param node.name
var qrNodeName string
if o.NodeName != nil {
qrNodeName = *o.NodeName
}
qNodeName := qrNodeName
if qNodeName != "" {
if err := r.SetQueryParam("node.name", qNodeName); err != nil {
return err
}
}
}
if o.NodeUUID != nil {
// query param node.uuid
var qrNodeUUID string
if o.NodeUUID != nil {
qrNodeUUID = *o.NodeUUID
}
qNodeUUID := qrNodeUUID
if qNodeUUID != "" {
if err := r.SetQueryParam("node.uuid", qNodeUUID); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.StartTime != nil {
// query param start_time
var qrStartTime string
if o.StartTime != nil {
qrStartTime = *o.StartTime
}
qStartTime := qrStartTime
if qStartTime != "" {
if err := r.SetQueryParam("start_time", qStartTime); 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.ToVersion != nil {
// query param to_version
var qrToVersion string
if o.ToVersion != nil {
qrToVersion = *o.ToVersion
}
qToVersion := qrToVersion
if qToVersion != "" {
if err := r.SetQueryParam("to_version", qToVersion); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSoftwareHistoryCollectionGet binds the parameter fields
func (o *SoftwareHistoryCollectionGetParams) 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
}
// bindParamSoftwareHistoryCollectionGet binds the parameter order_by
func (o *SoftwareHistoryCollectionGetParams) 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/cluster/software_package_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_package_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// SoftwarePackageCreateReader is a Reader for the SoftwarePackageCreate structure.
type SoftwarePackageCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SoftwarePackageCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewSoftwarePackageCreateAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSoftwarePackageCreateDefault(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
}
}
// NewSoftwarePackageCreateAccepted creates a SoftwarePackageCreateAccepted with default headers values
func NewSoftwarePackageCreateAccepted() *SoftwarePackageCreateAccepted {
return &SoftwarePackageCreateAccepted{}
}
/*
SoftwarePackageCreateAccepted describes a response with status code 202, with default header values.
Accepted
*/
type SoftwarePackageCreateAccepted struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this software package create accepted response has a 2xx status code
func (o *SoftwarePackageCreateAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this software package create accepted response has a 3xx status code
func (o *SoftwarePackageCreateAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this software package create accepted response has a 4xx status code
func (o *SoftwarePackageCreateAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this software package create accepted response has a 5xx status code
func (o *SoftwarePackageCreateAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this software package create accepted response a status code equal to that given
func (o *SoftwarePackageCreateAccepted) IsCode(code int) bool {
return code == 202
}
func (o *SoftwarePackageCreateAccepted) Error() string {
return fmt.Sprintf("[POST /cluster/software/download][%d] softwarePackageCreateAccepted %+v", 202, o.Payload)
}
func (o *SoftwarePackageCreateAccepted) String() string {
return fmt.Sprintf("[POST /cluster/software/download][%d] softwarePackageCreateAccepted %+v", 202, o.Payload)
}
func (o *SoftwarePackageCreateAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *SoftwarePackageCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSoftwarePackageCreateDefault creates a SoftwarePackageCreateDefault with default headers values
func NewSoftwarePackageCreateDefault(code int) *SoftwarePackageCreateDefault {
return &SoftwarePackageCreateDefault{
_statusCode: code,
}
}
/*
SoftwarePackageCreateDefault describes a response with status code -1, with default header values.
Error
*/
type SoftwarePackageCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the software package create default response
func (o *SoftwarePackageCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this software package create default response has a 2xx status code
func (o *SoftwarePackageCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this software package create default response has a 3xx status code
func (o *SoftwarePackageCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this software package create default response has a 4xx status code
func (o *SoftwarePackageCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this software package create default response has a 5xx status code
func (o *SoftwarePackageCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this software package create default response a status code equal to that given
func (o *SoftwarePackageCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SoftwarePackageCreateDefault) Error() string {
return fmt.Sprintf("[POST /cluster/software/download][%d] software_package_create default %+v", o._statusCode, o.Payload)
}
func (o *SoftwarePackageCreateDefault) String() string {
return fmt.Sprintf("[POST /cluster/software/download][%d] software_package_create default %+v", o._statusCode, o.Payload)
}
func (o *SoftwarePackageCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SoftwarePackageCreateDefault) 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/cluster/mediator_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/mediator_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MediatorCollectionGetReader is a Reader for the MediatorCollectionGet structure.
type MediatorCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MediatorCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMediatorCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMediatorCollectionGetDefault(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
}
}
// NewMediatorCollectionGetOK creates a MediatorCollectionGetOK with default headers values
func NewMediatorCollectionGetOK() *MediatorCollectionGetOK {
return &MediatorCollectionGetOK{}
}
/*
MediatorCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MediatorCollectionGetOK struct {
Payload *models.MediatorResponse
}
// IsSuccess returns true when this mediator collection get o k response has a 2xx status code
func (o *MediatorCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this mediator collection get o k response has a 3xx status code
func (o *MediatorCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this mediator collection get o k response has a 4xx status code
func (o *MediatorCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this mediator collection get o k response has a 5xx status code
func (o *MediatorCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this mediator collection get o k response a status code equal to that given
func (o *MediatorCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MediatorCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/mediators][%d] mediatorCollectionGetOK %+v", 200, o.Payload)
}
func (o *MediatorCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/mediators][%d] mediatorCollectionGetOK %+v", 200, o.Payload)
}
func (o *MediatorCollectionGetOK) GetPayload() *models.MediatorResponse {
return o.Payload
}
func (o *MediatorCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MediatorResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMediatorCollectionGetDefault creates a MediatorCollectionGetDefault with default headers values
func NewMediatorCollectionGetDefault(code int) *MediatorCollectionGetDefault {
return &MediatorCollectionGetDefault{
_statusCode: code,
}
}
/*
MediatorCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type MediatorCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the mediator collection get default response
func (o *MediatorCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this mediator collection get default response has a 2xx status code
func (o *MediatorCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this mediator collection get default response has a 3xx status code
func (o *MediatorCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this mediator collection get default response has a 4xx status code
func (o *MediatorCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this mediator collection get default response has a 5xx status code
func (o *MediatorCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this mediator collection get default response a status code equal to that given
func (o *MediatorCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MediatorCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/mediators][%d] mediator_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MediatorCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/mediators][%d] mediator_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MediatorCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MediatorCollectionGetDefault) 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/cluster/metrocluster_interconnect_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_interconnect_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterInterconnectCollectionGetReader is a Reader for the MetroclusterInterconnectCollectionGet structure.
type MetroclusterInterconnectCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterInterconnectCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMetroclusterInterconnectCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterInterconnectCollectionGetDefault(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
}
}
// NewMetroclusterInterconnectCollectionGetOK creates a MetroclusterInterconnectCollectionGetOK with default headers values
func NewMetroclusterInterconnectCollectionGetOK() *MetroclusterInterconnectCollectionGetOK {
return &MetroclusterInterconnectCollectionGetOK{}
}
/*
MetroclusterInterconnectCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MetroclusterInterconnectCollectionGetOK struct {
Payload *models.MetroclusterInterconnectResponse
}
// IsSuccess returns true when this metrocluster interconnect collection get o k response has a 2xx status code
func (o *MetroclusterInterconnectCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster interconnect collection get o k response has a 3xx status code
func (o *MetroclusterInterconnectCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster interconnect collection get o k response has a 4xx status code
func (o *MetroclusterInterconnectCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster interconnect collection get o k response has a 5xx status code
func (o *MetroclusterInterconnectCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster interconnect collection get o k response a status code equal to that given
func (o *MetroclusterInterconnectCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MetroclusterInterconnectCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/interconnects][%d] metroclusterInterconnectCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterInterconnectCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/interconnects][%d] metroclusterInterconnectCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterInterconnectCollectionGetOK) GetPayload() *models.MetroclusterInterconnectResponse {
return o.Payload
}
func (o *MetroclusterInterconnectCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MetroclusterInterconnectResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterInterconnectCollectionGetDefault creates a MetroclusterInterconnectCollectionGetDefault with default headers values
func NewMetroclusterInterconnectCollectionGetDefault(code int) *MetroclusterInterconnectCollectionGetDefault {
return &MetroclusterInterconnectCollectionGetDefault{
_statusCode: code,
}
}
/*
MetroclusterInterconnectCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2425734 | An internal error occurred. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
| 2427132 | MetroCluster is not configured on this cluster. |
*/
type MetroclusterInterconnectCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the metrocluster interconnect collection get default response
func (o *MetroclusterInterconnectCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster interconnect collection get default response has a 2xx status code
func (o *MetroclusterInterconnectCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster interconnect collection get default response has a 3xx status code
func (o *MetroclusterInterconnectCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster interconnect collection get default response has a 4xx status code
func (o *MetroclusterInterconnectCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster interconnect collection get default response has a 5xx status code
func (o *MetroclusterInterconnectCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster interconnect collection get default response a status code equal to that given
func (o *MetroclusterInterconnectCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterInterconnectCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/interconnects][%d] metrocluster_interconnect_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterInterconnectCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/interconnects][%d] metrocluster_interconnect_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterInterconnectCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MetroclusterInterconnectCollectionGetDefault) 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/cluster/web_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/web_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// WebModifyReader is a Reader for the WebModify structure.
type WebModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WebModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewWebModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 202:
result := NewWebModifyAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWebModifyDefault(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
}
}
// NewWebModifyOK creates a WebModifyOK with default headers values
func NewWebModifyOK() *WebModifyOK {
return &WebModifyOK{}
}
/*
WebModifyOK describes a response with status code 200, with default header values.
OK
*/
type WebModifyOK struct {
}
// IsSuccess returns true when this web modify o k response has a 2xx status code
func (o *WebModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this web modify o k response has a 3xx status code
func (o *WebModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this web modify o k response has a 4xx status code
func (o *WebModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this web modify o k response has a 5xx status code
func (o *WebModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this web modify o k response a status code equal to that given
func (o *WebModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *WebModifyOK) Error() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] webModifyOK ", 200)
}
func (o *WebModifyOK) String() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] webModifyOK ", 200)
}
func (o *WebModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewWebModifyAccepted creates a WebModifyAccepted with default headers values
func NewWebModifyAccepted() *WebModifyAccepted {
return &WebModifyAccepted{}
}
/*
WebModifyAccepted describes a response with status code 202, with default header values.
Accepted
*/
type WebModifyAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this web modify accepted response has a 2xx status code
func (o *WebModifyAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this web modify accepted response has a 3xx status code
func (o *WebModifyAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this web modify accepted response has a 4xx status code
func (o *WebModifyAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this web modify accepted response has a 5xx status code
func (o *WebModifyAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this web modify accepted response a status code equal to that given
func (o *WebModifyAccepted) IsCode(code int) bool {
return code == 202
}
func (o *WebModifyAccepted) Error() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] webModifyAccepted %+v", 202, o.Payload)
}
func (o *WebModifyAccepted) String() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] webModifyAccepted %+v", 202, o.Payload)
}
func (o *WebModifyAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *WebModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewWebModifyDefault creates a WebModifyDefault with default headers values
func NewWebModifyDefault(code int) *WebModifyDefault {
return &WebModifyDefault{
_statusCode: code,
}
}
/*
WebModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 9830406 | Reconfiguration of the web services failed. |
| 9830407 | The web services failed to restart. |
| 9830408 | Reconfiguration and/or restart of the web services failed. |
| 9830442 | Client authentication cannot be enabled without a client ca certificate. |
| 9830463 | The cluster must be fully upgraded before modifying this resource. |
| 9830464 | HTTP cannot be enabled when FIPS is also enabled. |
| 9830483 | The CSRF token timeout is invalid. |
| 9830484 | The maximum concurrent CSRF token count cannot be lower than 100. |
| 9830485 | The CSRF idle timeout cannot be greater than the CSRF absolute timeout. |
| 9830486 | CSRF requires an effective cluster version of 9.7 or later. |
| 9830487 | The HTTP and HTTPS ports must not have the same value. |
| 9830488 | The certificate is not a "server" certificate. |
| 9830489 | The certificate does not exist for the given SVM. |
*/
type WebModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the web modify default response
func (o *WebModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this web modify default response has a 2xx status code
func (o *WebModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this web modify default response has a 3xx status code
func (o *WebModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this web modify default response has a 4xx status code
func (o *WebModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this web modify default response has a 5xx status code
func (o *WebModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this web modify default response a status code equal to that given
func (o *WebModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WebModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] web_modify default %+v", o._statusCode, o.Payload)
}
func (o *WebModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster/web][%d] web_modify default %+v", o._statusCode, o.Payload)
}
func (o *WebModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WebModifyDefault) 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/cluster/job_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/job_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// JobGetReader is a Reader for the JobGet structure.
type JobGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *JobGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewJobGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewJobGetDefault(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
}
}
// NewJobGetOK creates a JobGetOK with default headers values
func NewJobGetOK() *JobGetOK {
return &JobGetOK{}
}
/*
JobGetOK describes a response with status code 200, with default header values.
OK
*/
type JobGetOK struct {
Payload *models.Job
}
// IsSuccess returns true when this job get o k response has a 2xx status code
func (o *JobGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this job get o k response has a 3xx status code
func (o *JobGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this job get o k response has a 4xx status code
func (o *JobGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this job get o k response has a 5xx status code
func (o *JobGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this job get o k response a status code equal to that given
func (o *JobGetOK) IsCode(code int) bool {
return code == 200
}
func (o *JobGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/jobs/{uuid}][%d] jobGetOK %+v", 200, o.Payload)
}
func (o *JobGetOK) String() string {
return fmt.Sprintf("[GET /cluster/jobs/{uuid}][%d] jobGetOK %+v", 200, o.Payload)
}
func (o *JobGetOK) GetPayload() *models.Job {
return o.Payload
}
func (o *JobGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Job)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewJobGetDefault creates a JobGetDefault with default headers values
func NewJobGetDefault(code int) *JobGetDefault {
return &JobGetDefault{
_statusCode: code,
}
}
/*
JobGetDefault describes a response with status code -1, with default header values.
Error
*/
type JobGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the job get default response
func (o *JobGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this job get default response has a 2xx status code
func (o *JobGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this job get default response has a 3xx status code
func (o *JobGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this job get default response has a 4xx status code
func (o *JobGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this job get default response has a 5xx status code
func (o *JobGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this job get default response a status code equal to that given
func (o *JobGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *JobGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/jobs/{uuid}][%d] job_get default %+v", o._statusCode, o.Payload)
}
func (o *JobGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/jobs/{uuid}][%d] job_get default %+v", o._statusCode, o.Payload)
}
func (o *JobGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *JobGetDefault) 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/cluster/metrocluster_svm_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_svm_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterSvmCollectionGetReader is a Reader for the MetroclusterSvmCollectionGet structure.
type MetroclusterSvmCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterSvmCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMetroclusterSvmCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterSvmCollectionGetDefault(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
}
}
// NewMetroclusterSvmCollectionGetOK creates a MetroclusterSvmCollectionGetOK with default headers values
func NewMetroclusterSvmCollectionGetOK() *MetroclusterSvmCollectionGetOK {
return &MetroclusterSvmCollectionGetOK{}
}
/*
MetroclusterSvmCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MetroclusterSvmCollectionGetOK struct {
Payload *models.MetroclusterSvmResponse
}
// IsSuccess returns true when this metrocluster svm collection get o k response has a 2xx status code
func (o *MetroclusterSvmCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster svm collection get o k response has a 3xx status code
func (o *MetroclusterSvmCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster svm collection get o k response has a 4xx status code
func (o *MetroclusterSvmCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster svm collection get o k response has a 5xx status code
func (o *MetroclusterSvmCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster svm collection get o k response a status code equal to that given
func (o *MetroclusterSvmCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MetroclusterSvmCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/svms][%d] metroclusterSvmCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterSvmCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/svms][%d] metroclusterSvmCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterSvmCollectionGetOK) GetPayload() *models.MetroclusterSvmResponse {
return o.Payload
}
func (o *MetroclusterSvmCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MetroclusterSvmResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterSvmCollectionGetDefault creates a MetroclusterSvmCollectionGetDefault with default headers values
func NewMetroclusterSvmCollectionGetDefault(code int) *MetroclusterSvmCollectionGetDefault {
return &MetroclusterSvmCollectionGetDefault{
_statusCode: code,
}
}
/*
MetroclusterSvmCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type MetroclusterSvmCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the metrocluster svm collection get default response
func (o *MetroclusterSvmCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster svm collection get default response has a 2xx status code
func (o *MetroclusterSvmCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster svm collection get default response has a 3xx status code
func (o *MetroclusterSvmCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster svm collection get default response has a 4xx status code
func (o *MetroclusterSvmCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster svm collection get default response has a 5xx status code
func (o *MetroclusterSvmCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster svm collection get default response a status code equal to that given
func (o *MetroclusterSvmCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterSvmCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/svms][%d] metrocluster_svm_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterSvmCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/svms][%d] metrocluster_svm_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterSvmCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MetroclusterSvmCollectionGetDefault) 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/cluster/cluster_ntp_servers_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_servers_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterNtpServersCreateReader is a Reader for the ClusterNtpServersCreate structure.
type ClusterNtpServersCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterNtpServersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewClusterNtpServersCreateAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterNtpServersCreateDefault(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
}
}
// NewClusterNtpServersCreateAccepted creates a ClusterNtpServersCreateAccepted with default headers values
func NewClusterNtpServersCreateAccepted() *ClusterNtpServersCreateAccepted {
return &ClusterNtpServersCreateAccepted{}
}
/*
ClusterNtpServersCreateAccepted describes a response with status code 202, with default header values.
Accepted
*/
type ClusterNtpServersCreateAccepted struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this cluster ntp servers create accepted response has a 2xx status code
func (o *ClusterNtpServersCreateAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster ntp servers create accepted response has a 3xx status code
func (o *ClusterNtpServersCreateAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster ntp servers create accepted response has a 4xx status code
func (o *ClusterNtpServersCreateAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster ntp servers create accepted response has a 5xx status code
func (o *ClusterNtpServersCreateAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this cluster ntp servers create accepted response a status code equal to that given
func (o *ClusterNtpServersCreateAccepted) IsCode(code int) bool {
return code == 202
}
func (o *ClusterNtpServersCreateAccepted) Error() string {
return fmt.Sprintf("[POST /cluster/ntp/servers][%d] clusterNtpServersCreateAccepted %+v", 202, o.Payload)
}
func (o *ClusterNtpServersCreateAccepted) String() string {
return fmt.Sprintf("[POST /cluster/ntp/servers][%d] clusterNtpServersCreateAccepted %+v", 202, o.Payload)
}
func (o *ClusterNtpServersCreateAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *ClusterNtpServersCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterNtpServersCreateDefault creates a ClusterNtpServersCreateDefault with default headers values
func NewClusterNtpServersCreateDefault(code int) *ClusterNtpServersCreateDefault {
return &ClusterNtpServersCreateDefault{
_statusCode: code,
}
}
/*
ClusterNtpServersCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2097163 | NTP server IPv4 address was invalid. |
| 2097164 | NTP server IPv6 address was invalid. |
| 2097165 | Cannot resolve NTP server name. |
| 2097166 | NTP server address query returned no valid IP addresses. |
| 2097167 | Failed to connect to NTP server. |
| 2097169 | NTP server provided was not synchronized with a clock or another NTP server. |
| 2097174 | NTP server provided had too high of root distance. |
| 2097177 | NTP server provided an invalid stratum. |
| 2097179 | Too many NTP servers have been configured. |
| 2097181 | NTP server address was invalid. It is a special purpose address such as loopback, multicast, or broadcast address. |
| 2097182 | NTP server address was invalid. The address is neither an IPv4 or IPv6. |
| 2097183 | NTP symmetric key authentication cannot be used for a node not in a cluster. |
| 2097185 | NTP key authentication failed for the provided key. |
| 2097193 | An unknown NTP key was provided. |
*/
type ClusterNtpServersCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster ntp servers create default response
func (o *ClusterNtpServersCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster ntp servers create default response has a 2xx status code
func (o *ClusterNtpServersCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster ntp servers create default response has a 3xx status code
func (o *ClusterNtpServersCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster ntp servers create default response has a 4xx status code
func (o *ClusterNtpServersCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster ntp servers create default response has a 5xx status code
func (o *ClusterNtpServersCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster ntp servers create default response a status code equal to that given
func (o *ClusterNtpServersCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterNtpServersCreateDefault) Error() string {
return fmt.Sprintf("[POST /cluster/ntp/servers][%d] cluster_ntp_servers_create default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpServersCreateDefault) String() string {
return fmt.Sprintf("[POST /cluster/ntp/servers][%d] cluster_ntp_servers_create default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpServersCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterNtpServersCreateDefault) 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/cluster/metrocluster_dr_group_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_dr_group_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterDrGroupCreateReader is a Reader for the MetroclusterDrGroupCreate structure.
type MetroclusterDrGroupCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterDrGroupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewMetroclusterDrGroupCreateAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterDrGroupCreateDefault(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
}
}
// NewMetroclusterDrGroupCreateAccepted creates a MetroclusterDrGroupCreateAccepted with default headers values
func NewMetroclusterDrGroupCreateAccepted() *MetroclusterDrGroupCreateAccepted {
return &MetroclusterDrGroupCreateAccepted{}
}
/*
MetroclusterDrGroupCreateAccepted describes a response with status code 202, with default header values.
Accepted
*/
type MetroclusterDrGroupCreateAccepted struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this metrocluster dr group create accepted response has a 2xx status code
func (o *MetroclusterDrGroupCreateAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster dr group create accepted response has a 3xx status code
func (o *MetroclusterDrGroupCreateAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster dr group create accepted response has a 4xx status code
func (o *MetroclusterDrGroupCreateAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster dr group create accepted response has a 5xx status code
func (o *MetroclusterDrGroupCreateAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster dr group create accepted response a status code equal to that given
func (o *MetroclusterDrGroupCreateAccepted) IsCode(code int) bool {
return code == 202
}
func (o *MetroclusterDrGroupCreateAccepted) Error() string {
return fmt.Sprintf("[POST /cluster/metrocluster/dr-groups][%d] metroclusterDrGroupCreateAccepted %+v", 202, o.Payload)
}
func (o *MetroclusterDrGroupCreateAccepted) String() string {
return fmt.Sprintf("[POST /cluster/metrocluster/dr-groups][%d] metroclusterDrGroupCreateAccepted %+v", 202, o.Payload)
}
func (o *MetroclusterDrGroupCreateAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *MetroclusterDrGroupCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterDrGroupCreateDefault creates a MetroclusterDrGroupCreateDefault with default headers values
func NewMetroclusterDrGroupCreateDefault(code int) *MetroclusterDrGroupCreateDefault {
return &MetroclusterDrGroupCreateDefault{
_statusCode: code,
}
}
/*
MetroclusterDrGroupCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2425734 | An internal error occurred. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
| 2432833 | Operation is already running. |
| 2432836 | There are not enough disks in Pool1. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
| 2432840 | Configuring DR Groups |
| 2432841 | Generating IP addresses |
| 2432844 | Checking remote storage pool |
| 2432845 | Mirroring aggregates |
| 2432846 | Configuring MetroCluster and DR mirroring |
| 2432857 | Adding new MetroCluster DR Group |
| 2432858 | MetroCluster DR Group setup done |
*/
type MetroclusterDrGroupCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the metrocluster dr group create default response
func (o *MetroclusterDrGroupCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster dr group create default response has a 2xx status code
func (o *MetroclusterDrGroupCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster dr group create default response has a 3xx status code
func (o *MetroclusterDrGroupCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster dr group create default response has a 4xx status code
func (o *MetroclusterDrGroupCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster dr group create default response has a 5xx status code
func (o *MetroclusterDrGroupCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster dr group create default response a status code equal to that given
func (o *MetroclusterDrGroupCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterDrGroupCreateDefault) Error() string {
return fmt.Sprintf("[POST /cluster/metrocluster/dr-groups][%d] metrocluster_dr_group_create default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterDrGroupCreateDefault) String() string {
return fmt.Sprintf("[POST /cluster/metrocluster/dr-groups][%d] metrocluster_dr_group_create default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterDrGroupCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MetroclusterDrGroupCreateDefault) 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/cluster/counter_table_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/counter_table_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewCounterTableCollectionGetParams creates a new CounterTableCollectionGetParams 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 NewCounterTableCollectionGetParams() *CounterTableCollectionGetParams {
return &CounterTableCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewCounterTableCollectionGetParamsWithTimeout creates a new CounterTableCollectionGetParams object
// with the ability to set a timeout on a request.
func NewCounterTableCollectionGetParamsWithTimeout(timeout time.Duration) *CounterTableCollectionGetParams {
return &CounterTableCollectionGetParams{
timeout: timeout,
}
}
// NewCounterTableCollectionGetParamsWithContext creates a new CounterTableCollectionGetParams object
// with the ability to set a context for a request.
func NewCounterTableCollectionGetParamsWithContext(ctx context.Context) *CounterTableCollectionGetParams {
return &CounterTableCollectionGetParams{
Context: ctx,
}
}
// NewCounterTableCollectionGetParamsWithHTTPClient creates a new CounterTableCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewCounterTableCollectionGetParamsWithHTTPClient(client *http.Client) *CounterTableCollectionGetParams {
return &CounterTableCollectionGetParams{
HTTPClient: client,
}
}
/*
CounterTableCollectionGetParams contains all the parameters to send to the API endpoint
for the counter table collection get operation.
Typically these are written to a http.Request.
*/
type CounterTableCollectionGetParams struct {
/* CounterSchemasDenominatorName.
Filter by counter_schemas.denominator.name
*/
CounterSchemasDenominatorName *string
/* CounterSchemasDescription.
Filter by counter_schemas.description
*/
CounterSchemasDescription *string
/* CounterSchemasName.
Filter by counter_schemas.name
*/
CounterSchemasName *string
/* CounterSchemasType.
Filter by counter_schemas.type
*/
CounterSchemasType *string
/* CounterSchemasUnit.
Filter by counter_schemas.unit
*/
CounterSchemasUnit *string
/* Description.
Filter by description
*/
Description *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
/* 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 counter table collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CounterTableCollectionGetParams) WithDefaults() *CounterTableCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the counter table collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CounterTableCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := CounterTableCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithTimeout(timeout time.Duration) *CounterTableCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithContext(ctx context.Context) *CounterTableCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithHTTPClient(client *http.Client) *CounterTableCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCounterSchemasDenominatorName adds the counterSchemasDenominatorName to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithCounterSchemasDenominatorName(counterSchemasDenominatorName *string) *CounterTableCollectionGetParams {
o.SetCounterSchemasDenominatorName(counterSchemasDenominatorName)
return o
}
// SetCounterSchemasDenominatorName adds the counterSchemasDenominatorName to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetCounterSchemasDenominatorName(counterSchemasDenominatorName *string) {
o.CounterSchemasDenominatorName = counterSchemasDenominatorName
}
// WithCounterSchemasDescription adds the counterSchemasDescription to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithCounterSchemasDescription(counterSchemasDescription *string) *CounterTableCollectionGetParams {
o.SetCounterSchemasDescription(counterSchemasDescription)
return o
}
// SetCounterSchemasDescription adds the counterSchemasDescription to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetCounterSchemasDescription(counterSchemasDescription *string) {
o.CounterSchemasDescription = counterSchemasDescription
}
// WithCounterSchemasName adds the counterSchemasName to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithCounterSchemasName(counterSchemasName *string) *CounterTableCollectionGetParams {
o.SetCounterSchemasName(counterSchemasName)
return o
}
// SetCounterSchemasName adds the counterSchemasName to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetCounterSchemasName(counterSchemasName *string) {
o.CounterSchemasName = counterSchemasName
}
// WithCounterSchemasType adds the counterSchemasType to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithCounterSchemasType(counterSchemasType *string) *CounterTableCollectionGetParams {
o.SetCounterSchemasType(counterSchemasType)
return o
}
// SetCounterSchemasType adds the counterSchemasType to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetCounterSchemasType(counterSchemasType *string) {
o.CounterSchemasType = counterSchemasType
}
// WithCounterSchemasUnit adds the counterSchemasUnit to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithCounterSchemasUnit(counterSchemasUnit *string) *CounterTableCollectionGetParams {
o.SetCounterSchemasUnit(counterSchemasUnit)
return o
}
// SetCounterSchemasUnit adds the counterSchemasUnit to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetCounterSchemasUnit(counterSchemasUnit *string) {
o.CounterSchemasUnit = counterSchemasUnit
}
// WithDescription adds the description to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithDescription(description *string) *CounterTableCollectionGetParams {
o.SetDescription(description)
return o
}
// SetDescription adds the description to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetDescription(description *string) {
o.Description = description
}
// WithFields adds the fields to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithFields(fields []string) *CounterTableCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithMaxRecords(maxRecords *int64) *CounterTableCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithName(name *string) *CounterTableCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithOrderBy adds the orderBy to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithOrderBy(orderBy []string) *CounterTableCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithReturnRecords(returnRecords *bool) *CounterTableCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the counter table collection get params
func (o *CounterTableCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *CounterTableCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the counter table collection get params
func (o *CounterTableCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *CounterTableCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CounterSchemasDenominatorName != nil {
// query param counter_schemas.denominator.name
var qrCounterSchemasDenominatorName string
if o.CounterSchemasDenominatorName != nil {
qrCounterSchemasDenominatorName = *o.CounterSchemasDenominatorName
}
qCounterSchemasDenominatorName := qrCounterSchemasDenominatorName
if qCounterSchemasDenominatorName != "" {
if err := r.SetQueryParam("counter_schemas.denominator.name", qCounterSchemasDenominatorName); err != nil {
return err
}
}
}
if o.CounterSchemasDescription != nil {
// query param counter_schemas.description
var qrCounterSchemasDescription string
if o.CounterSchemasDescription != nil {
qrCounterSchemasDescription = *o.CounterSchemasDescription
}
qCounterSchemasDescription := qrCounterSchemasDescription
if qCounterSchemasDescription != "" {
if err := r.SetQueryParam("counter_schemas.description", qCounterSchemasDescription); err != nil {
return err
}
}
}
if o.CounterSchemasName != nil {
// query param counter_schemas.name
var qrCounterSchemasName string
if o.CounterSchemasName != nil {
qrCounterSchemasName = *o.CounterSchemasName
}
qCounterSchemasName := qrCounterSchemasName
if qCounterSchemasName != "" {
if err := r.SetQueryParam("counter_schemas.name", qCounterSchemasName); err != nil {
return err
}
}
}
if o.CounterSchemasType != nil {
// query param counter_schemas.type
var qrCounterSchemasType string
if o.CounterSchemasType != nil {
qrCounterSchemasType = *o.CounterSchemasType
}
qCounterSchemasType := qrCounterSchemasType
if qCounterSchemasType != "" {
if err := r.SetQueryParam("counter_schemas.type", qCounterSchemasType); err != nil {
return err
}
}
}
if o.CounterSchemasUnit != nil {
// query param counter_schemas.unit
var qrCounterSchemasUnit string
if o.CounterSchemasUnit != nil {
qrCounterSchemasUnit = *o.CounterSchemasUnit
}
qCounterSchemasUnit := qrCounterSchemasUnit
if qCounterSchemasUnit != "" {
if err := r.SetQueryParam("counter_schemas.unit", qCounterSchemasUnit); err != nil {
return err
}
}
}
if o.Description != nil {
// query param description
var qrDescription string
if o.Description != nil {
qrDescription = *o.Description
}
qDescription := qrDescription
if qDescription != "" {
if err := r.SetQueryParam("description", qDescription); 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.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
}
// bindParamCounterTableCollectionGet binds the parameter fields
func (o *CounterTableCollectionGetParams) 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
}
// bindParamCounterTableCollectionGet binds the parameter order_by
func (o *CounterTableCollectionGetParams) 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/cluster/capacity_pool_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/capacity_pool_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewCapacityPoolGetParams creates a new CapacityPoolGetParams 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 NewCapacityPoolGetParams() *CapacityPoolGetParams {
return &CapacityPoolGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewCapacityPoolGetParamsWithTimeout creates a new CapacityPoolGetParams object
// with the ability to set a timeout on a request.
func NewCapacityPoolGetParamsWithTimeout(timeout time.Duration) *CapacityPoolGetParams {
return &CapacityPoolGetParams{
timeout: timeout,
}
}
// NewCapacityPoolGetParamsWithContext creates a new CapacityPoolGetParams object
// with the ability to set a context for a request.
func NewCapacityPoolGetParamsWithContext(ctx context.Context) *CapacityPoolGetParams {
return &CapacityPoolGetParams{
Context: ctx,
}
}
// NewCapacityPoolGetParamsWithHTTPClient creates a new CapacityPoolGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewCapacityPoolGetParamsWithHTTPClient(client *http.Client) *CapacityPoolGetParams {
return &CapacityPoolGetParams{
HTTPClient: client,
}
}
/*
CapacityPoolGetParams contains all the parameters to send to the API endpoint
for the capacity pool get operation.
Typically these are written to a http.Request.
*/
type CapacityPoolGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* LicenseManagerUUID.
Filter by license_manager.uuid
*/
LicenseManagerUUID *string
/* NodesNodeName.
Filter by nodes.node.name
*/
NodesNodeName *string
/* NodesNodeUUID.
Filter by nodes.node.uuid
*/
NodesNodeUUID *string
/* NodesUsedSize.
Filter by nodes.used_size
*/
NodesUsedSize *int64
/* SerialNumber.
Serial number of the capacity pool license.
*/
SerialNumber string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the capacity pool get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CapacityPoolGetParams) WithDefaults() *CapacityPoolGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the capacity pool get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CapacityPoolGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the capacity pool get params
func (o *CapacityPoolGetParams) WithTimeout(timeout time.Duration) *CapacityPoolGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the capacity pool get params
func (o *CapacityPoolGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the capacity pool get params
func (o *CapacityPoolGetParams) WithContext(ctx context.Context) *CapacityPoolGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the capacity pool get params
func (o *CapacityPoolGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the capacity pool get params
func (o *CapacityPoolGetParams) WithHTTPClient(client *http.Client) *CapacityPoolGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the capacity pool get params
func (o *CapacityPoolGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the capacity pool get params
func (o *CapacityPoolGetParams) WithFields(fields []string) *CapacityPoolGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the capacity pool get params
func (o *CapacityPoolGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithLicenseManagerUUID adds the licenseManagerUUID to the capacity pool get params
func (o *CapacityPoolGetParams) WithLicenseManagerUUID(licenseManagerUUID *string) *CapacityPoolGetParams {
o.SetLicenseManagerUUID(licenseManagerUUID)
return o
}
// SetLicenseManagerUUID adds the licenseManagerUuid to the capacity pool get params
func (o *CapacityPoolGetParams) SetLicenseManagerUUID(licenseManagerUUID *string) {
o.LicenseManagerUUID = licenseManagerUUID
}
// WithNodesNodeName adds the nodesNodeName to the capacity pool get params
func (o *CapacityPoolGetParams) WithNodesNodeName(nodesNodeName *string) *CapacityPoolGetParams {
o.SetNodesNodeName(nodesNodeName)
return o
}
// SetNodesNodeName adds the nodesNodeName to the capacity pool get params
func (o *CapacityPoolGetParams) SetNodesNodeName(nodesNodeName *string) {
o.NodesNodeName = nodesNodeName
}
// WithNodesNodeUUID adds the nodesNodeUUID to the capacity pool get params
func (o *CapacityPoolGetParams) WithNodesNodeUUID(nodesNodeUUID *string) *CapacityPoolGetParams {
o.SetNodesNodeUUID(nodesNodeUUID)
return o
}
// SetNodesNodeUUID adds the nodesNodeUuid to the capacity pool get params
func (o *CapacityPoolGetParams) SetNodesNodeUUID(nodesNodeUUID *string) {
o.NodesNodeUUID = nodesNodeUUID
}
// WithNodesUsedSize adds the nodesUsedSize to the capacity pool get params
func (o *CapacityPoolGetParams) WithNodesUsedSize(nodesUsedSize *int64) *CapacityPoolGetParams {
o.SetNodesUsedSize(nodesUsedSize)
return o
}
// SetNodesUsedSize adds the nodesUsedSize to the capacity pool get params
func (o *CapacityPoolGetParams) SetNodesUsedSize(nodesUsedSize *int64) {
o.NodesUsedSize = nodesUsedSize
}
// WithSerialNumber adds the serialNumber to the capacity pool get params
func (o *CapacityPoolGetParams) WithSerialNumber(serialNumber string) *CapacityPoolGetParams {
o.SetSerialNumber(serialNumber)
return o
}
// SetSerialNumber adds the serialNumber to the capacity pool get params
func (o *CapacityPoolGetParams) SetSerialNumber(serialNumber string) {
o.SerialNumber = serialNumber
}
// WriteToRequest writes these params to a swagger request
func (o *CapacityPoolGetParams) 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.LicenseManagerUUID != nil {
// query param license_manager.uuid
var qrLicenseManagerUUID string
if o.LicenseManagerUUID != nil {
qrLicenseManagerUUID = *o.LicenseManagerUUID
}
qLicenseManagerUUID := qrLicenseManagerUUID
if qLicenseManagerUUID != "" {
if err := r.SetQueryParam("license_manager.uuid", qLicenseManagerUUID); err != nil {
return err
}
}
}
if o.NodesNodeName != nil {
// query param nodes.node.name
var qrNodesNodeName string
if o.NodesNodeName != nil {
qrNodesNodeName = *o.NodesNodeName
}
qNodesNodeName := qrNodesNodeName
if qNodesNodeName != "" {
if err := r.SetQueryParam("nodes.node.name", qNodesNodeName); err != nil {
return err
}
}
}
if o.NodesNodeUUID != nil {
// query param nodes.node.uuid
var qrNodesNodeUUID string
if o.NodesNodeUUID != nil {
qrNodesNodeUUID = *o.NodesNodeUUID
}
qNodesNodeUUID := qrNodesNodeUUID
if qNodesNodeUUID != "" {
if err := r.SetQueryParam("nodes.node.uuid", qNodesNodeUUID); err != nil {
return err
}
}
}
if o.NodesUsedSize != nil {
// query param nodes.used_size
var qrNodesUsedSize int64
if o.NodesUsedSize != nil {
qrNodesUsedSize = *o.NodesUsedSize
}
qNodesUsedSize := swag.FormatInt64(qrNodesUsedSize)
if qNodesUsedSize != "" {
if err := r.SetQueryParam("nodes.used_size", qNodesUsedSize); err != nil {
return err
}
}
}
// path param serial_number
if err := r.SetPathParam("serial_number", o.SerialNumber); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamCapacityPoolGet binds the parameter fields
func (o *CapacityPoolGetParams) 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/cluster/license_manager_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/license_manager_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewLicenseManagerModifyParams creates a new LicenseManagerModifyParams 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 NewLicenseManagerModifyParams() *LicenseManagerModifyParams {
return &LicenseManagerModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewLicenseManagerModifyParamsWithTimeout creates a new LicenseManagerModifyParams object
// with the ability to set a timeout on a request.
func NewLicenseManagerModifyParamsWithTimeout(timeout time.Duration) *LicenseManagerModifyParams {
return &LicenseManagerModifyParams{
timeout: timeout,
}
}
// NewLicenseManagerModifyParamsWithContext creates a new LicenseManagerModifyParams object
// with the ability to set a context for a request.
func NewLicenseManagerModifyParamsWithContext(ctx context.Context) *LicenseManagerModifyParams {
return &LicenseManagerModifyParams{
Context: ctx,
}
}
// NewLicenseManagerModifyParamsWithHTTPClient creates a new LicenseManagerModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewLicenseManagerModifyParamsWithHTTPClient(client *http.Client) *LicenseManagerModifyParams {
return &LicenseManagerModifyParams{
HTTPClient: client,
}
}
/*
LicenseManagerModifyParams contains all the parameters to send to the API endpoint
for the license manager modify operation.
Typically these are written to a http.Request.
*/
type LicenseManagerModifyParams struct {
/* Info.
Request specification
*/
Info *models.LicenseManager
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
// UUID.
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the license manager modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LicenseManagerModifyParams) WithDefaults() *LicenseManagerModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the license manager modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LicenseManagerModifyParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := LicenseManagerModifyParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the license manager modify params
func (o *LicenseManagerModifyParams) WithTimeout(timeout time.Duration) *LicenseManagerModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the license manager modify params
func (o *LicenseManagerModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the license manager modify params
func (o *LicenseManagerModifyParams) WithContext(ctx context.Context) *LicenseManagerModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the license manager modify params
func (o *LicenseManagerModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the license manager modify params
func (o *LicenseManagerModifyParams) WithHTTPClient(client *http.Client) *LicenseManagerModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the license manager modify params
func (o *LicenseManagerModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the license manager modify params
func (o *LicenseManagerModifyParams) WithInfo(info *models.LicenseManager) *LicenseManagerModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the license manager modify params
func (o *LicenseManagerModifyParams) SetInfo(info *models.LicenseManager) {
o.Info = info
}
// WithReturnTimeout adds the returnTimeout to the license manager modify params
func (o *LicenseManagerModifyParams) WithReturnTimeout(returnTimeout *int64) *LicenseManagerModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the license manager modify params
func (o *LicenseManagerModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the license manager modify params
func (o *LicenseManagerModifyParams) WithUUID(uuid string) *LicenseManagerModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the license manager modify params
func (o *LicenseManagerModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LicenseManagerModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_packages_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_packages_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwarePackagesCollectionGetParams creates a new SoftwarePackagesCollectionGetParams 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 NewSoftwarePackagesCollectionGetParams() *SoftwarePackagesCollectionGetParams {
return &SoftwarePackagesCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwarePackagesCollectionGetParamsWithTimeout creates a new SoftwarePackagesCollectionGetParams object
// with the ability to set a timeout on a request.
func NewSoftwarePackagesCollectionGetParamsWithTimeout(timeout time.Duration) *SoftwarePackagesCollectionGetParams {
return &SoftwarePackagesCollectionGetParams{
timeout: timeout,
}
}
// NewSoftwarePackagesCollectionGetParamsWithContext creates a new SoftwarePackagesCollectionGetParams object
// with the ability to set a context for a request.
func NewSoftwarePackagesCollectionGetParamsWithContext(ctx context.Context) *SoftwarePackagesCollectionGetParams {
return &SoftwarePackagesCollectionGetParams{
Context: ctx,
}
}
// NewSoftwarePackagesCollectionGetParamsWithHTTPClient creates a new SoftwarePackagesCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwarePackagesCollectionGetParamsWithHTTPClient(client *http.Client) *SoftwarePackagesCollectionGetParams {
return &SoftwarePackagesCollectionGetParams{
HTTPClient: client,
}
}
/*
SoftwarePackagesCollectionGetParams contains all the parameters to send to the API endpoint
for the software packages collection get operation.
Typically these are written to a http.Request.
*/
type SoftwarePackagesCollectionGetParams struct {
/* CreateTime.
Filter by create_time
*/
CreateTime *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* Version.
Filter by version
*/
Version *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the software packages collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackagesCollectionGetParams) WithDefaults() *SoftwarePackagesCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software packages collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackagesCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := SoftwarePackagesCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithTimeout(timeout time.Duration) *SoftwarePackagesCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithContext(ctx context.Context) *SoftwarePackagesCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithHTTPClient(client *http.Client) *SoftwarePackagesCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCreateTime adds the createTime to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithCreateTime(createTime *string) *SoftwarePackagesCollectionGetParams {
o.SetCreateTime(createTime)
return o
}
// SetCreateTime adds the createTime to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetCreateTime(createTime *string) {
o.CreateTime = createTime
}
// WithFields adds the fields to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithFields(fields []string) *SoftwarePackagesCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithMaxRecords(maxRecords *int64) *SoftwarePackagesCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithOrderBy(orderBy []string) *SoftwarePackagesCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithReturnRecords(returnRecords *bool) *SoftwarePackagesCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SoftwarePackagesCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithVersion adds the version to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) WithVersion(version *string) *SoftwarePackagesCollectionGetParams {
o.SetVersion(version)
return o
}
// SetVersion adds the version to the software packages collection get params
func (o *SoftwarePackagesCollectionGetParams) SetVersion(version *string) {
o.Version = version
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwarePackagesCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CreateTime != nil {
// query param create_time
var qrCreateTime string
if o.CreateTime != nil {
qrCreateTime = *o.CreateTime
}
qCreateTime := qrCreateTime
if qCreateTime != "" {
if err := r.SetQueryParam("create_time", qCreateTime); err != nil {
return err
}
}
}
if o.Fields != nil {
// binding items for fields
joinedFields := o.bindParamFields(reg)
// query array param fields
if err := r.SetQueryParam("fields", joinedFields...); err != nil {
return err
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.Version != nil {
// query param version
var qrVersion string
if o.Version != nil {
qrVersion = *o.Version
}
qVersion := qrVersion
if qVersion != "" {
if err := r.SetQueryParam("version", qVersion); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSoftwarePackagesCollectionGet binds the parameter fields
func (o *SoftwarePackagesCollectionGetParams) 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
}
// bindParamSoftwarePackagesCollectionGet binds the parameter order_by
func (o *SoftwarePackagesCollectionGetParams) 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/cluster/job_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/job_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// JobCollectionGetReader is a Reader for the JobCollectionGet structure.
type JobCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *JobCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewJobCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewJobCollectionGetDefault(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
}
}
// NewJobCollectionGetOK creates a JobCollectionGetOK with default headers values
func NewJobCollectionGetOK() *JobCollectionGetOK {
return &JobCollectionGetOK{}
}
/*
JobCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type JobCollectionGetOK struct {
Payload *models.JobResponse
}
// IsSuccess returns true when this job collection get o k response has a 2xx status code
func (o *JobCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this job collection get o k response has a 3xx status code
func (o *JobCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this job collection get o k response has a 4xx status code
func (o *JobCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this job collection get o k response has a 5xx status code
func (o *JobCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this job collection get o k response a status code equal to that given
func (o *JobCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *JobCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/jobs][%d] jobCollectionGetOK %+v", 200, o.Payload)
}
func (o *JobCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/jobs][%d] jobCollectionGetOK %+v", 200, o.Payload)
}
func (o *JobCollectionGetOK) GetPayload() *models.JobResponse {
return o.Payload
}
func (o *JobCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewJobCollectionGetDefault creates a JobCollectionGetDefault with default headers values
func NewJobCollectionGetDefault(code int) *JobCollectionGetDefault {
return &JobCollectionGetDefault{
_statusCode: code,
}
}
/*
JobCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type JobCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the job collection get default response
func (o *JobCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this job collection get default response has a 2xx status code
func (o *JobCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this job collection get default response has a 3xx status code
func (o *JobCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this job collection get default response has a 4xx status code
func (o *JobCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this job collection get default response has a 5xx status code
func (o *JobCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this job collection get default response a status code equal to that given
func (o *JobCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *JobCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/jobs][%d] job_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *JobCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/jobs][%d] job_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *JobCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *JobCollectionGetDefault) 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/cluster/schedule_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/schedule_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ScheduleCollectionGetReader is a Reader for the ScheduleCollectionGet structure.
type ScheduleCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ScheduleCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewScheduleCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewScheduleCollectionGetDefault(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
}
}
// NewScheduleCollectionGetOK creates a ScheduleCollectionGetOK with default headers values
func NewScheduleCollectionGetOK() *ScheduleCollectionGetOK {
return &ScheduleCollectionGetOK{}
}
/*
ScheduleCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type ScheduleCollectionGetOK struct {
Payload *models.ScheduleResponse
}
// IsSuccess returns true when this schedule collection get o k response has a 2xx status code
func (o *ScheduleCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this schedule collection get o k response has a 3xx status code
func (o *ScheduleCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this schedule collection get o k response has a 4xx status code
func (o *ScheduleCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this schedule collection get o k response has a 5xx status code
func (o *ScheduleCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this schedule collection get o k response a status code equal to that given
func (o *ScheduleCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *ScheduleCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/schedules][%d] scheduleCollectionGetOK %+v", 200, o.Payload)
}
func (o *ScheduleCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/schedules][%d] scheduleCollectionGetOK %+v", 200, o.Payload)
}
func (o *ScheduleCollectionGetOK) GetPayload() *models.ScheduleResponse {
return o.Payload
}
func (o *ScheduleCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ScheduleResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewScheduleCollectionGetDefault creates a ScheduleCollectionGetDefault with default headers values
func NewScheduleCollectionGetDefault(code int) *ScheduleCollectionGetDefault {
return &ScheduleCollectionGetDefault{
_statusCode: code,
}
}
/*
ScheduleCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 459760 | The schedule specified is not a valid schedule. |
*/
type ScheduleCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the schedule collection get default response
func (o *ScheduleCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this schedule collection get default response has a 2xx status code
func (o *ScheduleCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this schedule collection get default response has a 3xx status code
func (o *ScheduleCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this schedule collection get default response has a 4xx status code
func (o *ScheduleCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this schedule collection get default response has a 5xx status code
func (o *ScheduleCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this schedule collection get default response a status code equal to that given
func (o *ScheduleCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ScheduleCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/schedules][%d] schedule_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/schedules][%d] schedule_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ScheduleCollectionGetDefault) 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/cluster/cluster_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterModifyParams creates a new ClusterModifyParams 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 NewClusterModifyParams() *ClusterModifyParams {
return &ClusterModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterModifyParamsWithTimeout creates a new ClusterModifyParams object
// with the ability to set a timeout on a request.
func NewClusterModifyParamsWithTimeout(timeout time.Duration) *ClusterModifyParams {
return &ClusterModifyParams{
timeout: timeout,
}
}
// NewClusterModifyParamsWithContext creates a new ClusterModifyParams object
// with the ability to set a context for a request.
func NewClusterModifyParamsWithContext(ctx context.Context) *ClusterModifyParams {
return &ClusterModifyParams{
Context: ctx,
}
}
// NewClusterModifyParamsWithHTTPClient creates a new ClusterModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterModifyParamsWithHTTPClient(client *http.Client) *ClusterModifyParams {
return &ClusterModifyParams{
HTTPClient: client,
}
}
/*
ClusterModifyParams contains all the parameters to send to the API endpoint
for the cluster modify operation.
Typically these are written to a http.Request.
*/
type ClusterModifyParams struct {
/* Info.
Cluster information
*/
Info *models.Cluster
/* 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 cluster modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterModifyParams) WithDefaults() *ClusterModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterModifyParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := ClusterModifyParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the cluster modify params
func (o *ClusterModifyParams) WithTimeout(timeout time.Duration) *ClusterModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster modify params
func (o *ClusterModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster modify params
func (o *ClusterModifyParams) WithContext(ctx context.Context) *ClusterModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster modify params
func (o *ClusterModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster modify params
func (o *ClusterModifyParams) WithHTTPClient(client *http.Client) *ClusterModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster modify params
func (o *ClusterModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the cluster modify params
func (o *ClusterModifyParams) WithInfo(info *models.Cluster) *ClusterModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the cluster modify params
func (o *ClusterModifyParams) SetInfo(info *models.Cluster) {
o.Info = info
}
// WithReturnTimeout adds the returnTimeout to the cluster modify params
func (o *ClusterModifyParams) WithReturnTimeout(returnTimeout *int64) *ClusterModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the cluster modify params
func (o *ClusterModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
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/cluster/metrocluster_dr_group_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_dr_group_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterDrGroupCollectionGetReader is a Reader for the MetroclusterDrGroupCollectionGet structure.
type MetroclusterDrGroupCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterDrGroupCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMetroclusterDrGroupCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterDrGroupCollectionGetDefault(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
}
}
// NewMetroclusterDrGroupCollectionGetOK creates a MetroclusterDrGroupCollectionGetOK with default headers values
func NewMetroclusterDrGroupCollectionGetOK() *MetroclusterDrGroupCollectionGetOK {
return &MetroclusterDrGroupCollectionGetOK{}
}
/*
MetroclusterDrGroupCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MetroclusterDrGroupCollectionGetOK struct {
Payload *models.MetroclusterDrGroupResponse
}
// IsSuccess returns true when this metrocluster dr group collection get o k response has a 2xx status code
func (o *MetroclusterDrGroupCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster dr group collection get o k response has a 3xx status code
func (o *MetroclusterDrGroupCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster dr group collection get o k response has a 4xx status code
func (o *MetroclusterDrGroupCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster dr group collection get o k response has a 5xx status code
func (o *MetroclusterDrGroupCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster dr group collection get o k response a status code equal to that given
func (o *MetroclusterDrGroupCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MetroclusterDrGroupCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/dr-groups][%d] metroclusterDrGroupCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterDrGroupCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/dr-groups][%d] metroclusterDrGroupCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterDrGroupCollectionGetOK) GetPayload() *models.MetroclusterDrGroupResponse {
return o.Payload
}
func (o *MetroclusterDrGroupCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MetroclusterDrGroupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterDrGroupCollectionGetDefault creates a MetroclusterDrGroupCollectionGetDefault with default headers values
func NewMetroclusterDrGroupCollectionGetDefault(code int) *MetroclusterDrGroupCollectionGetDefault {
return &MetroclusterDrGroupCollectionGetDefault{
_statusCode: code,
}
}
/*
MetroclusterDrGroupCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2425734 | An internal error occurred. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
| 2427132 | MetroCluster is not configured on this cluster. |
*/
type MetroclusterDrGroupCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the metrocluster dr group collection get default response
func (o *MetroclusterDrGroupCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster dr group collection get default response has a 2xx status code
func (o *MetroclusterDrGroupCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster dr group collection get default response has a 3xx status code
func (o *MetroclusterDrGroupCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster dr group collection get default response has a 4xx status code
func (o *MetroclusterDrGroupCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster dr group collection get default response has a 5xx status code
func (o *MetroclusterDrGroupCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster dr group collection get default response a status code equal to that given
func (o *MetroclusterDrGroupCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterDrGroupCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/dr-groups][%d] metrocluster_dr_group_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterDrGroupCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/dr-groups][%d] metrocluster_dr_group_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterDrGroupCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MetroclusterDrGroupCollectionGetDefault) 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/cluster/software_upload_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_upload_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwareUploadParams creates a new SoftwareUploadParams 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 NewSoftwareUploadParams() *SoftwareUploadParams {
return &SoftwareUploadParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwareUploadParamsWithTimeout creates a new SoftwareUploadParams object
// with the ability to set a timeout on a request.
func NewSoftwareUploadParamsWithTimeout(timeout time.Duration) *SoftwareUploadParams {
return &SoftwareUploadParams{
timeout: timeout,
}
}
// NewSoftwareUploadParamsWithContext creates a new SoftwareUploadParams object
// with the ability to set a context for a request.
func NewSoftwareUploadParamsWithContext(ctx context.Context) *SoftwareUploadParams {
return &SoftwareUploadParams{
Context: ctx,
}
}
// NewSoftwareUploadParamsWithHTTPClient creates a new SoftwareUploadParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwareUploadParamsWithHTTPClient(client *http.Client) *SoftwareUploadParams {
return &SoftwareUploadParams{
HTTPClient: client,
}
}
/*
SoftwareUploadParams contains all the parameters to send to the API endpoint
for the software upload operation.
Typically these are written to a http.Request.
*/
type SoftwareUploadParams struct {
/* File.
Info specification
*/
File runtime.NamedReadCloser
/* 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 software upload params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwareUploadParams) WithDefaults() *SoftwareUploadParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software upload params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwareUploadParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := SoftwareUploadParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the software upload params
func (o *SoftwareUploadParams) WithTimeout(timeout time.Duration) *SoftwareUploadParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software upload params
func (o *SoftwareUploadParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software upload params
func (o *SoftwareUploadParams) WithContext(ctx context.Context) *SoftwareUploadParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software upload params
func (o *SoftwareUploadParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software upload params
func (o *SoftwareUploadParams) WithHTTPClient(client *http.Client) *SoftwareUploadParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software upload params
func (o *SoftwareUploadParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFile adds the file to the software upload params
func (o *SoftwareUploadParams) WithFile(file runtime.NamedReadCloser) *SoftwareUploadParams {
o.SetFile(file)
return o
}
// SetFile adds the file to the software upload params
func (o *SoftwareUploadParams) SetFile(file runtime.NamedReadCloser) {
o.File = file
}
// WithReturnRecords adds the returnRecords to the software upload params
func (o *SoftwareUploadParams) WithReturnRecords(returnRecords *bool) *SoftwareUploadParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the software upload params
func (o *SoftwareUploadParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the software upload params
func (o *SoftwareUploadParams) WithReturnTimeout(returnTimeout *int64) *SoftwareUploadParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the software upload params
func (o *SoftwareUploadParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwareUploadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.File != nil {
if o.File != nil {
// form file param file
if err := r.SetFileParam("file", o.File); 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/cluster/web_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/web_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// WebGetReader is a Reader for the WebGet structure.
type WebGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *WebGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewWebGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewWebGetDefault(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
}
}
// NewWebGetOK creates a WebGetOK with default headers values
func NewWebGetOK() *WebGetOK {
return &WebGetOK{}
}
/*
WebGetOK describes a response with status code 200, with default header values.
OK
*/
type WebGetOK struct {
Payload *models.Web
}
// IsSuccess returns true when this web get o k response has a 2xx status code
func (o *WebGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this web get o k response has a 3xx status code
func (o *WebGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this web get o k response has a 4xx status code
func (o *WebGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this web get o k response has a 5xx status code
func (o *WebGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this web get o k response a status code equal to that given
func (o *WebGetOK) IsCode(code int) bool {
return code == 200
}
func (o *WebGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/web][%d] webGetOK %+v", 200, o.Payload)
}
func (o *WebGetOK) String() string {
return fmt.Sprintf("[GET /cluster/web][%d] webGetOK %+v", 200, o.Payload)
}
func (o *WebGetOK) GetPayload() *models.Web {
return o.Payload
}
func (o *WebGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Web)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewWebGetDefault creates a WebGetDefault with default headers values
func NewWebGetDefault(code int) *WebGetDefault {
return &WebGetDefault{
_statusCode: code,
}
}
/*
WebGetDefault describes a response with status code -1, with default header values.
Error
*/
type WebGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the web get default response
func (o *WebGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this web get default response has a 2xx status code
func (o *WebGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this web get default response has a 3xx status code
func (o *WebGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this web get default response has a 4xx status code
func (o *WebGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this web get default response has a 5xx status code
func (o *WebGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this web get default response a status code equal to that given
func (o *WebGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *WebGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/web][%d] web_get default %+v", o._statusCode, o.Payload)
}
func (o *WebGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/web][%d] web_get default %+v", o._statusCode, o.Payload)
}
func (o *WebGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *WebGetDefault) 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/cluster/metrocluster_node_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_node_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterNodeCollectionGetReader is a Reader for the MetroclusterNodeCollectionGet structure.
type MetroclusterNodeCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterNodeCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMetroclusterNodeCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterNodeCollectionGetDefault(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
}
}
// NewMetroclusterNodeCollectionGetOK creates a MetroclusterNodeCollectionGetOK with default headers values
func NewMetroclusterNodeCollectionGetOK() *MetroclusterNodeCollectionGetOK {
return &MetroclusterNodeCollectionGetOK{}
}
/*
MetroclusterNodeCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MetroclusterNodeCollectionGetOK struct {
Payload *models.MetroclusterNodeResponse
}
// IsSuccess returns true when this metrocluster node collection get o k response has a 2xx status code
func (o *MetroclusterNodeCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster node collection get o k response has a 3xx status code
func (o *MetroclusterNodeCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster node collection get o k response has a 4xx status code
func (o *MetroclusterNodeCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster node collection get o k response has a 5xx status code
func (o *MetroclusterNodeCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster node collection get o k response a status code equal to that given
func (o *MetroclusterNodeCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MetroclusterNodeCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/nodes][%d] metroclusterNodeCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterNodeCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/nodes][%d] metroclusterNodeCollectionGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterNodeCollectionGetOK) GetPayload() *models.MetroclusterNodeResponse {
return o.Payload
}
func (o *MetroclusterNodeCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MetroclusterNodeResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterNodeCollectionGetDefault creates a MetroclusterNodeCollectionGetDefault with default headers values
func NewMetroclusterNodeCollectionGetDefault(code int) *MetroclusterNodeCollectionGetDefault {
return &MetroclusterNodeCollectionGetDefault{
_statusCode: code,
}
}
/*
MetroclusterNodeCollectionGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2425734 | An internal error occurred. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
*/
type MetroclusterNodeCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the metrocluster node collection get default response
func (o *MetroclusterNodeCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster node collection get default response has a 2xx status code
func (o *MetroclusterNodeCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster node collection get default response has a 3xx status code
func (o *MetroclusterNodeCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster node collection get default response has a 4xx status code
func (o *MetroclusterNodeCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster node collection get default response has a 5xx status code
func (o *MetroclusterNodeCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster node collection get default response a status code equal to that given
func (o *MetroclusterNodeCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterNodeCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/nodes][%d] metrocluster_node_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterNodeCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/nodes][%d] metrocluster_node_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MetroclusterNodeCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MetroclusterNodeCollectionGetDefault) 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/cluster/metrocluster_dr_group_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_dr_group_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewMetroclusterDrGroupDeleteParams creates a new MetroclusterDrGroupDeleteParams 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 NewMetroclusterDrGroupDeleteParams() *MetroclusterDrGroupDeleteParams {
return &MetroclusterDrGroupDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewMetroclusterDrGroupDeleteParamsWithTimeout creates a new MetroclusterDrGroupDeleteParams object
// with the ability to set a timeout on a request.
func NewMetroclusterDrGroupDeleteParamsWithTimeout(timeout time.Duration) *MetroclusterDrGroupDeleteParams {
return &MetroclusterDrGroupDeleteParams{
timeout: timeout,
}
}
// NewMetroclusterDrGroupDeleteParamsWithContext creates a new MetroclusterDrGroupDeleteParams object
// with the ability to set a context for a request.
func NewMetroclusterDrGroupDeleteParamsWithContext(ctx context.Context) *MetroclusterDrGroupDeleteParams {
return &MetroclusterDrGroupDeleteParams{
Context: ctx,
}
}
// NewMetroclusterDrGroupDeleteParamsWithHTTPClient creates a new MetroclusterDrGroupDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewMetroclusterDrGroupDeleteParamsWithHTTPClient(client *http.Client) *MetroclusterDrGroupDeleteParams {
return &MetroclusterDrGroupDeleteParams{
HTTPClient: client,
}
}
/*
MetroclusterDrGroupDeleteParams contains all the parameters to send to the API endpoint
for the metrocluster dr group delete operation.
Typically these are written to a http.Request.
*/
type MetroclusterDrGroupDeleteParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
// ID.
ID 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 metrocluster dr group delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupDeleteParams) WithDefaults() *MetroclusterDrGroupDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the metrocluster dr group delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupDeleteParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := MetroclusterDrGroupDeleteParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithTimeout(timeout time.Duration) *MetroclusterDrGroupDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithContext(ctx context.Context) *MetroclusterDrGroupDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithHTTPClient(client *http.Client) *MetroclusterDrGroupDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithFields(fields []string) *MetroclusterDrGroupDeleteParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetFields(fields []string) {
o.Fields = fields
}
// WithID adds the id to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithID(id string) *MetroclusterDrGroupDeleteParams {
o.SetID(id)
return o
}
// SetID adds the id to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetID(id string) {
o.ID = id
}
// WithReturnTimeout adds the returnTimeout to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) WithReturnTimeout(returnTimeout *int64) *MetroclusterDrGroupDeleteParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the metrocluster dr group delete params
func (o *MetroclusterDrGroupDeleteParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *MetroclusterDrGroupDeleteParams) 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 id
if err := r.SetPathParam("id", o.ID); 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
}
// bindParamMetroclusterDrGroupDelete binds the parameter fields
func (o *MetroclusterDrGroupDeleteParams) 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/cluster/node_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/node_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NodeDeleteReader is a Reader for the NodeDelete structure.
type NodeDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NodeDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewNodeDeleteAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNodeDeleteDefault(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
}
}
// NewNodeDeleteAccepted creates a NodeDeleteAccepted with default headers values
func NewNodeDeleteAccepted() *NodeDeleteAccepted {
return &NodeDeleteAccepted{}
}
/*
NodeDeleteAccepted describes a response with status code 202, with default header values.
Accepted
*/
type NodeDeleteAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this node delete accepted response has a 2xx status code
func (o *NodeDeleteAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this node delete accepted response has a 3xx status code
func (o *NodeDeleteAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this node delete accepted response has a 4xx status code
func (o *NodeDeleteAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this node delete accepted response has a 5xx status code
func (o *NodeDeleteAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this node delete accepted response a status code equal to that given
func (o *NodeDeleteAccepted) IsCode(code int) bool {
return code == 202
}
func (o *NodeDeleteAccepted) Error() string {
return fmt.Sprintf("[DELETE /cluster/nodes/{uuid}][%d] nodeDeleteAccepted %+v", 202, o.Payload)
}
func (o *NodeDeleteAccepted) String() string {
return fmt.Sprintf("[DELETE /cluster/nodes/{uuid}][%d] nodeDeleteAccepted %+v", 202, o.Payload)
}
func (o *NodeDeleteAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *NodeDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNodeDeleteDefault creates a NodeDeleteDefault with default headers values
func NewNodeDeleteDefault(code int) *NodeDeleteDefault {
return &NodeDeleteDefault{
_statusCode: code,
}
}
/*
NodeDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 458755 | Replication service is offline. |
| 458758 | Failed to load job for cluster remove node operation as the job exists. |
| 1179732 | Cannot remove a node in a single-node cluster. |
| 1179735 | Node is not part of a cluster. |
| 1182805 | Cannot remove a node from the node network address of the node to be removed. |
| 2293765 | Removing a node only works for nodes not in failover configuration. |
| 2293767 | Node has volumes. Either move or delete them from the node before removing the node. |
| 2293768 | Node is the home node for one or more logical interfaces. |
| 2293769 | Node is the current node for one or more logical interfaces. |
| 2293770 | Node has data logical interfaces configured as target node. |
| 2293789 | Removing a node only works for nodes not in HA configuration. |
| 2293796 | Cluster ring is offline on the node |
| 2293798 | Cannot forcibly remove a node that is online. |
| 2293800 | Node is configured with MetroCluster. |
| 2293801 | Cannot remove node because it has foreign LUN Imports. |
| 2293812 | Node is a member of MetroCluster DR group. |
| 2293813 | Cannot remove a node from the cluster because a controller replacement is in progress. |
| 2293814 | The DELETE operation is not supported until the cluster is upgraded. |
| 2293816 | Cannot remove node because its Storage Encryption devices use authentication keys (AKs) that will not be available to the node after it leaves the cluster. |
*/
type NodeDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the node delete default response
func (o *NodeDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this node delete default response has a 2xx status code
func (o *NodeDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this node delete default response has a 3xx status code
func (o *NodeDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this node delete default response has a 4xx status code
func (o *NodeDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this node delete default response has a 5xx status code
func (o *NodeDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this node delete default response a status code equal to that given
func (o *NodeDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NodeDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /cluster/nodes/{uuid}][%d] node_delete default %+v", o._statusCode, o.Payload)
}
func (o *NodeDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /cluster/nodes/{uuid}][%d] node_delete default %+v", o._statusCode, o.Payload)
}
func (o *NodeDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NodeDeleteDefault) 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/cluster/cluster_ntp_servers_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_servers_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterNtpServersCollectionGetReader is a Reader for the ClusterNtpServersCollectionGet structure.
type ClusterNtpServersCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterNtpServersCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterNtpServersCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterNtpServersCollectionGetDefault(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
}
}
// NewClusterNtpServersCollectionGetOK creates a ClusterNtpServersCollectionGetOK with default headers values
func NewClusterNtpServersCollectionGetOK() *ClusterNtpServersCollectionGetOK {
return &ClusterNtpServersCollectionGetOK{}
}
/*
ClusterNtpServersCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type ClusterNtpServersCollectionGetOK struct {
Payload *models.NtpServerResponse
}
// IsSuccess returns true when this cluster ntp servers collection get o k response has a 2xx status code
func (o *ClusterNtpServersCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster ntp servers collection get o k response has a 3xx status code
func (o *ClusterNtpServersCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster ntp servers collection get o k response has a 4xx status code
func (o *ClusterNtpServersCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster ntp servers collection get o k response has a 5xx status code
func (o *ClusterNtpServersCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster ntp servers collection get o k response a status code equal to that given
func (o *ClusterNtpServersCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterNtpServersCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/ntp/servers][%d] clusterNtpServersCollectionGetOK %+v", 200, o.Payload)
}
func (o *ClusterNtpServersCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/ntp/servers][%d] clusterNtpServersCollectionGetOK %+v", 200, o.Payload)
}
func (o *ClusterNtpServersCollectionGetOK) GetPayload() *models.NtpServerResponse {
return o.Payload
}
func (o *ClusterNtpServersCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NtpServerResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterNtpServersCollectionGetDefault creates a ClusterNtpServersCollectionGetDefault with default headers values
func NewClusterNtpServersCollectionGetDefault(code int) *ClusterNtpServersCollectionGetDefault {
return &ClusterNtpServersCollectionGetDefault{
_statusCode: code,
}
}
/*
ClusterNtpServersCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type ClusterNtpServersCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster ntp servers collection get default response
func (o *ClusterNtpServersCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster ntp servers collection get default response has a 2xx status code
func (o *ClusterNtpServersCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster ntp servers collection get default response has a 3xx status code
func (o *ClusterNtpServersCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster ntp servers collection get default response has a 4xx status code
func (o *ClusterNtpServersCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster ntp servers collection get default response has a 5xx status code
func (o *ClusterNtpServersCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster ntp servers collection get default response a status code equal to that given
func (o *ClusterNtpServersCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterNtpServersCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/ntp/servers][%d] cluster_ntp_servers_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpServersCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/ntp/servers][%d] cluster_ntp_servers_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpServersCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterNtpServersCollectionGetDefault) 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/cluster/node_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/node_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewNodeDeleteParams creates a new NodeDeleteParams 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 NewNodeDeleteParams() *NodeDeleteParams {
return &NodeDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewNodeDeleteParamsWithTimeout creates a new NodeDeleteParams object
// with the ability to set a timeout on a request.
func NewNodeDeleteParamsWithTimeout(timeout time.Duration) *NodeDeleteParams {
return &NodeDeleteParams{
timeout: timeout,
}
}
// NewNodeDeleteParamsWithContext creates a new NodeDeleteParams object
// with the ability to set a context for a request.
func NewNodeDeleteParamsWithContext(ctx context.Context) *NodeDeleteParams {
return &NodeDeleteParams{
Context: ctx,
}
}
// NewNodeDeleteParamsWithHTTPClient creates a new NodeDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewNodeDeleteParamsWithHTTPClient(client *http.Client) *NodeDeleteParams {
return &NodeDeleteParams{
HTTPClient: client,
}
}
/*
NodeDeleteParams contains all the parameters to send to the API endpoint
for the node delete operation.
Typically these are written to a http.Request.
*/
type NodeDeleteParams struct {
/* Force.
Set the force flag to "true" to forcibly remove a node that is down and cannot be brought online to remove its shared resources.
*/
Force *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
// UUID.
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the node delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodeDeleteParams) WithDefaults() *NodeDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the node delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodeDeleteParams) SetDefaults() {
var (
forceDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := NodeDeleteParams{
Force: &forceDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the node delete params
func (o *NodeDeleteParams) WithTimeout(timeout time.Duration) *NodeDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the node delete params
func (o *NodeDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the node delete params
func (o *NodeDeleteParams) WithContext(ctx context.Context) *NodeDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the node delete params
func (o *NodeDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the node delete params
func (o *NodeDeleteParams) WithHTTPClient(client *http.Client) *NodeDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the node delete params
func (o *NodeDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithForce adds the force to the node delete params
func (o *NodeDeleteParams) WithForce(force *bool) *NodeDeleteParams {
o.SetForce(force)
return o
}
// SetForce adds the force to the node delete params
func (o *NodeDeleteParams) SetForce(force *bool) {
o.Force = force
}
// WithReturnTimeout adds the returnTimeout to the node delete params
func (o *NodeDeleteParams) WithReturnTimeout(returnTimeout *int64) *NodeDeleteParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the node delete params
func (o *NodeDeleteParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the node delete params
func (o *NodeDeleteParams) WithUUID(uuid string) *NodeDeleteParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the node delete params
func (o *NodeDeleteParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NodeDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Force != nil {
// query param force
var qrForce bool
if o.Force != nil {
qrForce = *o.Force
}
qForce := swag.FormatBool(qrForce)
if qForce != "" {
if err := r.SetQueryParam("force", qForce); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/firmware_history_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/firmware_history_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewFirmwareHistoryCollectionGetParams creates a new FirmwareHistoryCollectionGetParams 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 NewFirmwareHistoryCollectionGetParams() *FirmwareHistoryCollectionGetParams {
return &FirmwareHistoryCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewFirmwareHistoryCollectionGetParamsWithTimeout creates a new FirmwareHistoryCollectionGetParams object
// with the ability to set a timeout on a request.
func NewFirmwareHistoryCollectionGetParamsWithTimeout(timeout time.Duration) *FirmwareHistoryCollectionGetParams {
return &FirmwareHistoryCollectionGetParams{
timeout: timeout,
}
}
// NewFirmwareHistoryCollectionGetParamsWithContext creates a new FirmwareHistoryCollectionGetParams object
// with the ability to set a context for a request.
func NewFirmwareHistoryCollectionGetParamsWithContext(ctx context.Context) *FirmwareHistoryCollectionGetParams {
return &FirmwareHistoryCollectionGetParams{
Context: ctx,
}
}
// NewFirmwareHistoryCollectionGetParamsWithHTTPClient creates a new FirmwareHistoryCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewFirmwareHistoryCollectionGetParamsWithHTTPClient(client *http.Client) *FirmwareHistoryCollectionGetParams {
return &FirmwareHistoryCollectionGetParams{
HTTPClient: client,
}
}
/*
FirmwareHistoryCollectionGetParams contains all the parameters to send to the API endpoint
for the firmware history collection get operation.
Typically these are written to a http.Request.
*/
type FirmwareHistoryCollectionGetParams struct {
/* EndTime.
Filter by end_time
*/
EndTime *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* FwFileName.
Filter by fw_file_name
*/
FwFileName *string
/* FwUpdateState.
Filter by fw_update_state
*/
FwUpdateState *string
/* JobUUID.
Filter by job.uuid
*/
JobUUID *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* NodeName.
Filter by node.name
*/
NodeName *string
/* NodeUUID.
Filter by node.uuid
*/
NodeUUID *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* StartTime.
Filter by start_time
*/
StartTime *string
/* UpdateStatusWorkerErrorCode.
Filter by update_status.worker.error.code
*/
UpdateStatusWorkerErrorCode *int64
/* UpdateStatusWorkerErrorMessage.
Filter by update_status.worker.error.message
*/
UpdateStatusWorkerErrorMessage *string
/* UpdateStatusWorkerNodeName.
Filter by update_status.worker.node.name
*/
UpdateStatusWorkerNodeName *string
/* UpdateStatusWorkerNodeUUID.
Filter by update_status.worker.node.uuid
*/
UpdateStatusWorkerNodeUUID *string
/* UpdateStatusWorkerState.
Filter by update_status.worker.state
*/
UpdateStatusWorkerState *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the firmware history collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FirmwareHistoryCollectionGetParams) WithDefaults() *FirmwareHistoryCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the firmware history collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *FirmwareHistoryCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := FirmwareHistoryCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithTimeout(timeout time.Duration) *FirmwareHistoryCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithContext(ctx context.Context) *FirmwareHistoryCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithHTTPClient(client *http.Client) *FirmwareHistoryCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEndTime adds the endTime to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithEndTime(endTime *string) *FirmwareHistoryCollectionGetParams {
o.SetEndTime(endTime)
return o
}
// SetEndTime adds the endTime to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetEndTime(endTime *string) {
o.EndTime = endTime
}
// WithFields adds the fields to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithFields(fields []string) *FirmwareHistoryCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithFwFileName adds the fwFileName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithFwFileName(fwFileName *string) *FirmwareHistoryCollectionGetParams {
o.SetFwFileName(fwFileName)
return o
}
// SetFwFileName adds the fwFileName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetFwFileName(fwFileName *string) {
o.FwFileName = fwFileName
}
// WithFwUpdateState adds the fwUpdateState to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithFwUpdateState(fwUpdateState *string) *FirmwareHistoryCollectionGetParams {
o.SetFwUpdateState(fwUpdateState)
return o
}
// SetFwUpdateState adds the fwUpdateState to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetFwUpdateState(fwUpdateState *string) {
o.FwUpdateState = fwUpdateState
}
// WithJobUUID adds the jobUUID to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithJobUUID(jobUUID *string) *FirmwareHistoryCollectionGetParams {
o.SetJobUUID(jobUUID)
return o
}
// SetJobUUID adds the jobUuid to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetJobUUID(jobUUID *string) {
o.JobUUID = jobUUID
}
// WithMaxRecords adds the maxRecords to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithMaxRecords(maxRecords *int64) *FirmwareHistoryCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithNodeName adds the nodeName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithNodeName(nodeName *string) *FirmwareHistoryCollectionGetParams {
o.SetNodeName(nodeName)
return o
}
// SetNodeName adds the nodeName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetNodeName(nodeName *string) {
o.NodeName = nodeName
}
// WithNodeUUID adds the nodeUUID to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithNodeUUID(nodeUUID *string) *FirmwareHistoryCollectionGetParams {
o.SetNodeUUID(nodeUUID)
return o
}
// SetNodeUUID adds the nodeUuid to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetNodeUUID(nodeUUID *string) {
o.NodeUUID = nodeUUID
}
// WithOrderBy adds the orderBy to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithOrderBy(orderBy []string) *FirmwareHistoryCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithReturnRecords(returnRecords *bool) *FirmwareHistoryCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *FirmwareHistoryCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStartTime adds the startTime to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithStartTime(startTime *string) *FirmwareHistoryCollectionGetParams {
o.SetStartTime(startTime)
return o
}
// SetStartTime adds the startTime to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetStartTime(startTime *string) {
o.StartTime = startTime
}
// WithUpdateStatusWorkerErrorCode adds the updateStatusWorkerErrorCode to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithUpdateStatusWorkerErrorCode(updateStatusWorkerErrorCode *int64) *FirmwareHistoryCollectionGetParams {
o.SetUpdateStatusWorkerErrorCode(updateStatusWorkerErrorCode)
return o
}
// SetUpdateStatusWorkerErrorCode adds the updateStatusWorkerErrorCode to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetUpdateStatusWorkerErrorCode(updateStatusWorkerErrorCode *int64) {
o.UpdateStatusWorkerErrorCode = updateStatusWorkerErrorCode
}
// WithUpdateStatusWorkerErrorMessage adds the updateStatusWorkerErrorMessage to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithUpdateStatusWorkerErrorMessage(updateStatusWorkerErrorMessage *string) *FirmwareHistoryCollectionGetParams {
o.SetUpdateStatusWorkerErrorMessage(updateStatusWorkerErrorMessage)
return o
}
// SetUpdateStatusWorkerErrorMessage adds the updateStatusWorkerErrorMessage to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetUpdateStatusWorkerErrorMessage(updateStatusWorkerErrorMessage *string) {
o.UpdateStatusWorkerErrorMessage = updateStatusWorkerErrorMessage
}
// WithUpdateStatusWorkerNodeName adds the updateStatusWorkerNodeName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithUpdateStatusWorkerNodeName(updateStatusWorkerNodeName *string) *FirmwareHistoryCollectionGetParams {
o.SetUpdateStatusWorkerNodeName(updateStatusWorkerNodeName)
return o
}
// SetUpdateStatusWorkerNodeName adds the updateStatusWorkerNodeName to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetUpdateStatusWorkerNodeName(updateStatusWorkerNodeName *string) {
o.UpdateStatusWorkerNodeName = updateStatusWorkerNodeName
}
// WithUpdateStatusWorkerNodeUUID adds the updateStatusWorkerNodeUUID to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithUpdateStatusWorkerNodeUUID(updateStatusWorkerNodeUUID *string) *FirmwareHistoryCollectionGetParams {
o.SetUpdateStatusWorkerNodeUUID(updateStatusWorkerNodeUUID)
return o
}
// SetUpdateStatusWorkerNodeUUID adds the updateStatusWorkerNodeUuid to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetUpdateStatusWorkerNodeUUID(updateStatusWorkerNodeUUID *string) {
o.UpdateStatusWorkerNodeUUID = updateStatusWorkerNodeUUID
}
// WithUpdateStatusWorkerState adds the updateStatusWorkerState to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) WithUpdateStatusWorkerState(updateStatusWorkerState *string) *FirmwareHistoryCollectionGetParams {
o.SetUpdateStatusWorkerState(updateStatusWorkerState)
return o
}
// SetUpdateStatusWorkerState adds the updateStatusWorkerState to the firmware history collection get params
func (o *FirmwareHistoryCollectionGetParams) SetUpdateStatusWorkerState(updateStatusWorkerState *string) {
o.UpdateStatusWorkerState = updateStatusWorkerState
}
// WriteToRequest writes these params to a swagger request
func (o *FirmwareHistoryCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.EndTime != nil {
// query param end_time
var qrEndTime string
if o.EndTime != nil {
qrEndTime = *o.EndTime
}
qEndTime := qrEndTime
if qEndTime != "" {
if err := r.SetQueryParam("end_time", qEndTime); err != nil {
return err
}
}
}
if o.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.FwFileName != nil {
// query param fw_file_name
var qrFwFileName string
if o.FwFileName != nil {
qrFwFileName = *o.FwFileName
}
qFwFileName := qrFwFileName
if qFwFileName != "" {
if err := r.SetQueryParam("fw_file_name", qFwFileName); err != nil {
return err
}
}
}
if o.FwUpdateState != nil {
// query param fw_update_state
var qrFwUpdateState string
if o.FwUpdateState != nil {
qrFwUpdateState = *o.FwUpdateState
}
qFwUpdateState := qrFwUpdateState
if qFwUpdateState != "" {
if err := r.SetQueryParam("fw_update_state", qFwUpdateState); err != nil {
return err
}
}
}
if o.JobUUID != nil {
// query param job.uuid
var qrJobUUID string
if o.JobUUID != nil {
qrJobUUID = *o.JobUUID
}
qJobUUID := qrJobUUID
if qJobUUID != "" {
if err := r.SetQueryParam("job.uuid", qJobUUID); err != nil {
return err
}
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.NodeName != nil {
// query param node.name
var qrNodeName string
if o.NodeName != nil {
qrNodeName = *o.NodeName
}
qNodeName := qrNodeName
if qNodeName != "" {
if err := r.SetQueryParam("node.name", qNodeName); err != nil {
return err
}
}
}
if o.NodeUUID != nil {
// query param node.uuid
var qrNodeUUID string
if o.NodeUUID != nil {
qrNodeUUID = *o.NodeUUID
}
qNodeUUID := qrNodeUUID
if qNodeUUID != "" {
if err := r.SetQueryParam("node.uuid", qNodeUUID); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.StartTime != nil {
// query param start_time
var qrStartTime string
if o.StartTime != nil {
qrStartTime = *o.StartTime
}
qStartTime := qrStartTime
if qStartTime != "" {
if err := r.SetQueryParam("start_time", qStartTime); err != nil {
return err
}
}
}
if o.UpdateStatusWorkerErrorCode != nil {
// query param update_status.worker.error.code
var qrUpdateStatusWorkerErrorCode int64
if o.UpdateStatusWorkerErrorCode != nil {
qrUpdateStatusWorkerErrorCode = *o.UpdateStatusWorkerErrorCode
}
qUpdateStatusWorkerErrorCode := swag.FormatInt64(qrUpdateStatusWorkerErrorCode)
if qUpdateStatusWorkerErrorCode != "" {
if err := r.SetQueryParam("update_status.worker.error.code", qUpdateStatusWorkerErrorCode); err != nil {
return err
}
}
}
if o.UpdateStatusWorkerErrorMessage != nil {
// query param update_status.worker.error.message
var qrUpdateStatusWorkerErrorMessage string
if o.UpdateStatusWorkerErrorMessage != nil {
qrUpdateStatusWorkerErrorMessage = *o.UpdateStatusWorkerErrorMessage
}
qUpdateStatusWorkerErrorMessage := qrUpdateStatusWorkerErrorMessage
if qUpdateStatusWorkerErrorMessage != "" {
if err := r.SetQueryParam("update_status.worker.error.message", qUpdateStatusWorkerErrorMessage); err != nil {
return err
}
}
}
if o.UpdateStatusWorkerNodeName != nil {
// query param update_status.worker.node.name
var qrUpdateStatusWorkerNodeName string
if o.UpdateStatusWorkerNodeName != nil {
qrUpdateStatusWorkerNodeName = *o.UpdateStatusWorkerNodeName
}
qUpdateStatusWorkerNodeName := qrUpdateStatusWorkerNodeName
if qUpdateStatusWorkerNodeName != "" {
if err := r.SetQueryParam("update_status.worker.node.name", qUpdateStatusWorkerNodeName); err != nil {
return err
}
}
}
if o.UpdateStatusWorkerNodeUUID != nil {
// query param update_status.worker.node.uuid
var qrUpdateStatusWorkerNodeUUID string
if o.UpdateStatusWorkerNodeUUID != nil {
qrUpdateStatusWorkerNodeUUID = *o.UpdateStatusWorkerNodeUUID
}
qUpdateStatusWorkerNodeUUID := qrUpdateStatusWorkerNodeUUID
if qUpdateStatusWorkerNodeUUID != "" {
if err := r.SetQueryParam("update_status.worker.node.uuid", qUpdateStatusWorkerNodeUUID); err != nil {
return err
}
}
}
if o.UpdateStatusWorkerState != nil {
// query param update_status.worker.state
var qrUpdateStatusWorkerState string
if o.UpdateStatusWorkerState != nil {
qrUpdateStatusWorkerState = *o.UpdateStatusWorkerState
}
qUpdateStatusWorkerState := qrUpdateStatusWorkerState
if qUpdateStatusWorkerState != "" {
if err := r.SetQueryParam("update_status.worker.state", qUpdateStatusWorkerState); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamFirmwareHistoryCollectionGet binds the parameter fields
func (o *FirmwareHistoryCollectionGetParams) 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
}
// bindParamFirmwareHistoryCollectionGet binds the parameter order_by
func (o *FirmwareHistoryCollectionGetParams) 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/cluster/cluster_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterCreateReader is a Reader for the ClusterCreate structure.
type ClusterCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewClusterCreateAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterCreateDefault(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
}
}
// NewClusterCreateAccepted creates a ClusterCreateAccepted with default headers values
func NewClusterCreateAccepted() *ClusterCreateAccepted {
return &ClusterCreateAccepted{}
}
/*
ClusterCreateAccepted describes a response with status code 202, with default header values.
Accepted
*/
type ClusterCreateAccepted struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this cluster create accepted response has a 2xx status code
func (o *ClusterCreateAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster create accepted response has a 3xx status code
func (o *ClusterCreateAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster create accepted response has a 4xx status code
func (o *ClusterCreateAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster create accepted response has a 5xx status code
func (o *ClusterCreateAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this cluster create accepted response a status code equal to that given
func (o *ClusterCreateAccepted) IsCode(code int) bool {
return code == 202
}
func (o *ClusterCreateAccepted) Error() string {
return fmt.Sprintf("[POST /cluster][%d] clusterCreateAccepted %+v", 202, o.Payload)
}
func (o *ClusterCreateAccepted) String() string {
return fmt.Sprintf("[POST /cluster][%d] clusterCreateAccepted %+v", 202, o.Payload)
}
func (o *ClusterCreateAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *ClusterCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterCreateDefault creates a ClusterCreateDefault with default headers values
func NewClusterCreateDefault(code int) *ClusterCreateDefault {
return &ClusterCreateDefault{
_statusCode: code,
}
}
/*
ClusterCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 262245 | The value provided is invalid. |
| 1179813 | Fields set for one node must be set for all nodes. |
| 1179817 | The IP address, subnet mask, and gateway must all be provided for cluster manangement interface. |
| 1179818 | The IP address and gateway must be of the same family. |
| 1179821 | An IP address and subnet mask conflicts with an existing entry. |
| 1179824 | An invalid gateway was provided. |
| 1179825 | All management and cluster config IP addresses must belong to the same address family. |
| 2097165 | An NTP server could not be reached. |
| 8847361 | Too many DNS domains provided. |
| 8847362 | Too many name servers provided. |
| 8847394 | An invalid DNS domain was provided. |
| 8978433 | An invalid license key was provided. |
| 9240587 | A name must be provided. |
| 9240594 | An invalid name was provided. |
| 39387137 | The URL provided is invalid. |
| 131727360 | A node could not be added to the cluster. This is a generic code, see response message for details. |
| 131727388 | Hostnames for NTP servers cannot be used without DNS configured. |
| 131727389 | URL and username are required for configuration backup. |
*/
type ClusterCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster create default response
func (o *ClusterCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster create default response has a 2xx status code
func (o *ClusterCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster create default response has a 3xx status code
func (o *ClusterCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster create default response has a 4xx status code
func (o *ClusterCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster create default response has a 5xx status code
func (o *ClusterCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster create default response a status code equal to that given
func (o *ClusterCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterCreateDefault) Error() string {
return fmt.Sprintf("[POST /cluster][%d] cluster_create default %+v", o._statusCode, o.Payload)
}
func (o *ClusterCreateDefault) String() string {
return fmt.Sprintf("[POST /cluster][%d] cluster_create default %+v", o._statusCode, o.Payload)
}
func (o *ClusterCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterCreateDefault) 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/cluster/metrocluster_diagnostics_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_diagnostics_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// MetroclusterDiagnosticsGetReader is a Reader for the MetroclusterDiagnosticsGet structure.
type MetroclusterDiagnosticsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MetroclusterDiagnosticsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMetroclusterDiagnosticsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMetroclusterDiagnosticsGetDefault(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
}
}
// NewMetroclusterDiagnosticsGetOK creates a MetroclusterDiagnosticsGetOK with default headers values
func NewMetroclusterDiagnosticsGetOK() *MetroclusterDiagnosticsGetOK {
return &MetroclusterDiagnosticsGetOK{}
}
/*
MetroclusterDiagnosticsGetOK describes a response with status code 200, with default header values.
OK
*/
type MetroclusterDiagnosticsGetOK struct {
Payload *models.MetroclusterDiagnostics
}
// IsSuccess returns true when this metrocluster diagnostics get o k response has a 2xx status code
func (o *MetroclusterDiagnosticsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this metrocluster diagnostics get o k response has a 3xx status code
func (o *MetroclusterDiagnosticsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this metrocluster diagnostics get o k response has a 4xx status code
func (o *MetroclusterDiagnosticsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this metrocluster diagnostics get o k response has a 5xx status code
func (o *MetroclusterDiagnosticsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this metrocluster diagnostics get o k response a status code equal to that given
func (o *MetroclusterDiagnosticsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MetroclusterDiagnosticsGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/diagnostics][%d] metroclusterDiagnosticsGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterDiagnosticsGetOK) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/diagnostics][%d] metroclusterDiagnosticsGetOK %+v", 200, o.Payload)
}
func (o *MetroclusterDiagnosticsGetOK) GetPayload() *models.MetroclusterDiagnostics {
return o.Payload
}
func (o *MetroclusterDiagnosticsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MetroclusterDiagnostics)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMetroclusterDiagnosticsGetDefault creates a MetroclusterDiagnosticsGetDefault with default headers values
func NewMetroclusterDiagnosticsGetDefault(code int) *MetroclusterDiagnosticsGetDefault {
return &MetroclusterDiagnosticsGetDefault{
_statusCode: code,
}
}
/*
MetroclusterDiagnosticsGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2425734 | An internal error occurred. Wait a few minutes, and try the operation again. For further assistance, contact technical support. |
| 2427132 | MetroCluster is not configured on this cluster. |
| 2432856 | MetroCluster diagnostics result is not available. Use the REST API GET method on "/api/cluster/metrocluster/operations?type=check&fields=*" for more information. |
*/
type MetroclusterDiagnosticsGetDefault struct {
_statusCode int
}
// Code gets the status code for the metrocluster diagnostics get default response
func (o *MetroclusterDiagnosticsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this metrocluster diagnostics get default response has a 2xx status code
func (o *MetroclusterDiagnosticsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this metrocluster diagnostics get default response has a 3xx status code
func (o *MetroclusterDiagnosticsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this metrocluster diagnostics get default response has a 4xx status code
func (o *MetroclusterDiagnosticsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this metrocluster diagnostics get default response has a 5xx status code
func (o *MetroclusterDiagnosticsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this metrocluster diagnostics get default response a status code equal to that given
func (o *MetroclusterDiagnosticsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MetroclusterDiagnosticsGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/metrocluster/diagnostics][%d] metrocluster_diagnostics_get default ", o._statusCode)
}
func (o *MetroclusterDiagnosticsGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/metrocluster/diagnostics][%d] metrocluster_diagnostics_get default ", o._statusCode)
}
func (o *MetroclusterDiagnosticsGetDefault) 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/cluster/cluster_ntp_keys_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_keys_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterNtpKeysCollectionGetReader is a Reader for the ClusterNtpKeysCollectionGet structure.
type ClusterNtpKeysCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterNtpKeysCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterNtpKeysCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterNtpKeysCollectionGetDefault(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
}
}
// NewClusterNtpKeysCollectionGetOK creates a ClusterNtpKeysCollectionGetOK with default headers values
func NewClusterNtpKeysCollectionGetOK() *ClusterNtpKeysCollectionGetOK {
return &ClusterNtpKeysCollectionGetOK{}
}
/*
ClusterNtpKeysCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type ClusterNtpKeysCollectionGetOK struct {
Payload *models.NtpKeyResponse
}
// IsSuccess returns true when this cluster ntp keys collection get o k response has a 2xx status code
func (o *ClusterNtpKeysCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster ntp keys collection get o k response has a 3xx status code
func (o *ClusterNtpKeysCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster ntp keys collection get o k response has a 4xx status code
func (o *ClusterNtpKeysCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster ntp keys collection get o k response has a 5xx status code
func (o *ClusterNtpKeysCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster ntp keys collection get o k response a status code equal to that given
func (o *ClusterNtpKeysCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterNtpKeysCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/ntp/keys][%d] clusterNtpKeysCollectionGetOK %+v", 200, o.Payload)
}
func (o *ClusterNtpKeysCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/ntp/keys][%d] clusterNtpKeysCollectionGetOK %+v", 200, o.Payload)
}
func (o *ClusterNtpKeysCollectionGetOK) GetPayload() *models.NtpKeyResponse {
return o.Payload
}
func (o *ClusterNtpKeysCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NtpKeyResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterNtpKeysCollectionGetDefault creates a ClusterNtpKeysCollectionGetDefault with default headers values
func NewClusterNtpKeysCollectionGetDefault(code int) *ClusterNtpKeysCollectionGetDefault {
return &ClusterNtpKeysCollectionGetDefault{
_statusCode: code,
}
}
/*
ClusterNtpKeysCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type ClusterNtpKeysCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster ntp keys collection get default response
func (o *ClusterNtpKeysCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster ntp keys collection get default response has a 2xx status code
func (o *ClusterNtpKeysCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster ntp keys collection get default response has a 3xx status code
func (o *ClusterNtpKeysCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster ntp keys collection get default response has a 4xx status code
func (o *ClusterNtpKeysCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster ntp keys collection get default response has a 5xx status code
func (o *ClusterNtpKeysCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster ntp keys collection get default response a status code equal to that given
func (o *ClusterNtpKeysCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterNtpKeysCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/ntp/keys][%d] cluster_ntp_keys_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpKeysCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/ntp/keys][%d] cluster_ntp_keys_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpKeysCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterNtpKeysCollectionGetDefault) 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/cluster/chassis_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/chassis_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ChassisCollectionGetReader is a Reader for the ChassisCollectionGet structure.
type ChassisCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ChassisCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewChassisCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewChassisCollectionGetDefault(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
}
}
// NewChassisCollectionGetOK creates a ChassisCollectionGetOK with default headers values
func NewChassisCollectionGetOK() *ChassisCollectionGetOK {
return &ChassisCollectionGetOK{}
}
/*
ChassisCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type ChassisCollectionGetOK struct {
Payload *models.ChassisResponse
}
// IsSuccess returns true when this chassis collection get o k response has a 2xx status code
func (o *ChassisCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this chassis collection get o k response has a 3xx status code
func (o *ChassisCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this chassis collection get o k response has a 4xx status code
func (o *ChassisCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this chassis collection get o k response has a 5xx status code
func (o *ChassisCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this chassis collection get o k response a status code equal to that given
func (o *ChassisCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *ChassisCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/chassis][%d] chassisCollectionGetOK %+v", 200, o.Payload)
}
func (o *ChassisCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/chassis][%d] chassisCollectionGetOK %+v", 200, o.Payload)
}
func (o *ChassisCollectionGetOK) GetPayload() *models.ChassisResponse {
return o.Payload
}
func (o *ChassisCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ChassisResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewChassisCollectionGetDefault creates a ChassisCollectionGetDefault with default headers values
func NewChassisCollectionGetDefault(code int) *ChassisCollectionGetDefault {
return &ChassisCollectionGetDefault{
_statusCode: code,
}
}
/*
ChassisCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type ChassisCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the chassis collection get default response
func (o *ChassisCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this chassis collection get default response has a 2xx status code
func (o *ChassisCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this chassis collection get default response has a 3xx status code
func (o *ChassisCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this chassis collection get default response has a 4xx status code
func (o *ChassisCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this chassis collection get default response has a 5xx status code
func (o *ChassisCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this chassis collection get default response a status code equal to that given
func (o *ChassisCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ChassisCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/chassis][%d] chassis_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ChassisCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/chassis][%d] chassis_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *ChassisCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ChassisCollectionGetDefault) 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/cluster/software_package_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_package_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwarePackageDeleteParams creates a new SoftwarePackageDeleteParams 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 NewSoftwarePackageDeleteParams() *SoftwarePackageDeleteParams {
return &SoftwarePackageDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwarePackageDeleteParamsWithTimeout creates a new SoftwarePackageDeleteParams object
// with the ability to set a timeout on a request.
func NewSoftwarePackageDeleteParamsWithTimeout(timeout time.Duration) *SoftwarePackageDeleteParams {
return &SoftwarePackageDeleteParams{
timeout: timeout,
}
}
// NewSoftwarePackageDeleteParamsWithContext creates a new SoftwarePackageDeleteParams object
// with the ability to set a context for a request.
func NewSoftwarePackageDeleteParamsWithContext(ctx context.Context) *SoftwarePackageDeleteParams {
return &SoftwarePackageDeleteParams{
Context: ctx,
}
}
// NewSoftwarePackageDeleteParamsWithHTTPClient creates a new SoftwarePackageDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwarePackageDeleteParamsWithHTTPClient(client *http.Client) *SoftwarePackageDeleteParams {
return &SoftwarePackageDeleteParams{
HTTPClient: client,
}
}
/*
SoftwarePackageDeleteParams contains all the parameters to send to the API endpoint
for the software package delete operation.
Typically these are written to a http.Request.
*/
type SoftwarePackageDeleteParams struct {
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
// Version.
Version string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the software package delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageDeleteParams) WithDefaults() *SoftwarePackageDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software package delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageDeleteParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := SoftwarePackageDeleteParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the software package delete params
func (o *SoftwarePackageDeleteParams) WithTimeout(timeout time.Duration) *SoftwarePackageDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software package delete params
func (o *SoftwarePackageDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software package delete params
func (o *SoftwarePackageDeleteParams) WithContext(ctx context.Context) *SoftwarePackageDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software package delete params
func (o *SoftwarePackageDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software package delete params
func (o *SoftwarePackageDeleteParams) WithHTTPClient(client *http.Client) *SoftwarePackageDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software package delete params
func (o *SoftwarePackageDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithReturnTimeout adds the returnTimeout to the software package delete params
func (o *SoftwarePackageDeleteParams) WithReturnTimeout(returnTimeout *int64) *SoftwarePackageDeleteParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the software package delete params
func (o *SoftwarePackageDeleteParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithVersion adds the version to the software package delete params
func (o *SoftwarePackageDeleteParams) WithVersion(version string) *SoftwarePackageDeleteParams {
o.SetVersion(version)
return o
}
// SetVersion adds the version to the software package delete params
func (o *SoftwarePackageDeleteParams) SetVersion(version string) {
o.Version = version
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwarePackageDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
// path param version
if err := r.SetPathParam("version", o.Version); 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/cluster/node_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/node_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewNodeModifyParams creates a new NodeModifyParams 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 NewNodeModifyParams() *NodeModifyParams {
return &NodeModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewNodeModifyParamsWithTimeout creates a new NodeModifyParams object
// with the ability to set a timeout on a request.
func NewNodeModifyParamsWithTimeout(timeout time.Duration) *NodeModifyParams {
return &NodeModifyParams{
timeout: timeout,
}
}
// NewNodeModifyParamsWithContext creates a new NodeModifyParams object
// with the ability to set a context for a request.
func NewNodeModifyParamsWithContext(ctx context.Context) *NodeModifyParams {
return &NodeModifyParams{
Context: ctx,
}
}
// NewNodeModifyParamsWithHTTPClient creates a new NodeModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewNodeModifyParamsWithHTTPClient(client *http.Client) *NodeModifyParams {
return &NodeModifyParams{
HTTPClient: client,
}
}
/*
NodeModifyParams contains all the parameters to send to the API endpoint
for the node modify operation.
Typically these are written to a http.Request.
*/
type NodeModifyParams struct {
/* Action.
The shutdown action shuts the node down and transfers storage control to its HA group if storage failover is enabled.
The reboot action reboots the node and transfers storage control to its HA group if storage failover is enabled.
The giveback action transfers storage control back to the owner from its HA group.
The "power_off" action shuts the node down with the assistance of the service processor.
The "power_on" action restores power to the node with the assistance of the service processor.
*/
Action *string
/* AllowDataOutage.
This only applies when an action of reboot or shutdown is provided. It allows storage failover to be bypassed along with any failures related to mainintaing quorum in the cluster.
*/
AllowDataOutage *bool
/* AllowVersionMismatch.
Applies only when a reboot action is provided. It allows storage failover to be bypassed along with any failures related to software version mismatch.
*/
AllowVersionMismatch *bool
// Info.
Info *models.Node
/* 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
/* ServiceProcessorAction.
Action used to reboot the service processor (SP).
*/
ServiceProcessorAction *string
/* ServiceProcessorFirmwareImage.
Service processor image to boot with after a reboot.
*/
ServiceProcessorFirmwareImage *string
/* ShutdownRebootReason.
Indicates the reason for the reboot or shutdown. This only applies when an action of reboot or shutdown is provided.
*/
ShutdownRebootReason *string
// UUID.
//
// Format: uuid
UUID strfmt.UUID
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the node modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodeModifyParams) WithDefaults() *NodeModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the node modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodeModifyParams) SetDefaults() {
var (
allowDataOutageDefault = bool(false)
allowVersionMismatchDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := NodeModifyParams{
AllowDataOutage: &allowDataOutageDefault,
AllowVersionMismatch: &allowVersionMismatchDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the node modify params
func (o *NodeModifyParams) WithTimeout(timeout time.Duration) *NodeModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the node modify params
func (o *NodeModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the node modify params
func (o *NodeModifyParams) WithContext(ctx context.Context) *NodeModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the node modify params
func (o *NodeModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the node modify params
func (o *NodeModifyParams) WithHTTPClient(client *http.Client) *NodeModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the node modify params
func (o *NodeModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAction adds the action to the node modify params
func (o *NodeModifyParams) WithAction(action *string) *NodeModifyParams {
o.SetAction(action)
return o
}
// SetAction adds the action to the node modify params
func (o *NodeModifyParams) SetAction(action *string) {
o.Action = action
}
// WithAllowDataOutage adds the allowDataOutage to the node modify params
func (o *NodeModifyParams) WithAllowDataOutage(allowDataOutage *bool) *NodeModifyParams {
o.SetAllowDataOutage(allowDataOutage)
return o
}
// SetAllowDataOutage adds the allowDataOutage to the node modify params
func (o *NodeModifyParams) SetAllowDataOutage(allowDataOutage *bool) {
o.AllowDataOutage = allowDataOutage
}
// WithAllowVersionMismatch adds the allowVersionMismatch to the node modify params
func (o *NodeModifyParams) WithAllowVersionMismatch(allowVersionMismatch *bool) *NodeModifyParams {
o.SetAllowVersionMismatch(allowVersionMismatch)
return o
}
// SetAllowVersionMismatch adds the allowVersionMismatch to the node modify params
func (o *NodeModifyParams) SetAllowVersionMismatch(allowVersionMismatch *bool) {
o.AllowVersionMismatch = allowVersionMismatch
}
// WithInfo adds the info to the node modify params
func (o *NodeModifyParams) WithInfo(info *models.Node) *NodeModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the node modify params
func (o *NodeModifyParams) SetInfo(info *models.Node) {
o.Info = info
}
// WithReturnTimeout adds the returnTimeout to the node modify params
func (o *NodeModifyParams) WithReturnTimeout(returnTimeout *int64) *NodeModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the node modify params
func (o *NodeModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithServiceProcessorAction adds the serviceProcessorAction to the node modify params
func (o *NodeModifyParams) WithServiceProcessorAction(serviceProcessorAction *string) *NodeModifyParams {
o.SetServiceProcessorAction(serviceProcessorAction)
return o
}
// SetServiceProcessorAction adds the serviceProcessorAction to the node modify params
func (o *NodeModifyParams) SetServiceProcessorAction(serviceProcessorAction *string) {
o.ServiceProcessorAction = serviceProcessorAction
}
// WithServiceProcessorFirmwareImage adds the serviceProcessorFirmwareImage to the node modify params
func (o *NodeModifyParams) WithServiceProcessorFirmwareImage(serviceProcessorFirmwareImage *string) *NodeModifyParams {
o.SetServiceProcessorFirmwareImage(serviceProcessorFirmwareImage)
return o
}
// SetServiceProcessorFirmwareImage adds the serviceProcessorFirmwareImage to the node modify params
func (o *NodeModifyParams) SetServiceProcessorFirmwareImage(serviceProcessorFirmwareImage *string) {
o.ServiceProcessorFirmwareImage = serviceProcessorFirmwareImage
}
// WithShutdownRebootReason adds the shutdownRebootReason to the node modify params
func (o *NodeModifyParams) WithShutdownRebootReason(shutdownRebootReason *string) *NodeModifyParams {
o.SetShutdownRebootReason(shutdownRebootReason)
return o
}
// SetShutdownRebootReason adds the shutdownRebootReason to the node modify params
func (o *NodeModifyParams) SetShutdownRebootReason(shutdownRebootReason *string) {
o.ShutdownRebootReason = shutdownRebootReason
}
// WithUUID adds the uuid to the node modify params
func (o *NodeModifyParams) WithUUID(uuid strfmt.UUID) *NodeModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the node modify params
func (o *NodeModifyParams) SetUUID(uuid strfmt.UUID) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *NodeModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Action != nil {
// query param action
var qrAction string
if o.Action != nil {
qrAction = *o.Action
}
qAction := qrAction
if qAction != "" {
if err := r.SetQueryParam("action", qAction); err != nil {
return err
}
}
}
if o.AllowDataOutage != nil {
// query param allow_data_outage
var qrAllowDataOutage bool
if o.AllowDataOutage != nil {
qrAllowDataOutage = *o.AllowDataOutage
}
qAllowDataOutage := swag.FormatBool(qrAllowDataOutage)
if qAllowDataOutage != "" {
if err := r.SetQueryParam("allow_data_outage", qAllowDataOutage); err != nil {
return err
}
}
}
if o.AllowVersionMismatch != nil {
// query param allow_version_mismatch
var qrAllowVersionMismatch bool
if o.AllowVersionMismatch != nil {
qrAllowVersionMismatch = *o.AllowVersionMismatch
}
qAllowVersionMismatch := swag.FormatBool(qrAllowVersionMismatch)
if qAllowVersionMismatch != "" {
if err := r.SetQueryParam("allow_version_mismatch", qAllowVersionMismatch); err != nil {
return err
}
}
}
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.ServiceProcessorAction != nil {
// query param service_processor.action
var qrServiceProcessorAction string
if o.ServiceProcessorAction != nil {
qrServiceProcessorAction = *o.ServiceProcessorAction
}
qServiceProcessorAction := qrServiceProcessorAction
if qServiceProcessorAction != "" {
if err := r.SetQueryParam("service_processor.action", qServiceProcessorAction); err != nil {
return err
}
}
}
if o.ServiceProcessorFirmwareImage != nil {
// query param service_processor.firmware_image
var qrServiceProcessorFirmwareImage string
if o.ServiceProcessorFirmwareImage != nil {
qrServiceProcessorFirmwareImage = *o.ServiceProcessorFirmwareImage
}
qServiceProcessorFirmwareImage := qrServiceProcessorFirmwareImage
if qServiceProcessorFirmwareImage != "" {
if err := r.SetQueryParam("service_processor.firmware_image", qServiceProcessorFirmwareImage); err != nil {
return err
}
}
}
if o.ShutdownRebootReason != nil {
// query param shutdown_reboot_reason
var qrShutdownRebootReason string
if o.ShutdownRebootReason != nil {
qrShutdownRebootReason = *o.ShutdownRebootReason
}
qShutdownRebootReason := qrShutdownRebootReason
if qShutdownRebootReason != "" {
if err := r.SetQueryParam("shutdown_reboot_reason", qShutdownRebootReason); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID.String()); 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/cluster/cluster_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterModifyReader is a Reader for the ClusterModify structure.
type ClusterModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewClusterModifyAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterModifyDefault(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
}
}
// NewClusterModifyAccepted creates a ClusterModifyAccepted with default headers values
func NewClusterModifyAccepted() *ClusterModifyAccepted {
return &ClusterModifyAccepted{}
}
/*
ClusterModifyAccepted describes a response with status code 202, with default header values.
Accepted
*/
type ClusterModifyAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this cluster modify accepted response has a 2xx status code
func (o *ClusterModifyAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster modify accepted response has a 3xx status code
func (o *ClusterModifyAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster modify accepted response has a 4xx status code
func (o *ClusterModifyAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster modify accepted response has a 5xx status code
func (o *ClusterModifyAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this cluster modify accepted response a status code equal to that given
func (o *ClusterModifyAccepted) IsCode(code int) bool {
return code == 202
}
func (o *ClusterModifyAccepted) Error() string {
return fmt.Sprintf("[PATCH /cluster][%d] clusterModifyAccepted %+v", 202, o.Payload)
}
func (o *ClusterModifyAccepted) String() string {
return fmt.Sprintf("[PATCH /cluster][%d] clusterModifyAccepted %+v", 202, o.Payload)
}
func (o *ClusterModifyAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *ClusterModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterModifyDefault creates a ClusterModifyDefault with default headers values
func NewClusterModifyDefault(code int) *ClusterModifyDefault {
return &ClusterModifyDefault{
_statusCode: code,
}
}
/*
ClusterModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 3604491 | Updating timezone failed. |
| 3604520 | Internal error. System state is not correct to read or change timezone. |
| 8847361 | Too many DNS domains provided. |
| 8847362 | Too many name servers provided. |
| 9240587 | A name must be provided. |
| 12451843 | Certificate does not exist. |
*/
type ClusterModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster modify default response
func (o *ClusterModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster modify default response has a 2xx status code
func (o *ClusterModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster modify default response has a 3xx status code
func (o *ClusterModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster modify default response has a 4xx status code
func (o *ClusterModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster modify default response has a 5xx status code
func (o *ClusterModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster modify default response a status code equal to that given
func (o *ClusterModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster][%d] cluster_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster][%d] cluster_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterModifyDefault) 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/cluster/software_package_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_package_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwarePackageGetParams creates a new SoftwarePackageGetParams 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 NewSoftwarePackageGetParams() *SoftwarePackageGetParams {
return &SoftwarePackageGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwarePackageGetParamsWithTimeout creates a new SoftwarePackageGetParams object
// with the ability to set a timeout on a request.
func NewSoftwarePackageGetParamsWithTimeout(timeout time.Duration) *SoftwarePackageGetParams {
return &SoftwarePackageGetParams{
timeout: timeout,
}
}
// NewSoftwarePackageGetParamsWithContext creates a new SoftwarePackageGetParams object
// with the ability to set a context for a request.
func NewSoftwarePackageGetParamsWithContext(ctx context.Context) *SoftwarePackageGetParams {
return &SoftwarePackageGetParams{
Context: ctx,
}
}
// NewSoftwarePackageGetParamsWithHTTPClient creates a new SoftwarePackageGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwarePackageGetParamsWithHTTPClient(client *http.Client) *SoftwarePackageGetParams {
return &SoftwarePackageGetParams{
HTTPClient: client,
}
}
/*
SoftwarePackageGetParams contains all the parameters to send to the API endpoint
for the software package get operation.
Typically these are written to a http.Request.
*/
type SoftwarePackageGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
// Version.
Version string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the software package get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageGetParams) WithDefaults() *SoftwarePackageGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software package get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the software package get params
func (o *SoftwarePackageGetParams) WithTimeout(timeout time.Duration) *SoftwarePackageGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software package get params
func (o *SoftwarePackageGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software package get params
func (o *SoftwarePackageGetParams) WithContext(ctx context.Context) *SoftwarePackageGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software package get params
func (o *SoftwarePackageGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software package get params
func (o *SoftwarePackageGetParams) WithHTTPClient(client *http.Client) *SoftwarePackageGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software package get params
func (o *SoftwarePackageGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the software package get params
func (o *SoftwarePackageGetParams) WithFields(fields []string) *SoftwarePackageGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the software package get params
func (o *SoftwarePackageGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithVersion adds the version to the software package get params
func (o *SoftwarePackageGetParams) WithVersion(version string) *SoftwarePackageGetParams {
o.SetVersion(version)
return o
}
// SetVersion adds the version to the software package get params
func (o *SoftwarePackageGetParams) SetVersion(version string) {
o.Version = version
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwarePackageGetParams) 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 version
if err := r.SetPathParam("version", o.Version); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSoftwarePackageGet binds the parameter fields
func (o *SoftwarePackageGetParams) 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/cluster/cluster_peer_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_peer_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterPeerCreateParams creates a new ClusterPeerCreateParams 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 NewClusterPeerCreateParams() *ClusterPeerCreateParams {
return &ClusterPeerCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterPeerCreateParamsWithTimeout creates a new ClusterPeerCreateParams object
// with the ability to set a timeout on a request.
func NewClusterPeerCreateParamsWithTimeout(timeout time.Duration) *ClusterPeerCreateParams {
return &ClusterPeerCreateParams{
timeout: timeout,
}
}
// NewClusterPeerCreateParamsWithContext creates a new ClusterPeerCreateParams object
// with the ability to set a context for a request.
func NewClusterPeerCreateParamsWithContext(ctx context.Context) *ClusterPeerCreateParams {
return &ClusterPeerCreateParams{
Context: ctx,
}
}
// NewClusterPeerCreateParamsWithHTTPClient creates a new ClusterPeerCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterPeerCreateParamsWithHTTPClient(client *http.Client) *ClusterPeerCreateParams {
return &ClusterPeerCreateParams{
HTTPClient: client,
}
}
/*
ClusterPeerCreateParams contains all the parameters to send to the API endpoint
for the cluster peer create operation.
Typically these are written to a http.Request.
*/
type ClusterPeerCreateParams struct {
/* Info.
Info specification
*/
Info *models.ClusterPeer
/* 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 cluster peer create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterPeerCreateParams) WithDefaults() *ClusterPeerCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster peer create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterPeerCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := ClusterPeerCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the cluster peer create params
func (o *ClusterPeerCreateParams) WithTimeout(timeout time.Duration) *ClusterPeerCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster peer create params
func (o *ClusterPeerCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster peer create params
func (o *ClusterPeerCreateParams) WithContext(ctx context.Context) *ClusterPeerCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster peer create params
func (o *ClusterPeerCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster peer create params
func (o *ClusterPeerCreateParams) WithHTTPClient(client *http.Client) *ClusterPeerCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster peer create params
func (o *ClusterPeerCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the cluster peer create params
func (o *ClusterPeerCreateParams) WithInfo(info *models.ClusterPeer) *ClusterPeerCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the cluster peer create params
func (o *ClusterPeerCreateParams) SetInfo(info *models.ClusterPeer) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the cluster peer create params
func (o *ClusterPeerCreateParams) WithReturnRecords(returnRecords *bool) *ClusterPeerCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the cluster peer create params
func (o *ClusterPeerCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterPeerCreateParams) 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/cluster/metrocluster_dr_group_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_dr_group_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewMetroclusterDrGroupCollectionGetParams creates a new MetroclusterDrGroupCollectionGetParams 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 NewMetroclusterDrGroupCollectionGetParams() *MetroclusterDrGroupCollectionGetParams {
return &MetroclusterDrGroupCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewMetroclusterDrGroupCollectionGetParamsWithTimeout creates a new MetroclusterDrGroupCollectionGetParams object
// with the ability to set a timeout on a request.
func NewMetroclusterDrGroupCollectionGetParamsWithTimeout(timeout time.Duration) *MetroclusterDrGroupCollectionGetParams {
return &MetroclusterDrGroupCollectionGetParams{
timeout: timeout,
}
}
// NewMetroclusterDrGroupCollectionGetParamsWithContext creates a new MetroclusterDrGroupCollectionGetParams object
// with the ability to set a context for a request.
func NewMetroclusterDrGroupCollectionGetParamsWithContext(ctx context.Context) *MetroclusterDrGroupCollectionGetParams {
return &MetroclusterDrGroupCollectionGetParams{
Context: ctx,
}
}
// NewMetroclusterDrGroupCollectionGetParamsWithHTTPClient creates a new MetroclusterDrGroupCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewMetroclusterDrGroupCollectionGetParamsWithHTTPClient(client *http.Client) *MetroclusterDrGroupCollectionGetParams {
return &MetroclusterDrGroupCollectionGetParams{
HTTPClient: client,
}
}
/*
MetroclusterDrGroupCollectionGetParams contains all the parameters to send to the API endpoint
for the metrocluster dr group collection get operation.
Typically these are written to a http.Request.
*/
type MetroclusterDrGroupCollectionGetParams struct {
/* DrPairsNodeName.
Filter by dr_pairs.node.name
*/
DrPairsNodeName *string
/* DrPairsNodeUUID.
Filter by dr_pairs.node.uuid
*/
DrPairsNodeUUID *string
/* DrPairsPartnerName.
Filter by dr_pairs.partner.name
*/
DrPairsPartnerName *string
/* DrPairsPartnerUUID.
Filter by dr_pairs.partner.uuid
*/
DrPairsPartnerUUID *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* ID.
Filter by id
*/
ID *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
/* PartnerClusterName.
Filter by partner_cluster.name
*/
PartnerClusterName *string
/* PartnerClusterUUID.
Filter by partner_cluster.uuid
*/
PartnerClusterUUID *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 metrocluster dr group collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupCollectionGetParams) WithDefaults() *MetroclusterDrGroupCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the metrocluster dr group collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := MetroclusterDrGroupCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithTimeout(timeout time.Duration) *MetroclusterDrGroupCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithContext(ctx context.Context) *MetroclusterDrGroupCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithHTTPClient(client *http.Client) *MetroclusterDrGroupCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDrPairsNodeName adds the drPairsNodeName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithDrPairsNodeName(drPairsNodeName *string) *MetroclusterDrGroupCollectionGetParams {
o.SetDrPairsNodeName(drPairsNodeName)
return o
}
// SetDrPairsNodeName adds the drPairsNodeName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetDrPairsNodeName(drPairsNodeName *string) {
o.DrPairsNodeName = drPairsNodeName
}
// WithDrPairsNodeUUID adds the drPairsNodeUUID to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithDrPairsNodeUUID(drPairsNodeUUID *string) *MetroclusterDrGroupCollectionGetParams {
o.SetDrPairsNodeUUID(drPairsNodeUUID)
return o
}
// SetDrPairsNodeUUID adds the drPairsNodeUuid to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetDrPairsNodeUUID(drPairsNodeUUID *string) {
o.DrPairsNodeUUID = drPairsNodeUUID
}
// WithDrPairsPartnerName adds the drPairsPartnerName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithDrPairsPartnerName(drPairsPartnerName *string) *MetroclusterDrGroupCollectionGetParams {
o.SetDrPairsPartnerName(drPairsPartnerName)
return o
}
// SetDrPairsPartnerName adds the drPairsPartnerName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetDrPairsPartnerName(drPairsPartnerName *string) {
o.DrPairsPartnerName = drPairsPartnerName
}
// WithDrPairsPartnerUUID adds the drPairsPartnerUUID to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithDrPairsPartnerUUID(drPairsPartnerUUID *string) *MetroclusterDrGroupCollectionGetParams {
o.SetDrPairsPartnerUUID(drPairsPartnerUUID)
return o
}
// SetDrPairsPartnerUUID adds the drPairsPartnerUuid to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetDrPairsPartnerUUID(drPairsPartnerUUID *string) {
o.DrPairsPartnerUUID = drPairsPartnerUUID
}
// WithFields adds the fields to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithFields(fields []string) *MetroclusterDrGroupCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithID adds the id to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithID(id *int64) *MetroclusterDrGroupCollectionGetParams {
o.SetID(id)
return o
}
// SetID adds the id to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetID(id *int64) {
o.ID = id
}
// WithMaxRecords adds the maxRecords to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithMaxRecords(maxRecords *int64) *MetroclusterDrGroupCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithOrderBy(orderBy []string) *MetroclusterDrGroupCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPartnerClusterName adds the partnerClusterName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithPartnerClusterName(partnerClusterName *string) *MetroclusterDrGroupCollectionGetParams {
o.SetPartnerClusterName(partnerClusterName)
return o
}
// SetPartnerClusterName adds the partnerClusterName to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetPartnerClusterName(partnerClusterName *string) {
o.PartnerClusterName = partnerClusterName
}
// WithPartnerClusterUUID adds the partnerClusterUUID to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithPartnerClusterUUID(partnerClusterUUID *string) *MetroclusterDrGroupCollectionGetParams {
o.SetPartnerClusterUUID(partnerClusterUUID)
return o
}
// SetPartnerClusterUUID adds the partnerClusterUuid to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetPartnerClusterUUID(partnerClusterUUID *string) {
o.PartnerClusterUUID = partnerClusterUUID
}
// WithReturnRecords adds the returnRecords to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithReturnRecords(returnRecords *bool) *MetroclusterDrGroupCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *MetroclusterDrGroupCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the metrocluster dr group collection get params
func (o *MetroclusterDrGroupCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *MetroclusterDrGroupCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DrPairsNodeName != nil {
// query param dr_pairs.node.name
var qrDrPairsNodeName string
if o.DrPairsNodeName != nil {
qrDrPairsNodeName = *o.DrPairsNodeName
}
qDrPairsNodeName := qrDrPairsNodeName
if qDrPairsNodeName != "" {
if err := r.SetQueryParam("dr_pairs.node.name", qDrPairsNodeName); err != nil {
return err
}
}
}
if o.DrPairsNodeUUID != nil {
// query param dr_pairs.node.uuid
var qrDrPairsNodeUUID string
if o.DrPairsNodeUUID != nil {
qrDrPairsNodeUUID = *o.DrPairsNodeUUID
}
qDrPairsNodeUUID := qrDrPairsNodeUUID
if qDrPairsNodeUUID != "" {
if err := r.SetQueryParam("dr_pairs.node.uuid", qDrPairsNodeUUID); err != nil {
return err
}
}
}
if o.DrPairsPartnerName != nil {
// query param dr_pairs.partner.name
var qrDrPairsPartnerName string
if o.DrPairsPartnerName != nil {
qrDrPairsPartnerName = *o.DrPairsPartnerName
}
qDrPairsPartnerName := qrDrPairsPartnerName
if qDrPairsPartnerName != "" {
if err := r.SetQueryParam("dr_pairs.partner.name", qDrPairsPartnerName); err != nil {
return err
}
}
}
if o.DrPairsPartnerUUID != nil {
// query param dr_pairs.partner.uuid
var qrDrPairsPartnerUUID string
if o.DrPairsPartnerUUID != nil {
qrDrPairsPartnerUUID = *o.DrPairsPartnerUUID
}
qDrPairsPartnerUUID := qrDrPairsPartnerUUID
if qDrPairsPartnerUUID != "" {
if err := r.SetQueryParam("dr_pairs.partner.uuid", qDrPairsPartnerUUID); err != nil {
return err
}
}
}
if o.Fields != nil {
// binding items for fields
joinedFields := o.bindParamFields(reg)
// query array param fields
if err := r.SetQueryParam("fields", joinedFields...); err != nil {
return err
}
}
if o.ID != nil {
// query param id
var qrID int64
if o.ID != nil {
qrID = *o.ID
}
qID := swag.FormatInt64(qrID)
if qID != "" {
if err := r.SetQueryParam("id", qID); err != nil {
return err
}
}
}
if o.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.PartnerClusterName != nil {
// query param partner_cluster.name
var qrPartnerClusterName string
if o.PartnerClusterName != nil {
qrPartnerClusterName = *o.PartnerClusterName
}
qPartnerClusterName := qrPartnerClusterName
if qPartnerClusterName != "" {
if err := r.SetQueryParam("partner_cluster.name", qPartnerClusterName); err != nil {
return err
}
}
}
if o.PartnerClusterUUID != nil {
// query param partner_cluster.uuid
var qrPartnerClusterUUID string
if o.PartnerClusterUUID != nil {
qrPartnerClusterUUID = *o.PartnerClusterUUID
}
qPartnerClusterUUID := qrPartnerClusterUUID
if qPartnerClusterUUID != "" {
if err := r.SetQueryParam("partner_cluster.uuid", qPartnerClusterUUID); 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
}
// bindParamMetroclusterDrGroupCollectionGet binds the parameter fields
func (o *MetroclusterDrGroupCollectionGetParams) 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
}
// bindParamMetroclusterDrGroupCollectionGet binds the parameter order_by
func (o *MetroclusterDrGroupCollectionGetParams) 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/cluster/cluster_ntp_keys_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_keys_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterNtpKeysDeleteParams creates a new ClusterNtpKeysDeleteParams 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 NewClusterNtpKeysDeleteParams() *ClusterNtpKeysDeleteParams {
return &ClusterNtpKeysDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterNtpKeysDeleteParamsWithTimeout creates a new ClusterNtpKeysDeleteParams object
// with the ability to set a timeout on a request.
func NewClusterNtpKeysDeleteParamsWithTimeout(timeout time.Duration) *ClusterNtpKeysDeleteParams {
return &ClusterNtpKeysDeleteParams{
timeout: timeout,
}
}
// NewClusterNtpKeysDeleteParamsWithContext creates a new ClusterNtpKeysDeleteParams object
// with the ability to set a context for a request.
func NewClusterNtpKeysDeleteParamsWithContext(ctx context.Context) *ClusterNtpKeysDeleteParams {
return &ClusterNtpKeysDeleteParams{
Context: ctx,
}
}
// NewClusterNtpKeysDeleteParamsWithHTTPClient creates a new ClusterNtpKeysDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterNtpKeysDeleteParamsWithHTTPClient(client *http.Client) *ClusterNtpKeysDeleteParams {
return &ClusterNtpKeysDeleteParams{
HTTPClient: client,
}
}
/*
ClusterNtpKeysDeleteParams contains all the parameters to send to the API endpoint
for the cluster ntp keys delete operation.
Typically these are written to a http.Request.
*/
type ClusterNtpKeysDeleteParams struct {
/* ID.
Key identifier
*/
ID int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster ntp keys delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysDeleteParams) WithDefaults() *ClusterNtpKeysDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster ntp keys delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) WithTimeout(timeout time.Duration) *ClusterNtpKeysDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) WithContext(ctx context.Context) *ClusterNtpKeysDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) WithHTTPClient(client *http.Client) *ClusterNtpKeysDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) WithID(id int64) *ClusterNtpKeysDeleteParams {
o.SetID(id)
return o
}
// SetID adds the id to the cluster ntp keys delete params
func (o *ClusterNtpKeysDeleteParams) SetID(id int64) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterNtpKeysDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param id
if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); 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/cluster/cluster_collection_performance_metrics_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_collection_performance_metrics_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterCollectionPerformanceMetricsGetParams creates a new ClusterCollectionPerformanceMetricsGetParams 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 NewClusterCollectionPerformanceMetricsGetParams() *ClusterCollectionPerformanceMetricsGetParams {
return &ClusterCollectionPerformanceMetricsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterCollectionPerformanceMetricsGetParamsWithTimeout creates a new ClusterCollectionPerformanceMetricsGetParams object
// with the ability to set a timeout on a request.
func NewClusterCollectionPerformanceMetricsGetParamsWithTimeout(timeout time.Duration) *ClusterCollectionPerformanceMetricsGetParams {
return &ClusterCollectionPerformanceMetricsGetParams{
timeout: timeout,
}
}
// NewClusterCollectionPerformanceMetricsGetParamsWithContext creates a new ClusterCollectionPerformanceMetricsGetParams object
// with the ability to set a context for a request.
func NewClusterCollectionPerformanceMetricsGetParamsWithContext(ctx context.Context) *ClusterCollectionPerformanceMetricsGetParams {
return &ClusterCollectionPerformanceMetricsGetParams{
Context: ctx,
}
}
// NewClusterCollectionPerformanceMetricsGetParamsWithHTTPClient creates a new ClusterCollectionPerformanceMetricsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterCollectionPerformanceMetricsGetParamsWithHTTPClient(client *http.Client) *ClusterCollectionPerformanceMetricsGetParams {
return &ClusterCollectionPerformanceMetricsGetParams{
HTTPClient: client,
}
}
/*
ClusterCollectionPerformanceMetricsGetParams contains all the parameters to send to the API endpoint
for the cluster collection performance metrics get operation.
Typically these are written to a http.Request.
*/
type ClusterCollectionPerformanceMetricsGetParams 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, or 1y.
The period for each time range is specified 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
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterCollectionPerformanceMetricsGetParams) WithDefaults() *ClusterCollectionPerformanceMetricsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster collection performance metrics get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterCollectionPerformanceMetricsGetParams) SetDefaults() {
var (
intervalDefault = string("1h")
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := ClusterCollectionPerformanceMetricsGetParams{
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 cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithTimeout(timeout time.Duration) *ClusterCollectionPerformanceMetricsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithContext(ctx context.Context) *ClusterCollectionPerformanceMetricsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithHTTPClient(client *http.Client) *ClusterCollectionPerformanceMetricsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDuration adds the duration to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithDuration(duration *string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetDuration(duration)
return o
}
// SetDuration adds the duration to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetDuration(duration *string) {
o.Duration = duration
}
// WithFields adds the fields to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithFields(fields []string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithInterval adds the interval to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithInterval(interval *string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetInterval(interval)
return o
}
// SetInterval adds the interval to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetInterval(interval *string) {
o.Interval = interval
}
// WithIopsOther adds the iopsOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithIopsOther(iopsOther *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetIopsOther(iopsOther)
return o
}
// SetIopsOther adds the iopsOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetIopsOther(iopsOther *int64) {
o.IopsOther = iopsOther
}
// WithIopsRead adds the iopsRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithIopsRead(iopsRead *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetIopsRead(iopsRead)
return o
}
// SetIopsRead adds the iopsRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetIopsRead(iopsRead *int64) {
o.IopsRead = iopsRead
}
// WithIopsTotal adds the iopsTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithIopsTotal(iopsTotal *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetIopsTotal(iopsTotal)
return o
}
// SetIopsTotal adds the iopsTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetIopsTotal(iopsTotal *int64) {
o.IopsTotal = iopsTotal
}
// WithIopsWrite adds the iopsWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithIopsWrite(iopsWrite *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetIopsWrite(iopsWrite)
return o
}
// SetIopsWrite adds the iopsWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetIopsWrite(iopsWrite *int64) {
o.IopsWrite = iopsWrite
}
// WithLatencyOther adds the latencyOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithLatencyOther(latencyOther *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetLatencyOther(latencyOther)
return o
}
// SetLatencyOther adds the latencyOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetLatencyOther(latencyOther *int64) {
o.LatencyOther = latencyOther
}
// WithLatencyRead adds the latencyRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithLatencyRead(latencyRead *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetLatencyRead(latencyRead)
return o
}
// SetLatencyRead adds the latencyRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetLatencyRead(latencyRead *int64) {
o.LatencyRead = latencyRead
}
// WithLatencyTotal adds the latencyTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithLatencyTotal(latencyTotal *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetLatencyTotal(latencyTotal)
return o
}
// SetLatencyTotal adds the latencyTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetLatencyTotal(latencyTotal *int64) {
o.LatencyTotal = latencyTotal
}
// WithLatencyWrite adds the latencyWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithLatencyWrite(latencyWrite *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetLatencyWrite(latencyWrite)
return o
}
// SetLatencyWrite adds the latencyWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetLatencyWrite(latencyWrite *int64) {
o.LatencyWrite = latencyWrite
}
// WithMaxRecords adds the maxRecords to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithMaxRecords(maxRecords *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithOrderBy(orderBy []string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithReturnRecords(returnRecords *bool) *ClusterCollectionPerformanceMetricsGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithReturnTimeout(returnTimeout *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithStatus adds the status to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithStatus(status *string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetStatus(status)
return o
}
// SetStatus adds the status to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetStatus(status *string) {
o.Status = status
}
// WithThroughputOther adds the throughputOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithThroughputOther(throughputOther *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetThroughputOther(throughputOther)
return o
}
// SetThroughputOther adds the throughputOther to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetThroughputOther(throughputOther *int64) {
o.ThroughputOther = throughputOther
}
// WithThroughputRead adds the throughputRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithThroughputRead(throughputRead *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetThroughputRead(throughputRead)
return o
}
// SetThroughputRead adds the throughputRead to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetThroughputRead(throughputRead *int64) {
o.ThroughputRead = throughputRead
}
// WithThroughputTotal adds the throughputTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithThroughputTotal(throughputTotal *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetThroughputTotal(throughputTotal)
return o
}
// SetThroughputTotal adds the throughputTotal to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetThroughputTotal(throughputTotal *int64) {
o.ThroughputTotal = throughputTotal
}
// WithThroughputWrite adds the throughputWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithThroughputWrite(throughputWrite *int64) *ClusterCollectionPerformanceMetricsGetParams {
o.SetThroughputWrite(throughputWrite)
return o
}
// SetThroughputWrite adds the throughputWrite to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetThroughputWrite(throughputWrite *int64) {
o.ThroughputWrite = throughputWrite
}
// WithTimestamp adds the timestamp to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) WithTimestamp(timestamp *string) *ClusterCollectionPerformanceMetricsGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the cluster collection performance metrics get params
func (o *ClusterCollectionPerformanceMetricsGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterCollectionPerformanceMetricsGetParams) 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
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamClusterCollectionPerformanceMetricsGet binds the parameter fields
func (o *ClusterCollectionPerformanceMetricsGetParams) 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
}
// bindParamClusterCollectionPerformanceMetricsGet binds the parameter order_by
func (o *ClusterCollectionPerformanceMetricsGetParams) 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/cluster/cluster_peer_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_peer_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterPeerModifyReader is a Reader for the ClusterPeerModify structure.
type ClusterPeerModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterPeerModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterPeerModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterPeerModifyDefault(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
}
}
// NewClusterPeerModifyOK creates a ClusterPeerModifyOK with default headers values
func NewClusterPeerModifyOK() *ClusterPeerModifyOK {
return &ClusterPeerModifyOK{}
}
/*
ClusterPeerModifyOK describes a response with status code 200, with default header values.
OK
*/
type ClusterPeerModifyOK struct {
Payload *models.ClusterPeerSetupResponse
}
// IsSuccess returns true when this cluster peer modify o k response has a 2xx status code
func (o *ClusterPeerModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster peer modify o k response has a 3xx status code
func (o *ClusterPeerModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster peer modify o k response has a 4xx status code
func (o *ClusterPeerModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster peer modify o k response has a 5xx status code
func (o *ClusterPeerModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster peer modify o k response a status code equal to that given
func (o *ClusterPeerModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterPeerModifyOK) Error() string {
return fmt.Sprintf("[PATCH /cluster/peers/{uuid}][%d] clusterPeerModifyOK %+v", 200, o.Payload)
}
func (o *ClusterPeerModifyOK) String() string {
return fmt.Sprintf("[PATCH /cluster/peers/{uuid}][%d] clusterPeerModifyOK %+v", 200, o.Payload)
}
func (o *ClusterPeerModifyOK) GetPayload() *models.ClusterPeerSetupResponse {
return o.Payload
}
func (o *ClusterPeerModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ClusterPeerSetupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewClusterPeerModifyDefault creates a ClusterPeerModifyDefault with default headers values
func NewClusterPeerModifyDefault(code int) *ClusterPeerModifyDefault {
return &ClusterPeerModifyDefault{
_statusCode: code,
}
}
/*
ClusterPeerModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4653261 | Error finding IPspace. |
| 4655058 | Expiration time cannot be more than 7 days in the future. |
| 4656070 | The encryption protocol is meaningful only with authenticated cluster peer relationships. |
| 4656072 | The name must conform to the same rules as a cluster name. |
| 4656073 | Changing the encryption state requires the refreshing of the authentication passphrase. |
| 4656075 | Cannot specify encryption: this operation requires an ECV of ONTAP 9.6.0 or later. |
| 4656076 | Cluster peer modify was attempted with mismatched IPv4 and IPv6 addresses. |
| 4656081 | The remote IP address list is empty. |
| 4656082 | Specify either a passphrase or \"-generate-passphrase\". |
| 4656083 | Cannot auto-generate a passphrase when \"generate-passphrase\" is false. Modifying a passphrase using an auto-generated passphrase requires \"generate-passphrase\" be true. |
| 4656084 | Passphrase can only be modified with an authenticated cluster peer relationship. |
| 4656092 | Cluster peer modify was attempted with a host name that did not resolve to an IPv4 or IPv6 address. |
| 4656095 | The address family of the specified peer addresses is not valid in this IPspace. Use /api/network/interfaces/ to verify that required LIFs are present and operational on each cluster node. |
*/
type ClusterPeerModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster peer modify default response
func (o *ClusterPeerModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster peer modify default response has a 2xx status code
func (o *ClusterPeerModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster peer modify default response has a 3xx status code
func (o *ClusterPeerModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster peer modify default response has a 4xx status code
func (o *ClusterPeerModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster peer modify default response has a 5xx status code
func (o *ClusterPeerModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster peer modify default response a status code equal to that given
func (o *ClusterPeerModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterPeerModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster/peers/{uuid}][%d] cluster_peer_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterPeerModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster/peers/{uuid}][%d] cluster_peer_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterPeerModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterPeerModifyDefault) 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/cluster/schedule_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/schedule_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ScheduleModifyReader is a Reader for the ScheduleModify structure.
type ScheduleModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ScheduleModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewScheduleModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewScheduleModifyDefault(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
}
}
// NewScheduleModifyOK creates a ScheduleModifyOK with default headers values
func NewScheduleModifyOK() *ScheduleModifyOK {
return &ScheduleModifyOK{}
}
/*
ScheduleModifyOK describes a response with status code 200, with default header values.
OK
*/
type ScheduleModifyOK struct {
}
// IsSuccess returns true when this schedule modify o k response has a 2xx status code
func (o *ScheduleModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this schedule modify o k response has a 3xx status code
func (o *ScheduleModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this schedule modify o k response has a 4xx status code
func (o *ScheduleModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this schedule modify o k response has a 5xx status code
func (o *ScheduleModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this schedule modify o k response a status code equal to that given
func (o *ScheduleModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *ScheduleModifyOK) Error() string {
return fmt.Sprintf("[PATCH /cluster/schedules/{uuid}][%d] scheduleModifyOK ", 200)
}
func (o *ScheduleModifyOK) String() string {
return fmt.Sprintf("[PATCH /cluster/schedules/{uuid}][%d] scheduleModifyOK ", 200)
}
func (o *ScheduleModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewScheduleModifyDefault creates a ScheduleModifyDefault with default headers values
func NewScheduleModifyDefault(code int) *ScheduleModifyDefault {
return &ScheduleModifyDefault{
_statusCode: code,
}
}
/*
ScheduleModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 458788 | The schedule specified is not a valid schedule. |
| 459760 | The schedule specified is not a valid schedule. |
| 459761 | Schedule cannot be modified on this cluster because it is replicated from the remote cluster. |
| 460783 | As this is a MetroCluster configuration and the local cluster is waiting for switchback, changes to non-system schedules are not allowed. |
*/
type ScheduleModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the schedule modify default response
func (o *ScheduleModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this schedule modify default response has a 2xx status code
func (o *ScheduleModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this schedule modify default response has a 3xx status code
func (o *ScheduleModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this schedule modify default response has a 4xx status code
func (o *ScheduleModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this schedule modify default response has a 5xx status code
func (o *ScheduleModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this schedule modify default response a status code equal to that given
func (o *ScheduleModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ScheduleModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster/schedules/{uuid}][%d] schedule_modify default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster/schedules/{uuid}][%d] schedule_modify default %+v", o._statusCode, o.Payload)
}
func (o *ScheduleModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ScheduleModifyDefault) 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/cluster/cluster_ntp_keys_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_keys_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// ClusterNtpKeysDeleteReader is a Reader for the ClusterNtpKeysDelete structure.
type ClusterNtpKeysDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterNtpKeysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterNtpKeysDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterNtpKeysDeleteDefault(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
}
}
// NewClusterNtpKeysDeleteOK creates a ClusterNtpKeysDeleteOK with default headers values
func NewClusterNtpKeysDeleteOK() *ClusterNtpKeysDeleteOK {
return &ClusterNtpKeysDeleteOK{}
}
/*
ClusterNtpKeysDeleteOK describes a response with status code 200, with default header values.
OK
*/
type ClusterNtpKeysDeleteOK struct {
}
// IsSuccess returns true when this cluster ntp keys delete o k response has a 2xx status code
func (o *ClusterNtpKeysDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster ntp keys delete o k response has a 3xx status code
func (o *ClusterNtpKeysDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster ntp keys delete o k response has a 4xx status code
func (o *ClusterNtpKeysDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster ntp keys delete o k response has a 5xx status code
func (o *ClusterNtpKeysDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster ntp keys delete o k response a status code equal to that given
func (o *ClusterNtpKeysDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterNtpKeysDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /cluster/ntp/keys/{id}][%d] clusterNtpKeysDeleteOK ", 200)
}
func (o *ClusterNtpKeysDeleteOK) String() string {
return fmt.Sprintf("[DELETE /cluster/ntp/keys/{id}][%d] clusterNtpKeysDeleteOK ", 200)
}
func (o *ClusterNtpKeysDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClusterNtpKeysDeleteDefault creates a ClusterNtpKeysDeleteDefault with default headers values
func NewClusterNtpKeysDeleteDefault(code int) *ClusterNtpKeysDeleteDefault {
return &ClusterNtpKeysDeleteDefault{
_statusCode: code,
}
}
/*
ClusterNtpKeysDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 2097186 | The key cannot be deleted because it is being used by an NTP server. |
*/
type ClusterNtpKeysDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster ntp keys delete default response
func (o *ClusterNtpKeysDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster ntp keys delete default response has a 2xx status code
func (o *ClusterNtpKeysDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster ntp keys delete default response has a 3xx status code
func (o *ClusterNtpKeysDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster ntp keys delete default response has a 4xx status code
func (o *ClusterNtpKeysDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster ntp keys delete default response has a 5xx status code
func (o *ClusterNtpKeysDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster ntp keys delete default response a status code equal to that given
func (o *ClusterNtpKeysDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterNtpKeysDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /cluster/ntp/keys/{id}][%d] cluster_ntp_keys_delete default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpKeysDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /cluster/ntp/keys/{id}][%d] cluster_ntp_keys_delete default %+v", o._statusCode, o.Payload)
}
func (o *ClusterNtpKeysDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterNtpKeysDeleteDefault) 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/cluster/nodes_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/nodes_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewNodesCreateParams creates a new NodesCreateParams 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 NewNodesCreateParams() *NodesCreateParams {
return &NodesCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewNodesCreateParamsWithTimeout creates a new NodesCreateParams object
// with the ability to set a timeout on a request.
func NewNodesCreateParamsWithTimeout(timeout time.Duration) *NodesCreateParams {
return &NodesCreateParams{
timeout: timeout,
}
}
// NewNodesCreateParamsWithContext creates a new NodesCreateParams object
// with the ability to set a context for a request.
func NewNodesCreateParamsWithContext(ctx context.Context) *NodesCreateParams {
return &NodesCreateParams{
Context: ctx,
}
}
// NewNodesCreateParamsWithHTTPClient creates a new NodesCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewNodesCreateParamsWithHTTPClient(client *http.Client) *NodesCreateParams {
return &NodesCreateParams{
HTTPClient: client,
}
}
/*
NodesCreateParams contains all the parameters to send to the API endpoint
for the nodes create operation.
Typically these are written to a http.Request.
*/
type NodesCreateParams struct {
/* CreateRecommendedAggregates.
Creates aggregates based on an optimal layout recommended by the system.
*/
CreateRecommendedAggregates *bool
/* Info.
An object containing an array of nodes.
*/
Info *models.Node
/* 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 nodes create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodesCreateParams) WithDefaults() *NodesCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the nodes create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *NodesCreateParams) SetDefaults() {
var (
createRecommendedAggregatesDefault = bool(false)
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := NodesCreateParams{
CreateRecommendedAggregates: &createRecommendedAggregatesDefault,
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the nodes create params
func (o *NodesCreateParams) WithTimeout(timeout time.Duration) *NodesCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the nodes create params
func (o *NodesCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the nodes create params
func (o *NodesCreateParams) WithContext(ctx context.Context) *NodesCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the nodes create params
func (o *NodesCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the nodes create params
func (o *NodesCreateParams) WithHTTPClient(client *http.Client) *NodesCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the nodes create params
func (o *NodesCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCreateRecommendedAggregates adds the createRecommendedAggregates to the nodes create params
func (o *NodesCreateParams) WithCreateRecommendedAggregates(createRecommendedAggregates *bool) *NodesCreateParams {
o.SetCreateRecommendedAggregates(createRecommendedAggregates)
return o
}
// SetCreateRecommendedAggregates adds the createRecommendedAggregates to the nodes create params
func (o *NodesCreateParams) SetCreateRecommendedAggregates(createRecommendedAggregates *bool) {
o.CreateRecommendedAggregates = createRecommendedAggregates
}
// WithInfo adds the info to the nodes create params
func (o *NodesCreateParams) WithInfo(info *models.Node) *NodesCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the nodes create params
func (o *NodesCreateParams) SetInfo(info *models.Node) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the nodes create params
func (o *NodesCreateParams) WithReturnRecords(returnRecords *bool) *NodesCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the nodes create params
func (o *NodesCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the nodes create params
func (o *NodesCreateParams) WithReturnTimeout(returnTimeout *int64) *NodesCreateParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the nodes create params
func (o *NodesCreateParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *NodesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CreateRecommendedAggregates != nil {
// query param create_recommended_aggregates
var qrCreateRecommendedAggregates bool
if o.CreateRecommendedAggregates != nil {
qrCreateRecommendedAggregates = *o.CreateRecommendedAggregates
}
qCreateRecommendedAggregates := swag.FormatBool(qrCreateRecommendedAggregates)
if qCreateRecommendedAggregates != "" {
if err := r.SetQueryParam("create_recommended_aggregates", qCreateRecommendedAggregates); 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 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/cluster/cluster_peer_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_peer_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterPeerGetParams creates a new ClusterPeerGetParams 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 NewClusterPeerGetParams() *ClusterPeerGetParams {
return &ClusterPeerGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterPeerGetParamsWithTimeout creates a new ClusterPeerGetParams object
// with the ability to set a timeout on a request.
func NewClusterPeerGetParamsWithTimeout(timeout time.Duration) *ClusterPeerGetParams {
return &ClusterPeerGetParams{
timeout: timeout,
}
}
// NewClusterPeerGetParamsWithContext creates a new ClusterPeerGetParams object
// with the ability to set a context for a request.
func NewClusterPeerGetParamsWithContext(ctx context.Context) *ClusterPeerGetParams {
return &ClusterPeerGetParams{
Context: ctx,
}
}
// NewClusterPeerGetParamsWithHTTPClient creates a new ClusterPeerGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterPeerGetParamsWithHTTPClient(client *http.Client) *ClusterPeerGetParams {
return &ClusterPeerGetParams{
HTTPClient: client,
}
}
/*
ClusterPeerGetParams contains all the parameters to send to the API endpoint
for the cluster peer get operation.
Typically these are written to a http.Request.
*/
type ClusterPeerGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
Cluster peer relationship UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster peer get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterPeerGetParams) WithDefaults() *ClusterPeerGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster peer get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterPeerGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the cluster peer get params
func (o *ClusterPeerGetParams) WithTimeout(timeout time.Duration) *ClusterPeerGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster peer get params
func (o *ClusterPeerGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster peer get params
func (o *ClusterPeerGetParams) WithContext(ctx context.Context) *ClusterPeerGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster peer get params
func (o *ClusterPeerGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster peer get params
func (o *ClusterPeerGetParams) WithHTTPClient(client *http.Client) *ClusterPeerGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster peer get params
func (o *ClusterPeerGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the cluster peer get params
func (o *ClusterPeerGetParams) WithFields(fields []string) *ClusterPeerGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the cluster peer get params
func (o *ClusterPeerGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the cluster peer get params
func (o *ClusterPeerGetParams) WithUUID(uuid string) *ClusterPeerGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the cluster peer get params
func (o *ClusterPeerGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterPeerGetParams) 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
}
// bindParamClusterPeerGet binds the parameter fields
func (o *ClusterPeerGetParams) 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/cluster/capacity_pool_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/capacity_pool_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// CapacityPoolGetReader is a Reader for the CapacityPoolGet structure.
type CapacityPoolGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *CapacityPoolGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewCapacityPoolGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewCapacityPoolGetDefault(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
}
}
// NewCapacityPoolGetOK creates a CapacityPoolGetOK with default headers values
func NewCapacityPoolGetOK() *CapacityPoolGetOK {
return &CapacityPoolGetOK{}
}
/*
CapacityPoolGetOK describes a response with status code 200, with default header values.
OK
*/
type CapacityPoolGetOK struct {
Payload *models.CapacityPool
}
// IsSuccess returns true when this capacity pool get o k response has a 2xx status code
func (o *CapacityPoolGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this capacity pool get o k response has a 3xx status code
func (o *CapacityPoolGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this capacity pool get o k response has a 4xx status code
func (o *CapacityPoolGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this capacity pool get o k response has a 5xx status code
func (o *CapacityPoolGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this capacity pool get o k response a status code equal to that given
func (o *CapacityPoolGetOK) IsCode(code int) bool {
return code == 200
}
func (o *CapacityPoolGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/licensing/capacity-pools/{serial_number}][%d] capacityPoolGetOK %+v", 200, o.Payload)
}
func (o *CapacityPoolGetOK) String() string {
return fmt.Sprintf("[GET /cluster/licensing/capacity-pools/{serial_number}][%d] capacityPoolGetOK %+v", 200, o.Payload)
}
func (o *CapacityPoolGetOK) GetPayload() *models.CapacityPool {
return o.Payload
}
func (o *CapacityPoolGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.CapacityPool)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewCapacityPoolGetDefault creates a CapacityPoolGetDefault with default headers values
func NewCapacityPoolGetDefault(code int) *CapacityPoolGetDefault {
return &CapacityPoolGetDefault{
_statusCode: code,
}
}
/*
CapacityPoolGetDefault describes a response with status code -1, with default header values.
Error
*/
type CapacityPoolGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the capacity pool get default response
func (o *CapacityPoolGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this capacity pool get default response has a 2xx status code
func (o *CapacityPoolGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this capacity pool get default response has a 3xx status code
func (o *CapacityPoolGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this capacity pool get default response has a 4xx status code
func (o *CapacityPoolGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this capacity pool get default response has a 5xx status code
func (o *CapacityPoolGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this capacity pool get default response a status code equal to that given
func (o *CapacityPoolGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *CapacityPoolGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/licensing/capacity-pools/{serial_number}][%d] capacity_pool_get default %+v", o._statusCode, o.Payload)
}
func (o *CapacityPoolGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/licensing/capacity-pools/{serial_number}][%d] capacity_pool_get default %+v", o._statusCode, o.Payload)
}
func (o *CapacityPoolGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *CapacityPoolGetDefault) 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/cluster/software_package_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_package_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSoftwarePackageCreateParams creates a new SoftwarePackageCreateParams 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 NewSoftwarePackageCreateParams() *SoftwarePackageCreateParams {
return &SoftwarePackageCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewSoftwarePackageCreateParamsWithTimeout creates a new SoftwarePackageCreateParams object
// with the ability to set a timeout on a request.
func NewSoftwarePackageCreateParamsWithTimeout(timeout time.Duration) *SoftwarePackageCreateParams {
return &SoftwarePackageCreateParams{
timeout: timeout,
}
}
// NewSoftwarePackageCreateParamsWithContext creates a new SoftwarePackageCreateParams object
// with the ability to set a context for a request.
func NewSoftwarePackageCreateParamsWithContext(ctx context.Context) *SoftwarePackageCreateParams {
return &SoftwarePackageCreateParams{
Context: ctx,
}
}
// NewSoftwarePackageCreateParamsWithHTTPClient creates a new SoftwarePackageCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewSoftwarePackageCreateParamsWithHTTPClient(client *http.Client) *SoftwarePackageCreateParams {
return &SoftwarePackageCreateParams{
HTTPClient: client,
}
}
/*
SoftwarePackageCreateParams contains all the parameters to send to the API endpoint
for the software package create operation.
Typically these are written to a http.Request.
*/
type SoftwarePackageCreateParams struct {
/* Info.
Info specification
*/
Info *models.SoftwarePackageDownload
/* 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 software package create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageCreateParams) WithDefaults() *SoftwarePackageCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the software package create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SoftwarePackageCreateParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := SoftwarePackageCreateParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the software package create params
func (o *SoftwarePackageCreateParams) WithTimeout(timeout time.Duration) *SoftwarePackageCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the software package create params
func (o *SoftwarePackageCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the software package create params
func (o *SoftwarePackageCreateParams) WithContext(ctx context.Context) *SoftwarePackageCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the software package create params
func (o *SoftwarePackageCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the software package create params
func (o *SoftwarePackageCreateParams) WithHTTPClient(client *http.Client) *SoftwarePackageCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the software package create params
func (o *SoftwarePackageCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the software package create params
func (o *SoftwarePackageCreateParams) WithInfo(info *models.SoftwarePackageDownload) *SoftwarePackageCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the software package create params
func (o *SoftwarePackageCreateParams) SetInfo(info *models.SoftwarePackageDownload) {
o.Info = info
}
// WithReturnTimeout adds the returnTimeout to the software package create params
func (o *SoftwarePackageCreateParams) WithReturnTimeout(returnTimeout *int64) *SoftwarePackageCreateParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the software package create params
func (o *SoftwarePackageCreateParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *SoftwarePackageCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
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/cluster/metrocluster_svm_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_svm_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewMetroclusterSvmCollectionGetParams creates a new MetroclusterSvmCollectionGetParams 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 NewMetroclusterSvmCollectionGetParams() *MetroclusterSvmCollectionGetParams {
return &MetroclusterSvmCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewMetroclusterSvmCollectionGetParamsWithTimeout creates a new MetroclusterSvmCollectionGetParams object
// with the ability to set a timeout on a request.
func NewMetroclusterSvmCollectionGetParamsWithTimeout(timeout time.Duration) *MetroclusterSvmCollectionGetParams {
return &MetroclusterSvmCollectionGetParams{
timeout: timeout,
}
}
// NewMetroclusterSvmCollectionGetParamsWithContext creates a new MetroclusterSvmCollectionGetParams object
// with the ability to set a context for a request.
func NewMetroclusterSvmCollectionGetParamsWithContext(ctx context.Context) *MetroclusterSvmCollectionGetParams {
return &MetroclusterSvmCollectionGetParams{
Context: ctx,
}
}
// NewMetroclusterSvmCollectionGetParamsWithHTTPClient creates a new MetroclusterSvmCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewMetroclusterSvmCollectionGetParamsWithHTTPClient(client *http.Client) *MetroclusterSvmCollectionGetParams {
return &MetroclusterSvmCollectionGetParams{
HTTPClient: client,
}
}
/*
MetroclusterSvmCollectionGetParams contains all the parameters to send to the API endpoint
for the metrocluster svm collection get operation.
Typically these are written to a http.Request.
*/
type MetroclusterSvmCollectionGetParams struct {
/* ClusterName.
Filter by cluster.name
*/
ClusterName *string
/* ClusterUUID.
Filter by cluster.uuid
*/
ClusterUUID *string
/* ConfigurationState.
Filter by configuration_state
*/
ConfigurationState *string
/* FailedReason.
Filter by failed_reason
*/
FailedReason *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* PartnerSvmName.
Filter by partner_svm.name
*/
PartnerSvmName *string
/* PartnerSvmUUID.
Filter by partner_svm.uuid
*/
PartnerSvmUUID *string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* SvmUUID.
Filter by svm.uuid
*/
SvmUUID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the metrocluster svm collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterSvmCollectionGetParams) WithDefaults() *MetroclusterSvmCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the metrocluster svm collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterSvmCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := MetroclusterSvmCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithTimeout(timeout time.Duration) *MetroclusterSvmCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithContext(ctx context.Context) *MetroclusterSvmCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithHTTPClient(client *http.Client) *MetroclusterSvmCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithClusterName adds the clusterName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithClusterName(clusterName *string) *MetroclusterSvmCollectionGetParams {
o.SetClusterName(clusterName)
return o
}
// SetClusterName adds the clusterName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetClusterName(clusterName *string) {
o.ClusterName = clusterName
}
// WithClusterUUID adds the clusterUUID to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithClusterUUID(clusterUUID *string) *MetroclusterSvmCollectionGetParams {
o.SetClusterUUID(clusterUUID)
return o
}
// SetClusterUUID adds the clusterUuid to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetClusterUUID(clusterUUID *string) {
o.ClusterUUID = clusterUUID
}
// WithConfigurationState adds the configurationState to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithConfigurationState(configurationState *string) *MetroclusterSvmCollectionGetParams {
o.SetConfigurationState(configurationState)
return o
}
// SetConfigurationState adds the configurationState to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetConfigurationState(configurationState *string) {
o.ConfigurationState = configurationState
}
// WithFailedReason adds the failedReason to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithFailedReason(failedReason *string) *MetroclusterSvmCollectionGetParams {
o.SetFailedReason(failedReason)
return o
}
// SetFailedReason adds the failedReason to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetFailedReason(failedReason *string) {
o.FailedReason = failedReason
}
// WithFields adds the fields to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithFields(fields []string) *MetroclusterSvmCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithMaxRecords(maxRecords *int64) *MetroclusterSvmCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithOrderBy(orderBy []string) *MetroclusterSvmCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPartnerSvmName adds the partnerSvmName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithPartnerSvmName(partnerSvmName *string) *MetroclusterSvmCollectionGetParams {
o.SetPartnerSvmName(partnerSvmName)
return o
}
// SetPartnerSvmName adds the partnerSvmName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetPartnerSvmName(partnerSvmName *string) {
o.PartnerSvmName = partnerSvmName
}
// WithPartnerSvmUUID adds the partnerSvmUUID to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithPartnerSvmUUID(partnerSvmUUID *string) *MetroclusterSvmCollectionGetParams {
o.SetPartnerSvmUUID(partnerSvmUUID)
return o
}
// SetPartnerSvmUUID adds the partnerSvmUuid to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetPartnerSvmUUID(partnerSvmUUID *string) {
o.PartnerSvmUUID = partnerSvmUUID
}
// WithReturnRecords adds the returnRecords to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithReturnRecords(returnRecords *bool) *MetroclusterSvmCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *MetroclusterSvmCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithSvmName adds the svmName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithSvmName(svmName *string) *MetroclusterSvmCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) WithSvmUUID(svmUUID *string) *MetroclusterSvmCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the metrocluster svm collection get params
func (o *MetroclusterSvmCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *MetroclusterSvmCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.ClusterName != nil {
// query param cluster.name
var qrClusterName string
if o.ClusterName != nil {
qrClusterName = *o.ClusterName
}
qClusterName := qrClusterName
if qClusterName != "" {
if err := r.SetQueryParam("cluster.name", qClusterName); err != nil {
return err
}
}
}
if o.ClusterUUID != nil {
// query param cluster.uuid
var qrClusterUUID string
if o.ClusterUUID != nil {
qrClusterUUID = *o.ClusterUUID
}
qClusterUUID := qrClusterUUID
if qClusterUUID != "" {
if err := r.SetQueryParam("cluster.uuid", qClusterUUID); err != nil {
return err
}
}
}
if o.ConfigurationState != nil {
// query param configuration_state
var qrConfigurationState string
if o.ConfigurationState != nil {
qrConfigurationState = *o.ConfigurationState
}
qConfigurationState := qrConfigurationState
if qConfigurationState != "" {
if err := r.SetQueryParam("configuration_state", qConfigurationState); err != nil {
return err
}
}
}
if o.FailedReason != nil {
// query param failed_reason
var qrFailedReason string
if o.FailedReason != nil {
qrFailedReason = *o.FailedReason
}
qFailedReason := qrFailedReason
if qFailedReason != "" {
if err := r.SetQueryParam("failed_reason", qFailedReason); err != nil {
return err
}
}
}
if o.Fields != nil {
// binding items for fields
joinedFields := o.bindParamFields(reg)
// query array param fields
if err := r.SetQueryParam("fields", joinedFields...); err != nil {
return err
}
}
if o.MaxRecords != nil {
// query param max_records
var qrMaxRecords int64
if o.MaxRecords != nil {
qrMaxRecords = *o.MaxRecords
}
qMaxRecords := swag.FormatInt64(qrMaxRecords)
if qMaxRecords != "" {
if err := r.SetQueryParam("max_records", qMaxRecords); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.PartnerSvmName != nil {
// query param partner_svm.name
var qrPartnerSvmName string
if o.PartnerSvmName != nil {
qrPartnerSvmName = *o.PartnerSvmName
}
qPartnerSvmName := qrPartnerSvmName
if qPartnerSvmName != "" {
if err := r.SetQueryParam("partner_svm.name", qPartnerSvmName); err != nil {
return err
}
}
}
if o.PartnerSvmUUID != nil {
// query param partner_svm.uuid
var qrPartnerSvmUUID string
if o.PartnerSvmUUID != nil {
qrPartnerSvmUUID = *o.PartnerSvmUUID
}
qPartnerSvmUUID := qrPartnerSvmUUID
if qPartnerSvmUUID != "" {
if err := r.SetQueryParam("partner_svm.uuid", qPartnerSvmUUID); err != nil {
return err
}
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.SvmName != nil {
// query param svm.name
var qrSvmName string
if o.SvmName != nil {
qrSvmName = *o.SvmName
}
qSvmName := qrSvmName
if qSvmName != "" {
if err := r.SetQueryParam("svm.name", qSvmName); err != nil {
return err
}
}
}
if o.SvmUUID != nil {
// query param svm.uuid
var qrSvmUUID string
if o.SvmUUID != nil {
qrSvmUUID = *o.SvmUUID
}
qSvmUUID := qrSvmUUID
if qSvmUUID != "" {
if err := r.SetQueryParam("svm.uuid", qSvmUUID); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamMetroclusterSvmCollectionGet binds the parameter fields
func (o *MetroclusterSvmCollectionGetParams) 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
}
// bindParamMetroclusterSvmCollectionGet binds the parameter order_by
func (o *MetroclusterSvmCollectionGetParams) 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/cluster/metrocluster_dr_group_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_dr_group_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewMetroclusterDrGroupGetParams creates a new MetroclusterDrGroupGetParams 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 NewMetroclusterDrGroupGetParams() *MetroclusterDrGroupGetParams {
return &MetroclusterDrGroupGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewMetroclusterDrGroupGetParamsWithTimeout creates a new MetroclusterDrGroupGetParams object
// with the ability to set a timeout on a request.
func NewMetroclusterDrGroupGetParamsWithTimeout(timeout time.Duration) *MetroclusterDrGroupGetParams {
return &MetroclusterDrGroupGetParams{
timeout: timeout,
}
}
// NewMetroclusterDrGroupGetParamsWithContext creates a new MetroclusterDrGroupGetParams object
// with the ability to set a context for a request.
func NewMetroclusterDrGroupGetParamsWithContext(ctx context.Context) *MetroclusterDrGroupGetParams {
return &MetroclusterDrGroupGetParams{
Context: ctx,
}
}
// NewMetroclusterDrGroupGetParamsWithHTTPClient creates a new MetroclusterDrGroupGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewMetroclusterDrGroupGetParamsWithHTTPClient(client *http.Client) *MetroclusterDrGroupGetParams {
return &MetroclusterDrGroupGetParams{
HTTPClient: client,
}
}
/*
MetroclusterDrGroupGetParams contains all the parameters to send to the API endpoint
for the metrocluster dr group get operation.
Typically these are written to a http.Request.
*/
type MetroclusterDrGroupGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
// ID.
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the metrocluster dr group get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupGetParams) WithDefaults() *MetroclusterDrGroupGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the metrocluster dr group get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterDrGroupGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) WithTimeout(timeout time.Duration) *MetroclusterDrGroupGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) WithContext(ctx context.Context) *MetroclusterDrGroupGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) WithHTTPClient(client *http.Client) *MetroclusterDrGroupGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) WithFields(fields []string) *MetroclusterDrGroupGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithID adds the id to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) WithID(id string) *MetroclusterDrGroupGetParams {
o.SetID(id)
return o
}
// SetID adds the id to the metrocluster dr group get params
func (o *MetroclusterDrGroupGetParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *MetroclusterDrGroupGetParams) 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 id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamMetroclusterDrGroupGet binds the parameter fields
func (o *MetroclusterDrGroupGetParams) 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/cluster/metrocluster_svm_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/metrocluster_svm_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewMetroclusterSvmGetParams creates a new MetroclusterSvmGetParams 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 NewMetroclusterSvmGetParams() *MetroclusterSvmGetParams {
return &MetroclusterSvmGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewMetroclusterSvmGetParamsWithTimeout creates a new MetroclusterSvmGetParams object
// with the ability to set a timeout on a request.
func NewMetroclusterSvmGetParamsWithTimeout(timeout time.Duration) *MetroclusterSvmGetParams {
return &MetroclusterSvmGetParams{
timeout: timeout,
}
}
// NewMetroclusterSvmGetParamsWithContext creates a new MetroclusterSvmGetParams object
// with the ability to set a context for a request.
func NewMetroclusterSvmGetParamsWithContext(ctx context.Context) *MetroclusterSvmGetParams {
return &MetroclusterSvmGetParams{
Context: ctx,
}
}
// NewMetroclusterSvmGetParamsWithHTTPClient creates a new MetroclusterSvmGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewMetroclusterSvmGetParamsWithHTTPClient(client *http.Client) *MetroclusterSvmGetParams {
return &MetroclusterSvmGetParams{
HTTPClient: client,
}
}
/*
MetroclusterSvmGetParams contains all the parameters to send to the API endpoint
for the metrocluster svm get operation.
Typically these are written to a http.Request.
*/
type MetroclusterSvmGetParams struct {
/* ClusterUUID.
Cluster ID
*/
ClusterUUID string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* SvmUUID.
SVM UUID
*/
SvmUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the metrocluster svm get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterSvmGetParams) WithDefaults() *MetroclusterSvmGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the metrocluster svm get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MetroclusterSvmGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithTimeout(timeout time.Duration) *MetroclusterSvmGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithContext(ctx context.Context) *MetroclusterSvmGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithHTTPClient(client *http.Client) *MetroclusterSvmGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithClusterUUID adds the clusterUUID to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithClusterUUID(clusterUUID string) *MetroclusterSvmGetParams {
o.SetClusterUUID(clusterUUID)
return o
}
// SetClusterUUID adds the clusterUuid to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetClusterUUID(clusterUUID string) {
o.ClusterUUID = clusterUUID
}
// WithFields adds the fields to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithFields(fields []string) *MetroclusterSvmGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithSvmUUID adds the svmUUID to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) WithSvmUUID(svmUUID string) *MetroclusterSvmGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the metrocluster svm get params
func (o *MetroclusterSvmGetParams) SetSvmUUID(svmUUID string) {
o.SvmUUID = svmUUID
}
// WriteToRequest writes these params to a swagger request
func (o *MetroclusterSvmGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param cluster.uuid
if err := r.SetPathParam("cluster.uuid", o.ClusterUUID); 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
}
// bindParamMetroclusterSvmGet binds the parameter fields
func (o *MetroclusterSvmGetParams) 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/cluster/cluster_ntp_keys_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_keys_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterNtpKeysCreateParams creates a new ClusterNtpKeysCreateParams 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 NewClusterNtpKeysCreateParams() *ClusterNtpKeysCreateParams {
return &ClusterNtpKeysCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterNtpKeysCreateParamsWithTimeout creates a new ClusterNtpKeysCreateParams object
// with the ability to set a timeout on a request.
func NewClusterNtpKeysCreateParamsWithTimeout(timeout time.Duration) *ClusterNtpKeysCreateParams {
return &ClusterNtpKeysCreateParams{
timeout: timeout,
}
}
// NewClusterNtpKeysCreateParamsWithContext creates a new ClusterNtpKeysCreateParams object
// with the ability to set a context for a request.
func NewClusterNtpKeysCreateParamsWithContext(ctx context.Context) *ClusterNtpKeysCreateParams {
return &ClusterNtpKeysCreateParams{
Context: ctx,
}
}
// NewClusterNtpKeysCreateParamsWithHTTPClient creates a new ClusterNtpKeysCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterNtpKeysCreateParamsWithHTTPClient(client *http.Client) *ClusterNtpKeysCreateParams {
return &ClusterNtpKeysCreateParams{
HTTPClient: client,
}
}
/*
ClusterNtpKeysCreateParams contains all the parameters to send to the API endpoint
for the cluster ntp keys create operation.
Typically these are written to a http.Request.
*/
type ClusterNtpKeysCreateParams struct {
/* Info.
Information specification
*/
Info *models.NtpKey
/* 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 cluster ntp keys create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysCreateParams) WithDefaults() *ClusterNtpKeysCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster ntp keys create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := ClusterNtpKeysCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) WithTimeout(timeout time.Duration) *ClusterNtpKeysCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) WithContext(ctx context.Context) *ClusterNtpKeysCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) WithHTTPClient(client *http.Client) *ClusterNtpKeysCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) WithInfo(info *models.NtpKey) *ClusterNtpKeysCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) SetInfo(info *models.NtpKey) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) WithReturnRecords(returnRecords *bool) *ClusterNtpKeysCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the cluster ntp keys create params
func (o *ClusterNtpKeysCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterNtpKeysCreateParams) 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/cluster/node_metrics_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/node_metrics_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NodeMetricsCollectionGetReader is a Reader for the NodeMetricsCollectionGet structure.
type NodeMetricsCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *NodeMetricsCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewNodeMetricsCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewNodeMetricsCollectionGetDefault(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
}
}
// NewNodeMetricsCollectionGetOK creates a NodeMetricsCollectionGetOK with default headers values
func NewNodeMetricsCollectionGetOK() *NodeMetricsCollectionGetOK {
return &NodeMetricsCollectionGetOK{}
}
/*
NodeMetricsCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type NodeMetricsCollectionGetOK struct {
Payload *models.NodeMetricsResponse
}
// IsSuccess returns true when this node metrics collection get o k response has a 2xx status code
func (o *NodeMetricsCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this node metrics collection get o k response has a 3xx status code
func (o *NodeMetricsCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this node metrics collection get o k response has a 4xx status code
func (o *NodeMetricsCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this node metrics collection get o k response has a 5xx status code
func (o *NodeMetricsCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this node metrics collection get o k response a status code equal to that given
func (o *NodeMetricsCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *NodeMetricsCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /cluster/nodes/{uuid}/metrics][%d] nodeMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *NodeMetricsCollectionGetOK) String() string {
return fmt.Sprintf("[GET /cluster/nodes/{uuid}/metrics][%d] nodeMetricsCollectionGetOK %+v", 200, o.Payload)
}
func (o *NodeMetricsCollectionGetOK) GetPayload() *models.NodeMetricsResponse {
return o.Payload
}
func (o *NodeMetricsCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.NodeMetricsResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewNodeMetricsCollectionGetDefault creates a NodeMetricsCollectionGetDefault with default headers values
func NewNodeMetricsCollectionGetDefault(code int) *NodeMetricsCollectionGetDefault {
return &NodeMetricsCollectionGetDefault{
_statusCode: code,
}
}
/*
NodeMetricsCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type NodeMetricsCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the node metrics collection get default response
func (o *NodeMetricsCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this node metrics collection get default response has a 2xx status code
func (o *NodeMetricsCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this node metrics collection get default response has a 3xx status code
func (o *NodeMetricsCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this node metrics collection get default response has a 4xx status code
func (o *NodeMetricsCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this node metrics collection get default response has a 5xx status code
func (o *NodeMetricsCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this node metrics collection get default response a status code equal to that given
func (o *NodeMetricsCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *NodeMetricsCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /cluster/nodes/{uuid}/metrics][%d] node_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *NodeMetricsCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /cluster/nodes/{uuid}/metrics][%d] node_metrics_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *NodeMetricsCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *NodeMetricsCollectionGetDefault) 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/cluster/software_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/software_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// SoftwareModifyReader is a Reader for the SoftwareModify structure.
type SoftwareModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SoftwareModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewSoftwareModifyAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSoftwareModifyDefault(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
}
}
// NewSoftwareModifyAccepted creates a SoftwareModifyAccepted with default headers values
func NewSoftwareModifyAccepted() *SoftwareModifyAccepted {
return &SoftwareModifyAccepted{}
}
/*
SoftwareModifyAccepted describes a response with status code 202, with default header values.
Accepted
*/
type SoftwareModifyAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this software modify accepted response has a 2xx status code
func (o *SoftwareModifyAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this software modify accepted response has a 3xx status code
func (o *SoftwareModifyAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this software modify accepted response has a 4xx status code
func (o *SoftwareModifyAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this software modify accepted response has a 5xx status code
func (o *SoftwareModifyAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this software modify accepted response a status code equal to that given
func (o *SoftwareModifyAccepted) IsCode(code int) bool {
return code == 202
}
func (o *SoftwareModifyAccepted) Error() string {
return fmt.Sprintf("[PATCH /cluster/software][%d] softwareModifyAccepted %+v", 202, o.Payload)
}
func (o *SoftwareModifyAccepted) String() string {
return fmt.Sprintf("[PATCH /cluster/software][%d] softwareModifyAccepted %+v", 202, o.Payload)
}
func (o *SoftwareModifyAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *SoftwareModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSoftwareModifyDefault creates a SoftwareModifyDefault with default headers values
func NewSoftwareModifyDefault(code int) *SoftwareModifyDefault {
return &SoftwareModifyDefault{
_statusCode: code,
}
}
/*
SoftwareModifyDefault describes a response with status code -1, with default header values.
Error
*/
type SoftwareModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the software modify default response
func (o *SoftwareModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this software modify default response has a 2xx status code
func (o *SoftwareModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this software modify default response has a 3xx status code
func (o *SoftwareModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this software modify default response has a 4xx status code
func (o *SoftwareModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this software modify default response has a 5xx status code
func (o *SoftwareModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this software modify default response a status code equal to that given
func (o *SoftwareModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SoftwareModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster/software][%d] software_modify default %+v", o._statusCode, o.Payload)
}
func (o *SoftwareModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster/software][%d] software_modify default %+v", o._statusCode, o.Payload)
}
func (o *SoftwareModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SoftwareModifyDefault) 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/cluster/job_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/job_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// JobModifyReader is a Reader for the JobModify structure.
type JobModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *JobModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewJobModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewJobModifyDefault(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
}
}
// NewJobModifyOK creates a JobModifyOK with default headers values
func NewJobModifyOK() *JobModifyOK {
return &JobModifyOK{}
}
/*
JobModifyOK describes a response with status code 200, with default header values.
OK
*/
type JobModifyOK struct {
}
// IsSuccess returns true when this job modify o k response has a 2xx status code
func (o *JobModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this job modify o k response has a 3xx status code
func (o *JobModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this job modify o k response has a 4xx status code
func (o *JobModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this job modify o k response has a 5xx status code
func (o *JobModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this job modify o k response a status code equal to that given
func (o *JobModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *JobModifyOK) Error() string {
return fmt.Sprintf("[PATCH /cluster/jobs/{uuid}][%d] jobModifyOK ", 200)
}
func (o *JobModifyOK) String() string {
return fmt.Sprintf("[PATCH /cluster/jobs/{uuid}][%d] jobModifyOK ", 200)
}
func (o *JobModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewJobModifyDefault creates a JobModifyDefault with default headers values
func NewJobModifyDefault(code int) *JobModifyDefault {
return &JobModifyDefault{
_statusCode: code,
}
}
/*
JobModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 459753 | Command execution failed with custom error from the program. |
| 458762 | Job is already in a terminal state. |
| 458773 | The Job Manager is not initialized. |
| 458771 | The specified job is running. |
| 458776 | The specified job is not currently running. |
| 458783 | This job does not support pause. |
| 458784 | This job does not support cancel. |
*/
type JobModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the job modify default response
func (o *JobModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this job modify default response has a 2xx status code
func (o *JobModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this job modify default response has a 3xx status code
func (o *JobModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this job modify default response has a 4xx status code
func (o *JobModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this job modify default response has a 5xx status code
func (o *JobModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this job modify default response a status code equal to that given
func (o *JobModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *JobModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /cluster/jobs/{uuid}][%d] job_modify default %+v", o._statusCode, o.Payload)
}
func (o *JobModifyDefault) String() string {
return fmt.Sprintf("[PATCH /cluster/jobs/{uuid}][%d] job_modify default %+v", o._statusCode, o.Payload)
}
func (o *JobModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *JobModifyDefault) 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/cluster/cluster_ntp_keys_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/cluster_ntp_keys_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewClusterNtpKeysGetParams creates a new ClusterNtpKeysGetParams 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 NewClusterNtpKeysGetParams() *ClusterNtpKeysGetParams {
return &ClusterNtpKeysGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewClusterNtpKeysGetParamsWithTimeout creates a new ClusterNtpKeysGetParams object
// with the ability to set a timeout on a request.
func NewClusterNtpKeysGetParamsWithTimeout(timeout time.Duration) *ClusterNtpKeysGetParams {
return &ClusterNtpKeysGetParams{
timeout: timeout,
}
}
// NewClusterNtpKeysGetParamsWithContext creates a new ClusterNtpKeysGetParams object
// with the ability to set a context for a request.
func NewClusterNtpKeysGetParamsWithContext(ctx context.Context) *ClusterNtpKeysGetParams {
return &ClusterNtpKeysGetParams{
Context: ctx,
}
}
// NewClusterNtpKeysGetParamsWithHTTPClient creates a new ClusterNtpKeysGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewClusterNtpKeysGetParamsWithHTTPClient(client *http.Client) *ClusterNtpKeysGetParams {
return &ClusterNtpKeysGetParams{
HTTPClient: client,
}
}
/*
ClusterNtpKeysGetParams contains all the parameters to send to the API endpoint
for the cluster ntp keys get operation.
Typically these are written to a http.Request.
*/
type ClusterNtpKeysGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* ID.
Key identifier
*/
ID int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the cluster ntp keys get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysGetParams) WithDefaults() *ClusterNtpKeysGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the cluster ntp keys get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ClusterNtpKeysGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) WithTimeout(timeout time.Duration) *ClusterNtpKeysGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) WithContext(ctx context.Context) *ClusterNtpKeysGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) WithHTTPClient(client *http.Client) *ClusterNtpKeysGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) WithFields(fields []string) *ClusterNtpKeysGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithID adds the id to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) WithID(id int64) *ClusterNtpKeysGetParams {
o.SetID(id)
return o
}
// SetID adds the id to the cluster ntp keys get params
func (o *ClusterNtpKeysGetParams) SetID(id int64) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *ClusterNtpKeysGetParams) 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 id
if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamClusterNtpKeysGet binds the parameter fields
func (o *ClusterNtpKeysGetParams) 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/cluster/sensors_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cluster/sensors_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package cluster
// 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"
)
// NewSensorsCollectionGetParams creates a new SensorsCollectionGetParams 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 NewSensorsCollectionGetParams() *SensorsCollectionGetParams {
return &SensorsCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSensorsCollectionGetParamsWithTimeout creates a new SensorsCollectionGetParams object
// with the ability to set a timeout on a request.
func NewSensorsCollectionGetParamsWithTimeout(timeout time.Duration) *SensorsCollectionGetParams {
return &SensorsCollectionGetParams{
timeout: timeout,
}
}
// NewSensorsCollectionGetParamsWithContext creates a new SensorsCollectionGetParams object
// with the ability to set a context for a request.
func NewSensorsCollectionGetParamsWithContext(ctx context.Context) *SensorsCollectionGetParams {
return &SensorsCollectionGetParams{
Context: ctx,
}
}
// NewSensorsCollectionGetParamsWithHTTPClient creates a new SensorsCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSensorsCollectionGetParamsWithHTTPClient(client *http.Client) *SensorsCollectionGetParams {
return &SensorsCollectionGetParams{
HTTPClient: client,
}
}
/*
SensorsCollectionGetParams contains all the parameters to send to the API endpoint
for the sensors collection get operation.
Typically these are written to a http.Request.
*/
type SensorsCollectionGetParams struct {
/* CriticalHighThreshold.
Filter by critical_high_threshold
*/
CriticalHighThreshold *int64
/* CriticalLowThreshold.
Filter by critical_low_threshold
*/
CriticalLowThreshold *int64
/* DiscreteState.
Filter by discrete_state
*/
DiscreteState *string
/* DiscreteValue.
Filter by discrete_value
*/
DiscreteValue *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Index.
Filter by index
*/
Index *int64
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Name.
Filter by name
*/
Name *string
/* NodeName.
Filter by node.name
*/
NodeName *string
/* NodeUUID.
Filter by node.uuid
*/
NodeUUID *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* ThresholdState.
Filter by threshold_state
*/
ThresholdState *string
/* Type.
Filter by type
*/
Type *string
/* Value.
Filter by value
*/
Value *int64
/* ValueUnits.
Filter by value_units
*/
ValueUnits *string
/* WarningHighThreshold.
Filter by warning_high_threshold
*/
WarningHighThreshold *int64
/* WarningLowThreshold.
Filter by warning_low_threshold
*/
WarningLowThreshold *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the sensors collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SensorsCollectionGetParams) WithDefaults() *SensorsCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the sensors collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SensorsCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := SensorsCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the sensors collection get params
func (o *SensorsCollectionGetParams) WithTimeout(timeout time.Duration) *SensorsCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the sensors collection get params
func (o *SensorsCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the sensors collection get params
func (o *SensorsCollectionGetParams) WithContext(ctx context.Context) *SensorsCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the sensors collection get params
func (o *SensorsCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the sensors collection get params
func (o *SensorsCollectionGetParams) WithHTTPClient(client *http.Client) *SensorsCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the sensors collection get params
func (o *SensorsCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCriticalHighThreshold adds the criticalHighThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) WithCriticalHighThreshold(criticalHighThreshold *int64) *SensorsCollectionGetParams {
o.SetCriticalHighThreshold(criticalHighThreshold)
return o
}
// SetCriticalHighThreshold adds the criticalHighThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) SetCriticalHighThreshold(criticalHighThreshold *int64) {
o.CriticalHighThreshold = criticalHighThreshold
}
// WithCriticalLowThreshold adds the criticalLowThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) WithCriticalLowThreshold(criticalLowThreshold *int64) *SensorsCollectionGetParams {
o.SetCriticalLowThreshold(criticalLowThreshold)
return o
}
// SetCriticalLowThreshold adds the criticalLowThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) SetCriticalLowThreshold(criticalLowThreshold *int64) {
o.CriticalLowThreshold = criticalLowThreshold
}
// WithDiscreteState adds the discreteState to the sensors collection get params
func (o *SensorsCollectionGetParams) WithDiscreteState(discreteState *string) *SensorsCollectionGetParams {
o.SetDiscreteState(discreteState)
return o
}
// SetDiscreteState adds the discreteState to the sensors collection get params
func (o *SensorsCollectionGetParams) SetDiscreteState(discreteState *string) {
o.DiscreteState = discreteState
}
// WithDiscreteValue adds the discreteValue to the sensors collection get params
func (o *SensorsCollectionGetParams) WithDiscreteValue(discreteValue *string) *SensorsCollectionGetParams {
o.SetDiscreteValue(discreteValue)
return o
}
// SetDiscreteValue adds the discreteValue to the sensors collection get params
func (o *SensorsCollectionGetParams) SetDiscreteValue(discreteValue *string) {
o.DiscreteValue = discreteValue
}
// WithFields adds the fields to the sensors collection get params
func (o *SensorsCollectionGetParams) WithFields(fields []string) *SensorsCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the sensors collection get params
func (o *SensorsCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIndex adds the index to the sensors collection get params
func (o *SensorsCollectionGetParams) WithIndex(index *int64) *SensorsCollectionGetParams {
o.SetIndex(index)
return o
}
// SetIndex adds the index to the sensors collection get params
func (o *SensorsCollectionGetParams) SetIndex(index *int64) {
o.Index = index
}
// WithMaxRecords adds the maxRecords to the sensors collection get params
func (o *SensorsCollectionGetParams) WithMaxRecords(maxRecords *int64) *SensorsCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the sensors collection get params
func (o *SensorsCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithName adds the name to the sensors collection get params
func (o *SensorsCollectionGetParams) WithName(name *string) *SensorsCollectionGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the sensors collection get params
func (o *SensorsCollectionGetParams) SetName(name *string) {
o.Name = name
}
// WithNodeName adds the nodeName to the sensors collection get params
func (o *SensorsCollectionGetParams) WithNodeName(nodeName *string) *SensorsCollectionGetParams {
o.SetNodeName(nodeName)
return o
}
// SetNodeName adds the nodeName to the sensors collection get params
func (o *SensorsCollectionGetParams) SetNodeName(nodeName *string) {
o.NodeName = nodeName
}
// WithNodeUUID adds the nodeUUID to the sensors collection get params
func (o *SensorsCollectionGetParams) WithNodeUUID(nodeUUID *string) *SensorsCollectionGetParams {
o.SetNodeUUID(nodeUUID)
return o
}
// SetNodeUUID adds the nodeUuid to the sensors collection get params
func (o *SensorsCollectionGetParams) SetNodeUUID(nodeUUID *string) {
o.NodeUUID = nodeUUID
}
// WithOrderBy adds the orderBy to the sensors collection get params
func (o *SensorsCollectionGetParams) WithOrderBy(orderBy []string) *SensorsCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the sensors collection get params
func (o *SensorsCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the sensors collection get params
func (o *SensorsCollectionGetParams) WithReturnRecords(returnRecords *bool) *SensorsCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the sensors collection get params
func (o *SensorsCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the sensors collection get params
func (o *SensorsCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SensorsCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the sensors collection get params
func (o *SensorsCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithThresholdState adds the thresholdState to the sensors collection get params
func (o *SensorsCollectionGetParams) WithThresholdState(thresholdState *string) *SensorsCollectionGetParams {
o.SetThresholdState(thresholdState)
return o
}
// SetThresholdState adds the thresholdState to the sensors collection get params
func (o *SensorsCollectionGetParams) SetThresholdState(thresholdState *string) {
o.ThresholdState = thresholdState
}
// WithType adds the typeVar to the sensors collection get params
func (o *SensorsCollectionGetParams) WithType(typeVar *string) *SensorsCollectionGetParams {
o.SetType(typeVar)
return o
}
// SetType adds the type to the sensors collection get params
func (o *SensorsCollectionGetParams) SetType(typeVar *string) {
o.Type = typeVar
}
// WithValue adds the value to the sensors collection get params
func (o *SensorsCollectionGetParams) WithValue(value *int64) *SensorsCollectionGetParams {
o.SetValue(value)
return o
}
// SetValue adds the value to the sensors collection get params
func (o *SensorsCollectionGetParams) SetValue(value *int64) {
o.Value = value
}
// WithValueUnits adds the valueUnits to the sensors collection get params
func (o *SensorsCollectionGetParams) WithValueUnits(valueUnits *string) *SensorsCollectionGetParams {
o.SetValueUnits(valueUnits)
return o
}
// SetValueUnits adds the valueUnits to the sensors collection get params
func (o *SensorsCollectionGetParams) SetValueUnits(valueUnits *string) {
o.ValueUnits = valueUnits
}
// WithWarningHighThreshold adds the warningHighThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) WithWarningHighThreshold(warningHighThreshold *int64) *SensorsCollectionGetParams {
o.SetWarningHighThreshold(warningHighThreshold)
return o
}
// SetWarningHighThreshold adds the warningHighThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) SetWarningHighThreshold(warningHighThreshold *int64) {
o.WarningHighThreshold = warningHighThreshold
}
// WithWarningLowThreshold adds the warningLowThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) WithWarningLowThreshold(warningLowThreshold *int64) *SensorsCollectionGetParams {
o.SetWarningLowThreshold(warningLowThreshold)
return o
}
// SetWarningLowThreshold adds the warningLowThreshold to the sensors collection get params
func (o *SensorsCollectionGetParams) SetWarningLowThreshold(warningLowThreshold *int64) {
o.WarningLowThreshold = warningLowThreshold
}
// WriteToRequest writes these params to a swagger request
func (o *SensorsCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CriticalHighThreshold != nil {
// query param critical_high_threshold
var qrCriticalHighThreshold int64
if o.CriticalHighThreshold != nil {
qrCriticalHighThreshold = *o.CriticalHighThreshold
}
qCriticalHighThreshold := swag.FormatInt64(qrCriticalHighThreshold)
if qCriticalHighThreshold != "" {
if err := r.SetQueryParam("critical_high_threshold", qCriticalHighThreshold); err != nil {
return err
}
}
}
if o.CriticalLowThreshold != nil {
// query param critical_low_threshold
var qrCriticalLowThreshold int64
if o.CriticalLowThreshold != nil {
qrCriticalLowThreshold = *o.CriticalLowThreshold
}
qCriticalLowThreshold := swag.FormatInt64(qrCriticalLowThreshold)
if qCriticalLowThreshold != "" {
if err := r.SetQueryParam("critical_low_threshold", qCriticalLowThreshold); err != nil {
return err
}
}
}
if o.DiscreteState != nil {
// query param discrete_state
var qrDiscreteState string
if o.DiscreteState != nil {
qrDiscreteState = *o.DiscreteState
}
qDiscreteState := qrDiscreteState
if qDiscreteState != "" {
if err := r.SetQueryParam("discrete_state", qDiscreteState); err != nil {
return err
}
}
}
if o.DiscreteValue != nil {
// query param discrete_value
var qrDiscreteValue string
if o.DiscreteValue != nil {
qrDiscreteValue = *o.DiscreteValue
}
qDiscreteValue := qrDiscreteValue
if qDiscreteValue != "" {
if err := r.SetQueryParam("discrete_value", qDiscreteValue); 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.Index != nil {
// query param index
var qrIndex int64
if o.Index != nil {
qrIndex = *o.Index
}
qIndex := swag.FormatInt64(qrIndex)
if qIndex != "" {
if err := r.SetQueryParam("index", qIndex); 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.NodeName != nil {
// query param node.name
var qrNodeName string
if o.NodeName != nil {
qrNodeName = *o.NodeName
}
qNodeName := qrNodeName
if qNodeName != "" {
if err := r.SetQueryParam("node.name", qNodeName); err != nil {
return err
}
}
}
if o.NodeUUID != nil {
// query param node.uuid
var qrNodeUUID string
if o.NodeUUID != nil {
qrNodeUUID = *o.NodeUUID
}
qNodeUUID := qrNodeUUID
if qNodeUUID != "" {
if err := r.SetQueryParam("node.uuid", qNodeUUID); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.ThresholdState != nil {
// query param threshold_state
var qrThresholdState string
if o.ThresholdState != nil {
qrThresholdState = *o.ThresholdState
}
qThresholdState := qrThresholdState
if qThresholdState != "" {
if err := r.SetQueryParam("threshold_state", qThresholdState); err != nil {
return err
}
}
}
if o.Type != nil {
// query param type
var qrType string
if o.Type != nil {
qrType = *o.Type
}
qType := qrType
if qType != "" {
if err := r.SetQueryParam("type", qType); err != nil {
return err
}
}
}
if o.Value != nil {
// query param value
var qrValue int64
if o.Value != nil {
qrValue = *o.Value
}
qValue := swag.FormatInt64(qrValue)
if qValue != "" {
if err := r.SetQueryParam("value", qValue); err != nil {
return err
}
}
}
if o.ValueUnits != nil {
// query param value_units
var qrValueUnits string
if o.ValueUnits != nil {
qrValueUnits = *o.ValueUnits
}
qValueUnits := qrValueUnits
if qValueUnits != "" {
if err := r.SetQueryParam("value_units", qValueUnits); err != nil {
return err
}
}
}
if o.WarningHighThreshold != nil {
// query param warning_high_threshold
var qrWarningHighThreshold int64
if o.WarningHighThreshold != nil {
qrWarningHighThreshold = *o.WarningHighThreshold
}
qWarningHighThreshold := swag.FormatInt64(qrWarningHighThreshold)
if qWarningHighThreshold != "" {
if err := r.SetQueryParam("warning_high_threshold", qWarningHighThreshold); err != nil {
return err
}
}
}
if o.WarningLowThreshold != nil {
// query param warning_low_threshold
var qrWarningLowThreshold int64
if o.WarningLowThreshold != nil {
qrWarningLowThreshold = *o.WarningLowThreshold
}
qWarningLowThreshold := swag.FormatInt64(qrWarningLowThreshold)
if qWarningLowThreshold != "" {
if err := r.SetQueryParam("warning_low_threshold", qWarningLowThreshold); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSensorsCollectionGet binds the parameter fields
func (o *SensorsCollectionGetParams) 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
}
// bindParamSensorsCollectionGet binds the parameter order_by
func (o *SensorsCollectionGetParams) 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/security/security_config_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_config_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityConfigGetReader is a Reader for the SecurityConfigGet structure.
type SecurityConfigGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSecurityConfigGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityConfigGetDefault(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
}
}
// NewSecurityConfigGetOK creates a SecurityConfigGetOK with default headers values
func NewSecurityConfigGetOK() *SecurityConfigGetOK {
return &SecurityConfigGetOK{}
}
/*
SecurityConfigGetOK describes a response with status code 200, with default header values.
OK
*/
type SecurityConfigGetOK struct {
Payload *models.SecurityConfig
}
// IsSuccess returns true when this security config get o k response has a 2xx status code
func (o *SecurityConfigGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security config get o k response has a 3xx status code
func (o *SecurityConfigGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this security config get o k response has a 4xx status code
func (o *SecurityConfigGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this security config get o k response has a 5xx status code
func (o *SecurityConfigGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this security config get o k response a status code equal to that given
func (o *SecurityConfigGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SecurityConfigGetOK) Error() string {
return fmt.Sprintf("[GET /security][%d] securityConfigGetOK %+v", 200, o.Payload)
}
func (o *SecurityConfigGetOK) String() string {
return fmt.Sprintf("[GET /security][%d] securityConfigGetOK %+v", 200, o.Payload)
}
func (o *SecurityConfigGetOK) GetPayload() *models.SecurityConfig {
return o.Payload
}
func (o *SecurityConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SecurityConfig)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSecurityConfigGetDefault creates a SecurityConfigGetDefault with default headers values
func NewSecurityConfigGetDefault(code int) *SecurityConfigGetDefault {
return &SecurityConfigGetDefault{
_statusCode: code,
}
}
/*
SecurityConfigGetDefault describes a response with status code -1, with default header values.
Error
*/
type SecurityConfigGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security config get default response
func (o *SecurityConfigGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security config get default response has a 2xx status code
func (o *SecurityConfigGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security config get default response has a 3xx status code
func (o *SecurityConfigGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security config get default response has a 4xx status code
func (o *SecurityConfigGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security config get default response has a 5xx status code
func (o *SecurityConfigGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security config get default response a status code equal to that given
func (o *SecurityConfigGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityConfigGetDefault) Error() string {
return fmt.Sprintf("[GET /security][%d] security_config_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityConfigGetDefault) String() string {
return fmt.Sprintf("[GET /security][%d] security_config_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityConfigGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityConfigGetDefault) 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/security/azure_key_vault_restore_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/azure_key_vault_restore_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAzureKeyVaultRestoreParams creates a new AzureKeyVaultRestoreParams 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 NewAzureKeyVaultRestoreParams() *AzureKeyVaultRestoreParams {
return &AzureKeyVaultRestoreParams{
timeout: cr.DefaultTimeout,
}
}
// NewAzureKeyVaultRestoreParamsWithTimeout creates a new AzureKeyVaultRestoreParams object
// with the ability to set a timeout on a request.
func NewAzureKeyVaultRestoreParamsWithTimeout(timeout time.Duration) *AzureKeyVaultRestoreParams {
return &AzureKeyVaultRestoreParams{
timeout: timeout,
}
}
// NewAzureKeyVaultRestoreParamsWithContext creates a new AzureKeyVaultRestoreParams object
// with the ability to set a context for a request.
func NewAzureKeyVaultRestoreParamsWithContext(ctx context.Context) *AzureKeyVaultRestoreParams {
return &AzureKeyVaultRestoreParams{
Context: ctx,
}
}
// NewAzureKeyVaultRestoreParamsWithHTTPClient creates a new AzureKeyVaultRestoreParams object
// with the ability to set a custom HTTPClient for a request.
func NewAzureKeyVaultRestoreParamsWithHTTPClient(client *http.Client) *AzureKeyVaultRestoreParams {
return &AzureKeyVaultRestoreParams{
HTTPClient: client,
}
}
/*
AzureKeyVaultRestoreParams contains all the parameters to send to the API endpoint
for the azure key vault restore operation.
Typically these are written to a http.Request.
*/
type AzureKeyVaultRestoreParams struct {
/* 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
/* UUID.
UUID of the existing AKV configuration.
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the azure key vault restore params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AzureKeyVaultRestoreParams) WithDefaults() *AzureKeyVaultRestoreParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the azure key vault restore params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AzureKeyVaultRestoreParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := AzureKeyVaultRestoreParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithTimeout(timeout time.Duration) *AzureKeyVaultRestoreParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithContext(ctx context.Context) *AzureKeyVaultRestoreParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithHTTPClient(client *http.Client) *AzureKeyVaultRestoreParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithReturnRecords adds the returnRecords to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithReturnRecords(returnRecords *bool) *AzureKeyVaultRestoreParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithReturnTimeout(returnTimeout *int64) *AzureKeyVaultRestoreParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) WithUUID(uuid string) *AzureKeyVaultRestoreParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the azure key vault restore params
func (o *AzureKeyVaultRestoreParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *AzureKeyVaultRestoreParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
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
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/login_messages_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/login_messages_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// LoginMessagesCollectionGetReader is a Reader for the LoginMessagesCollectionGet structure.
type LoginMessagesCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *LoginMessagesCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewLoginMessagesCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewLoginMessagesCollectionGetDefault(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
}
}
// NewLoginMessagesCollectionGetOK creates a LoginMessagesCollectionGetOK with default headers values
func NewLoginMessagesCollectionGetOK() *LoginMessagesCollectionGetOK {
return &LoginMessagesCollectionGetOK{}
}
/*
LoginMessagesCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type LoginMessagesCollectionGetOK struct {
Payload *models.LoginMessagesResponse
}
// IsSuccess returns true when this login messages collection get o k response has a 2xx status code
func (o *LoginMessagesCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this login messages collection get o k response has a 3xx status code
func (o *LoginMessagesCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this login messages collection get o k response has a 4xx status code
func (o *LoginMessagesCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this login messages collection get o k response has a 5xx status code
func (o *LoginMessagesCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this login messages collection get o k response a status code equal to that given
func (o *LoginMessagesCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *LoginMessagesCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /security/login/messages][%d] loginMessagesCollectionGetOK %+v", 200, o.Payload)
}
func (o *LoginMessagesCollectionGetOK) String() string {
return fmt.Sprintf("[GET /security/login/messages][%d] loginMessagesCollectionGetOK %+v", 200, o.Payload)
}
func (o *LoginMessagesCollectionGetOK) GetPayload() *models.LoginMessagesResponse {
return o.Payload
}
func (o *LoginMessagesCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.LoginMessagesResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewLoginMessagesCollectionGetDefault creates a LoginMessagesCollectionGetDefault with default headers values
func NewLoginMessagesCollectionGetDefault(code int) *LoginMessagesCollectionGetDefault {
return &LoginMessagesCollectionGetDefault{
_statusCode: code,
}
}
/*
LoginMessagesCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type LoginMessagesCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the login messages collection get default response
func (o *LoginMessagesCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this login messages collection get default response has a 2xx status code
func (o *LoginMessagesCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this login messages collection get default response has a 3xx status code
func (o *LoginMessagesCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this login messages collection get default response has a 4xx status code
func (o *LoginMessagesCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this login messages collection get default response has a 5xx status code
func (o *LoginMessagesCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this login messages collection get default response a status code equal to that given
func (o *LoginMessagesCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *LoginMessagesCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /security/login/messages][%d] login_messages_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LoginMessagesCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /security/login/messages][%d] login_messages_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *LoginMessagesCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *LoginMessagesCollectionGetDefault) 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/security/multi_admin_verify_approval_group_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_approval_group_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// MultiAdminVerifyApprovalGroupCreateReader is a Reader for the MultiAdminVerifyApprovalGroupCreate structure.
type MultiAdminVerifyApprovalGroupCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MultiAdminVerifyApprovalGroupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewMultiAdminVerifyApprovalGroupCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMultiAdminVerifyApprovalGroupCreateDefault(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
}
}
// NewMultiAdminVerifyApprovalGroupCreateCreated creates a MultiAdminVerifyApprovalGroupCreateCreated with default headers values
func NewMultiAdminVerifyApprovalGroupCreateCreated() *MultiAdminVerifyApprovalGroupCreateCreated {
return &MultiAdminVerifyApprovalGroupCreateCreated{}
}
/*
MultiAdminVerifyApprovalGroupCreateCreated describes a response with status code 201, with default header values.
Created
*/
type MultiAdminVerifyApprovalGroupCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.MultiAdminVerifyApprovalGroupResponse
}
// IsSuccess returns true when this multi admin verify approval group create created response has a 2xx status code
func (o *MultiAdminVerifyApprovalGroupCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this multi admin verify approval group create created response has a 3xx status code
func (o *MultiAdminVerifyApprovalGroupCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this multi admin verify approval group create created response has a 4xx status code
func (o *MultiAdminVerifyApprovalGroupCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this multi admin verify approval group create created response has a 5xx status code
func (o *MultiAdminVerifyApprovalGroupCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this multi admin verify approval group create created response a status code equal to that given
func (o *MultiAdminVerifyApprovalGroupCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *MultiAdminVerifyApprovalGroupCreateCreated) Error() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/approval-groups][%d] multiAdminVerifyApprovalGroupCreateCreated %+v", 201, o.Payload)
}
func (o *MultiAdminVerifyApprovalGroupCreateCreated) String() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/approval-groups][%d] multiAdminVerifyApprovalGroupCreateCreated %+v", 201, o.Payload)
}
func (o *MultiAdminVerifyApprovalGroupCreateCreated) GetPayload() *models.MultiAdminVerifyApprovalGroupResponse {
return o.Payload
}
func (o *MultiAdminVerifyApprovalGroupCreateCreated) 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.MultiAdminVerifyApprovalGroupResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMultiAdminVerifyApprovalGroupCreateDefault creates a MultiAdminVerifyApprovalGroupCreateDefault with default headers values
func NewMultiAdminVerifyApprovalGroupCreateDefault(code int) *MultiAdminVerifyApprovalGroupCreateDefault {
return &MultiAdminVerifyApprovalGroupCreateDefault{
_statusCode: code,
}
}
/*
MultiAdminVerifyApprovalGroupCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 262309 | The feature must be enabled first. |
*/
type MultiAdminVerifyApprovalGroupCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the multi admin verify approval group create default response
func (o *MultiAdminVerifyApprovalGroupCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this multi admin verify approval group create default response has a 2xx status code
func (o *MultiAdminVerifyApprovalGroupCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this multi admin verify approval group create default response has a 3xx status code
func (o *MultiAdminVerifyApprovalGroupCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this multi admin verify approval group create default response has a 4xx status code
func (o *MultiAdminVerifyApprovalGroupCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this multi admin verify approval group create default response has a 5xx status code
func (o *MultiAdminVerifyApprovalGroupCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this multi admin verify approval group create default response a status code equal to that given
func (o *MultiAdminVerifyApprovalGroupCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MultiAdminVerifyApprovalGroupCreateDefault) Error() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/approval-groups][%d] multi_admin_verify_approval_group_create default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyApprovalGroupCreateDefault) String() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/approval-groups][%d] multi_admin_verify_approval_group_create default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyApprovalGroupCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MultiAdminVerifyApprovalGroupCreateDefault) 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/security/cluster_account_ad_proxy_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/cluster_account_ad_proxy_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// ClusterAccountAdProxyModifyReader is a Reader for the ClusterAccountAdProxyModify structure.
type ClusterAccountAdProxyModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterAccountAdProxyModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterAccountAdProxyModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterAccountAdProxyModifyDefault(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
}
}
// NewClusterAccountAdProxyModifyOK creates a ClusterAccountAdProxyModifyOK with default headers values
func NewClusterAccountAdProxyModifyOK() *ClusterAccountAdProxyModifyOK {
return &ClusterAccountAdProxyModifyOK{}
}
/*
ClusterAccountAdProxyModifyOK describes a response with status code 200, with default header values.
OK
*/
type ClusterAccountAdProxyModifyOK struct {
}
// IsSuccess returns true when this cluster account ad proxy modify o k response has a 2xx status code
func (o *ClusterAccountAdProxyModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster account ad proxy modify o k response has a 3xx status code
func (o *ClusterAccountAdProxyModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster account ad proxy modify o k response has a 4xx status code
func (o *ClusterAccountAdProxyModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster account ad proxy modify o k response has a 5xx status code
func (o *ClusterAccountAdProxyModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster account ad proxy modify o k response a status code equal to that given
func (o *ClusterAccountAdProxyModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterAccountAdProxyModifyOK) Error() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ad-proxy][%d] clusterAccountAdProxyModifyOK ", 200)
}
func (o *ClusterAccountAdProxyModifyOK) String() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ad-proxy][%d] clusterAccountAdProxyModifyOK ", 200)
}
func (o *ClusterAccountAdProxyModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClusterAccountAdProxyModifyDefault creates a ClusterAccountAdProxyModifyDefault with default headers values
func NewClusterAccountAdProxyModifyDefault(code int) *ClusterAccountAdProxyModifyDefault {
return &ClusterAccountAdProxyModifyDefault{
_statusCode: code,
}
}
/*
ClusterAccountAdProxyModifyDefault describes a response with status code -1, with default header values.
Error
*/
type ClusterAccountAdProxyModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster account ad proxy modify default response
func (o *ClusterAccountAdProxyModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster account ad proxy modify default response has a 2xx status code
func (o *ClusterAccountAdProxyModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster account ad proxy modify default response has a 3xx status code
func (o *ClusterAccountAdProxyModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster account ad proxy modify default response has a 4xx status code
func (o *ClusterAccountAdProxyModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster account ad proxy modify default response has a 5xx status code
func (o *ClusterAccountAdProxyModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster account ad proxy modify default response a status code equal to that given
func (o *ClusterAccountAdProxyModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterAccountAdProxyModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ad-proxy][%d] cluster_account_ad_proxy_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterAccountAdProxyModifyDefault) String() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ad-proxy][%d] cluster_account_ad_proxy_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterAccountAdProxyModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterAccountAdProxyModifyDefault) 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/security/role_privilege_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/role_privilege_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// RolePrivilegeModifyReader is a Reader for the RolePrivilegeModify structure.
type RolePrivilegeModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *RolePrivilegeModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewRolePrivilegeModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewRolePrivilegeModifyDefault(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
}
}
// NewRolePrivilegeModifyOK creates a RolePrivilegeModifyOK with default headers values
func NewRolePrivilegeModifyOK() *RolePrivilegeModifyOK {
return &RolePrivilegeModifyOK{}
}
/*
RolePrivilegeModifyOK describes a response with status code 200, with default header values.
OK
*/
type RolePrivilegeModifyOK struct {
}
// IsSuccess returns true when this role privilege modify o k response has a 2xx status code
func (o *RolePrivilegeModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this role privilege modify o k response has a 3xx status code
func (o *RolePrivilegeModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this role privilege modify o k response has a 4xx status code
func (o *RolePrivilegeModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this role privilege modify o k response has a 5xx status code
func (o *RolePrivilegeModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this role privilege modify o k response a status code equal to that given
func (o *RolePrivilegeModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *RolePrivilegeModifyOK) Error() string {
return fmt.Sprintf("[PATCH /security/roles/{owner.uuid}/{name}/privileges/{path}][%d] rolePrivilegeModifyOK ", 200)
}
func (o *RolePrivilegeModifyOK) String() string {
return fmt.Sprintf("[PATCH /security/roles/{owner.uuid}/{name}/privileges/{path}][%d] rolePrivilegeModifyOK ", 200)
}
func (o *RolePrivilegeModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewRolePrivilegeModifyDefault creates a RolePrivilegeModifyDefault with default headers values
func NewRolePrivilegeModifyDefault(code int) *RolePrivilegeModifyDefault {
return &RolePrivilegeModifyDefault{
_statusCode: code,
}
}
/*
RolePrivilegeModifyDefault describes a response with status code -1, with default header values.
Error
*/
type RolePrivilegeModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the role privilege modify default response
func (o *RolePrivilegeModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this role privilege modify default response has a 2xx status code
func (o *RolePrivilegeModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this role privilege modify default response has a 3xx status code
func (o *RolePrivilegeModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this role privilege modify default response has a 4xx status code
func (o *RolePrivilegeModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this role privilege modify default response has a 5xx status code
func (o *RolePrivilegeModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this role privilege modify default response a status code equal to that given
func (o *RolePrivilegeModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *RolePrivilegeModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /security/roles/{owner.uuid}/{name}/privileges/{path}][%d] role_privilege_modify default %+v", o._statusCode, o.Payload)
}
func (o *RolePrivilegeModifyDefault) String() string {
return fmt.Sprintf("[PATCH /security/roles/{owner.uuid}/{name}/privileges/{path}][%d] role_privilege_modify default %+v", o._statusCode, o.Payload)
}
func (o *RolePrivilegeModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *RolePrivilegeModifyDefault) 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/security/account_publickey_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/account_publickey_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// AccountPublickeyDeleteReader is a Reader for the AccountPublickeyDelete structure.
type AccountPublickeyDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountPublickeyDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAccountPublickeyDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewAccountPublickeyDeleteDefault(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
}
}
// NewAccountPublickeyDeleteOK creates a AccountPublickeyDeleteOK with default headers values
func NewAccountPublickeyDeleteOK() *AccountPublickeyDeleteOK {
return &AccountPublickeyDeleteOK{}
}
/*
AccountPublickeyDeleteOK describes a response with status code 200, with default header values.
OK
*/
type AccountPublickeyDeleteOK struct {
}
// IsSuccess returns true when this account publickey delete o k response has a 2xx status code
func (o *AccountPublickeyDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account publickey delete o k response has a 3xx status code
func (o *AccountPublickeyDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this account publickey delete o k response has a 4xx status code
func (o *AccountPublickeyDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this account publickey delete o k response has a 5xx status code
func (o *AccountPublickeyDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this account publickey delete o k response a status code equal to that given
func (o *AccountPublickeyDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *AccountPublickeyDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /security/authentication/publickeys/{owner.uuid}/{account.name}/{index}][%d] accountPublickeyDeleteOK ", 200)
}
func (o *AccountPublickeyDeleteOK) String() string {
return fmt.Sprintf("[DELETE /security/authentication/publickeys/{owner.uuid}/{account.name}/{index}][%d] accountPublickeyDeleteOK ", 200)
}
func (o *AccountPublickeyDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewAccountPublickeyDeleteDefault creates a AccountPublickeyDeleteDefault with default headers values
func NewAccountPublickeyDeleteDefault(code int) *AccountPublickeyDeleteDefault {
return &AccountPublickeyDeleteDefault{
_statusCode: code,
}
}
/*
AccountPublickeyDeleteDefault describes a response with status code -1, with default header values.
Error
*/
type AccountPublickeyDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the account publickey delete default response
func (o *AccountPublickeyDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this account publickey delete default response has a 2xx status code
func (o *AccountPublickeyDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this account publickey delete default response has a 3xx status code
func (o *AccountPublickeyDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this account publickey delete default response has a 4xx status code
func (o *AccountPublickeyDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this account publickey delete default response has a 5xx status code
func (o *AccountPublickeyDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this account publickey delete default response a status code equal to that given
func (o *AccountPublickeyDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *AccountPublickeyDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /security/authentication/publickeys/{owner.uuid}/{account.name}/{index}][%d] account_publickey_delete default %+v", o._statusCode, o.Payload)
}
func (o *AccountPublickeyDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /security/authentication/publickeys/{owner.uuid}/{account.name}/{index}][%d] account_publickey_delete default %+v", o._statusCode, o.Payload)
}
func (o *AccountPublickeyDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *AccountPublickeyDeleteDefault) 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/security/security_audit_log_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_audit_log_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewSecurityAuditLogCollectionGetParams creates a new SecurityAuditLogCollectionGetParams 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 NewSecurityAuditLogCollectionGetParams() *SecurityAuditLogCollectionGetParams {
return &SecurityAuditLogCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSecurityAuditLogCollectionGetParamsWithTimeout creates a new SecurityAuditLogCollectionGetParams object
// with the ability to set a timeout on a request.
func NewSecurityAuditLogCollectionGetParamsWithTimeout(timeout time.Duration) *SecurityAuditLogCollectionGetParams {
return &SecurityAuditLogCollectionGetParams{
timeout: timeout,
}
}
// NewSecurityAuditLogCollectionGetParamsWithContext creates a new SecurityAuditLogCollectionGetParams object
// with the ability to set a context for a request.
func NewSecurityAuditLogCollectionGetParamsWithContext(ctx context.Context) *SecurityAuditLogCollectionGetParams {
return &SecurityAuditLogCollectionGetParams{
Context: ctx,
}
}
// NewSecurityAuditLogCollectionGetParamsWithHTTPClient creates a new SecurityAuditLogCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSecurityAuditLogCollectionGetParamsWithHTTPClient(client *http.Client) *SecurityAuditLogCollectionGetParams {
return &SecurityAuditLogCollectionGetParams{
HTTPClient: client,
}
}
/*
SecurityAuditLogCollectionGetParams contains all the parameters to send to the API endpoint
for the security audit log collection get operation.
Typically these are written to a http.Request.
*/
type SecurityAuditLogCollectionGetParams struct {
/* Application.
Filter by application
*/
Application *string
/* CommandID.
Filter by command_id
*/
CommandID *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Index.
Filter by index
*/
Index *int64
/* Input.
Filter by input
*/
Input *string
/* Location.
Filter by location
*/
Location *string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Message.
Filter by message
*/
Message *string
/* NodeName.
Filter by node.name
*/
NodeName *string
/* NodeUUID.
Filter by node.uuid
*/
NodeUUID *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* ReturnRecords.
The default is true for GET calls. When set to false, only the number of records is returned.
Default: true
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
Default: 15
*/
ReturnTimeout *int64
/* Scope.
Filter by scope
*/
Scope *string
/* SessionID.
Filter by session_id
*/
SessionID *string
/* State.
Filter by state
*/
State *string
/* SvmName.
Filter by svm.name
*/
SvmName *string
/* Timestamp.
Filter by timestamp
*/
Timestamp *string
/* User.
Filter by user
*/
User *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the security audit log collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityAuditLogCollectionGetParams) WithDefaults() *SecurityAuditLogCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the security audit log collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityAuditLogCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := SecurityAuditLogCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithTimeout(timeout time.Duration) *SecurityAuditLogCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithContext(ctx context.Context) *SecurityAuditLogCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithHTTPClient(client *http.Client) *SecurityAuditLogCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithApplication adds the application to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithApplication(application *string) *SecurityAuditLogCollectionGetParams {
o.SetApplication(application)
return o
}
// SetApplication adds the application to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetApplication(application *string) {
o.Application = application
}
// WithCommandID adds the commandID to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithCommandID(commandID *string) *SecurityAuditLogCollectionGetParams {
o.SetCommandID(commandID)
return o
}
// SetCommandID adds the commandId to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetCommandID(commandID *string) {
o.CommandID = commandID
}
// WithFields adds the fields to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithFields(fields []string) *SecurityAuditLogCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIndex adds the index to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithIndex(index *int64) *SecurityAuditLogCollectionGetParams {
o.SetIndex(index)
return o
}
// SetIndex adds the index to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetIndex(index *int64) {
o.Index = index
}
// WithInput adds the input to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithInput(input *string) *SecurityAuditLogCollectionGetParams {
o.SetInput(input)
return o
}
// SetInput adds the input to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetInput(input *string) {
o.Input = input
}
// WithLocation adds the location to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithLocation(location *string) *SecurityAuditLogCollectionGetParams {
o.SetLocation(location)
return o
}
// SetLocation adds the location to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetLocation(location *string) {
o.Location = location
}
// WithMaxRecords adds the maxRecords to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithMaxRecords(maxRecords *int64) *SecurityAuditLogCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMessage adds the message to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithMessage(message *string) *SecurityAuditLogCollectionGetParams {
o.SetMessage(message)
return o
}
// SetMessage adds the message to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetMessage(message *string) {
o.Message = message
}
// WithNodeName adds the nodeName to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithNodeName(nodeName *string) *SecurityAuditLogCollectionGetParams {
o.SetNodeName(nodeName)
return o
}
// SetNodeName adds the nodeName to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetNodeName(nodeName *string) {
o.NodeName = nodeName
}
// WithNodeUUID adds the nodeUUID to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithNodeUUID(nodeUUID *string) *SecurityAuditLogCollectionGetParams {
o.SetNodeUUID(nodeUUID)
return o
}
// SetNodeUUID adds the nodeUuid to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetNodeUUID(nodeUUID *string) {
o.NodeUUID = nodeUUID
}
// WithOrderBy adds the orderBy to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithOrderBy(orderBy []string) *SecurityAuditLogCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithReturnRecords(returnRecords *bool) *SecurityAuditLogCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SecurityAuditLogCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithScope adds the scope to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithScope(scope *string) *SecurityAuditLogCollectionGetParams {
o.SetScope(scope)
return o
}
// SetScope adds the scope to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetScope(scope *string) {
o.Scope = scope
}
// WithSessionID adds the sessionID to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithSessionID(sessionID *string) *SecurityAuditLogCollectionGetParams {
o.SetSessionID(sessionID)
return o
}
// SetSessionID adds the sessionId to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetSessionID(sessionID *string) {
o.SessionID = sessionID
}
// WithState adds the state to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithState(state *string) *SecurityAuditLogCollectionGetParams {
o.SetState(state)
return o
}
// SetState adds the state to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetState(state *string) {
o.State = state
}
// WithSvmName adds the svmName to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithSvmName(svmName *string) *SecurityAuditLogCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithTimestamp adds the timestamp to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithTimestamp(timestamp *string) *SecurityAuditLogCollectionGetParams {
o.SetTimestamp(timestamp)
return o
}
// SetTimestamp adds the timestamp to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetTimestamp(timestamp *string) {
o.Timestamp = timestamp
}
// WithUser adds the user to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) WithUser(user *string) *SecurityAuditLogCollectionGetParams {
o.SetUser(user)
return o
}
// SetUser adds the user to the security audit log collection get params
func (o *SecurityAuditLogCollectionGetParams) SetUser(user *string) {
o.User = user
}
// WriteToRequest writes these params to a swagger request
func (o *SecurityAuditLogCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Application != nil {
// query param application
var qrApplication string
if o.Application != nil {
qrApplication = *o.Application
}
qApplication := qrApplication
if qApplication != "" {
if err := r.SetQueryParam("application", qApplication); err != nil {
return err
}
}
}
if o.CommandID != nil {
// query param command_id
var qrCommandID string
if o.CommandID != nil {
qrCommandID = *o.CommandID
}
qCommandID := qrCommandID
if qCommandID != "" {
if err := r.SetQueryParam("command_id", qCommandID); 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.Index != nil {
// query param index
var qrIndex int64
if o.Index != nil {
qrIndex = *o.Index
}
qIndex := swag.FormatInt64(qrIndex)
if qIndex != "" {
if err := r.SetQueryParam("index", qIndex); err != nil {
return err
}
}
}
if o.Input != nil {
// query param input
var qrInput string
if o.Input != nil {
qrInput = *o.Input
}
qInput := qrInput
if qInput != "" {
if err := r.SetQueryParam("input", qInput); err != nil {
return err
}
}
}
if o.Location != nil {
// query param location
var qrLocation string
if o.Location != nil {
qrLocation = *o.Location
}
qLocation := qrLocation
if qLocation != "" {
if err := r.SetQueryParam("location", qLocation); 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.Message != nil {
// query param message
var qrMessage string
if o.Message != nil {
qrMessage = *o.Message
}
qMessage := qrMessage
if qMessage != "" {
if err := r.SetQueryParam("message", qMessage); err != nil {
return err
}
}
}
if o.NodeName != nil {
// query param node.name
var qrNodeName string
if o.NodeName != nil {
qrNodeName = *o.NodeName
}
qNodeName := qrNodeName
if qNodeName != "" {
if err := r.SetQueryParam("node.name", qNodeName); err != nil {
return err
}
}
}
if o.NodeUUID != nil {
// query param node.uuid
var qrNodeUUID string
if o.NodeUUID != nil {
qrNodeUUID = *o.NodeUUID
}
qNodeUUID := qrNodeUUID
if qNodeUUID != "" {
if err := r.SetQueryParam("node.uuid", qNodeUUID); err != nil {
return err
}
}
}
if o.OrderBy != nil {
// binding items for order_by
joinedOrderBy := o.bindParamOrderBy(reg)
// query array param order_by
if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil {
return err
}
}
if o.ReturnRecords != nil {
// query param return_records
var qrReturnRecords bool
if o.ReturnRecords != nil {
qrReturnRecords = *o.ReturnRecords
}
qReturnRecords := swag.FormatBool(qrReturnRecords)
if qReturnRecords != "" {
if err := r.SetQueryParam("return_records", qReturnRecords); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.Scope != nil {
// query param scope
var qrScope string
if o.Scope != nil {
qrScope = *o.Scope
}
qScope := qrScope
if qScope != "" {
if err := r.SetQueryParam("scope", qScope); err != nil {
return err
}
}
}
if o.SessionID != nil {
// query param session_id
var qrSessionID string
if o.SessionID != nil {
qrSessionID = *o.SessionID
}
qSessionID := qrSessionID
if qSessionID != "" {
if err := r.SetQueryParam("session_id", qSessionID); err != nil {
return err
}
}
}
if o.State != nil {
// query param state
var qrState string
if o.State != nil {
qrState = *o.State
}
qState := qrState
if qState != "" {
if err := r.SetQueryParam("state", qState); err != nil {
return err
}
}
}
if o.SvmName != nil {
// query param svm.name
var qrSvmName string
if o.SvmName != nil {
qrSvmName = *o.SvmName
}
qSvmName := qrSvmName
if qSvmName != "" {
if err := r.SetQueryParam("svm.name", qSvmName); err != nil {
return err
}
}
}
if o.Timestamp != nil {
// query param timestamp
var qrTimestamp string
if o.Timestamp != nil {
qrTimestamp = *o.Timestamp
}
qTimestamp := qrTimestamp
if qTimestamp != "" {
if err := r.SetQueryParam("timestamp", qTimestamp); err != nil {
return err
}
}
}
if o.User != nil {
// query param user
var qrUser string
if o.User != nil {
qrUser = *o.User
}
qUser := qrUser
if qUser != "" {
if err := r.SetQueryParam("user", qUser); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamSecurityAuditLogCollectionGet binds the parameter fields
func (o *SecurityAuditLogCollectionGetParams) 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
}
// bindParamSecurityAuditLogCollectionGet binds the parameter order_by
func (o *SecurityAuditLogCollectionGetParams) 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/security/aws_kms_restore_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/aws_kms_restore_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAwsKmsRestoreParams creates a new AwsKmsRestoreParams 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 NewAwsKmsRestoreParams() *AwsKmsRestoreParams {
return &AwsKmsRestoreParams{
timeout: cr.DefaultTimeout,
}
}
// NewAwsKmsRestoreParamsWithTimeout creates a new AwsKmsRestoreParams object
// with the ability to set a timeout on a request.
func NewAwsKmsRestoreParamsWithTimeout(timeout time.Duration) *AwsKmsRestoreParams {
return &AwsKmsRestoreParams{
timeout: timeout,
}
}
// NewAwsKmsRestoreParamsWithContext creates a new AwsKmsRestoreParams object
// with the ability to set a context for a request.
func NewAwsKmsRestoreParamsWithContext(ctx context.Context) *AwsKmsRestoreParams {
return &AwsKmsRestoreParams{
Context: ctx,
}
}
// NewAwsKmsRestoreParamsWithHTTPClient creates a new AwsKmsRestoreParams object
// with the ability to set a custom HTTPClient for a request.
func NewAwsKmsRestoreParamsWithHTTPClient(client *http.Client) *AwsKmsRestoreParams {
return &AwsKmsRestoreParams{
HTTPClient: client,
}
}
/*
AwsKmsRestoreParams contains all the parameters to send to the API endpoint
for the aws kms restore operation.
Typically these are written to a http.Request.
*/
type AwsKmsRestoreParams struct {
/* AwsKmsUUID.
UUID of the existing AWS KMS configuration.
*/
AwsKmsUUID string
/* ReturnRecords.
The default is false. If set to true, the records are returned.
*/
ReturnRecords *bool
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the aws kms restore params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AwsKmsRestoreParams) WithDefaults() *AwsKmsRestoreParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the aws kms restore params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AwsKmsRestoreParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := AwsKmsRestoreParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the aws kms restore params
func (o *AwsKmsRestoreParams) WithTimeout(timeout time.Duration) *AwsKmsRestoreParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the aws kms restore params
func (o *AwsKmsRestoreParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the aws kms restore params
func (o *AwsKmsRestoreParams) WithContext(ctx context.Context) *AwsKmsRestoreParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the aws kms restore params
func (o *AwsKmsRestoreParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the aws kms restore params
func (o *AwsKmsRestoreParams) WithHTTPClient(client *http.Client) *AwsKmsRestoreParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the aws kms restore params
func (o *AwsKmsRestoreParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAwsKmsUUID adds the awsKmsUUID to the aws kms restore params
func (o *AwsKmsRestoreParams) WithAwsKmsUUID(awsKmsUUID string) *AwsKmsRestoreParams {
o.SetAwsKmsUUID(awsKmsUUID)
return o
}
// SetAwsKmsUUID adds the awsKmsUuid to the aws kms restore params
func (o *AwsKmsRestoreParams) SetAwsKmsUUID(awsKmsUUID string) {
o.AwsKmsUUID = awsKmsUUID
}
// WithReturnRecords adds the returnRecords to the aws kms restore params
func (o *AwsKmsRestoreParams) WithReturnRecords(returnRecords *bool) *AwsKmsRestoreParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the aws kms restore params
func (o *AwsKmsRestoreParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the aws kms restore params
func (o *AwsKmsRestoreParams) WithReturnTimeout(returnTimeout *int64) *AwsKmsRestoreParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the aws kms restore params
func (o *AwsKmsRestoreParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *AwsKmsRestoreParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param aws_kms.uuid
if err := r.SetPathParam("aws_kms.uuid", o.AwsKmsUUID); 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/security/ssh_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/ssh_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SSHGetReader is a Reader for the SSHGet structure.
type SSHGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SSHGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSSHGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSSHGetDefault(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
}
}
// NewSSHGetOK creates a SSHGetOK with default headers values
func NewSSHGetOK() *SSHGetOK {
return &SSHGetOK{}
}
/*
SSHGetOK describes a response with status code 200, with default header values.
OK
*/
type SSHGetOK struct {
Payload *models.ClusterSSHServer
}
// IsSuccess returns true when this ssh get o k response has a 2xx status code
func (o *SSHGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ssh get o k response has a 3xx status code
func (o *SSHGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ssh get o k response has a 4xx status code
func (o *SSHGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ssh get o k response has a 5xx status code
func (o *SSHGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this ssh get o k response a status code equal to that given
func (o *SSHGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SSHGetOK) Error() string {
return fmt.Sprintf("[GET /security/ssh][%d] sshGetOK %+v", 200, o.Payload)
}
func (o *SSHGetOK) String() string {
return fmt.Sprintf("[GET /security/ssh][%d] sshGetOK %+v", 200, o.Payload)
}
func (o *SSHGetOK) GetPayload() *models.ClusterSSHServer {
return o.Payload
}
func (o *SSHGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ClusterSSHServer)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSSHGetDefault creates a SSHGetDefault with default headers values
func NewSSHGetDefault(code int) *SSHGetDefault {
return &SSHGetDefault{
_statusCode: code,
}
}
/*
SSHGetDefault describes a response with status code -1, with default header values.
Error
*/
type SSHGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ssh get default response
func (o *SSHGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ssh get default response has a 2xx status code
func (o *SSHGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ssh get default response has a 3xx status code
func (o *SSHGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ssh get default response has a 4xx status code
func (o *SSHGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ssh get default response has a 5xx status code
func (o *SSHGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ssh get default response a status code equal to that given
func (o *SSHGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SSHGetDefault) Error() string {
return fmt.Sprintf("[GET /security/ssh][%d] ssh_get default %+v", o._statusCode, o.Payload)
}
func (o *SSHGetDefault) String() string {
return fmt.Sprintf("[GET /security/ssh][%d] ssh_get default %+v", o._statusCode, o.Payload)
}
func (o *SSHGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SSHGetDefault) 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/security/audit_log_forwarding_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/audit_log_forwarding_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAuditLogForwardingGetParams creates a new AuditLogForwardingGetParams 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 NewAuditLogForwardingGetParams() *AuditLogForwardingGetParams {
return &AuditLogForwardingGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewAuditLogForwardingGetParamsWithTimeout creates a new AuditLogForwardingGetParams object
// with the ability to set a timeout on a request.
func NewAuditLogForwardingGetParamsWithTimeout(timeout time.Duration) *AuditLogForwardingGetParams {
return &AuditLogForwardingGetParams{
timeout: timeout,
}
}
// NewAuditLogForwardingGetParamsWithContext creates a new AuditLogForwardingGetParams object
// with the ability to set a context for a request.
func NewAuditLogForwardingGetParamsWithContext(ctx context.Context) *AuditLogForwardingGetParams {
return &AuditLogForwardingGetParams{
Context: ctx,
}
}
// NewAuditLogForwardingGetParamsWithHTTPClient creates a new AuditLogForwardingGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewAuditLogForwardingGetParamsWithHTTPClient(client *http.Client) *AuditLogForwardingGetParams {
return &AuditLogForwardingGetParams{
HTTPClient: client,
}
}
/*
AuditLogForwardingGetParams contains all the parameters to send to the API endpoint
for the audit log forwarding get operation.
Typically these are written to a http.Request.
*/
type AuditLogForwardingGetParams struct {
/* Address.
Filter by address
*/
Address *string
/* Facility.
Filter by facility
*/
Facility *string
/* 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
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* Port.
Filter by port
*/
Port *int64
/* 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
/* VerifyServer.
Filter by verify_server
*/
VerifyServer *bool
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the audit log forwarding get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuditLogForwardingGetParams) WithDefaults() *AuditLogForwardingGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the audit log forwarding get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AuditLogForwardingGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := AuditLogForwardingGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithTimeout(timeout time.Duration) *AuditLogForwardingGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithContext(ctx context.Context) *AuditLogForwardingGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithHTTPClient(client *http.Client) *AuditLogForwardingGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAddress adds the address to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithAddress(address *string) *AuditLogForwardingGetParams {
o.SetAddress(address)
return o
}
// SetAddress adds the address to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetAddress(address *string) {
o.Address = address
}
// WithFacility adds the facility to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithFacility(facility *string) *AuditLogForwardingGetParams {
o.SetFacility(facility)
return o
}
// SetFacility adds the facility to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetFacility(facility *string) {
o.Facility = facility
}
// WithFields adds the fields to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithFields(fields []string) *AuditLogForwardingGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIpspaceName adds the ipspaceName to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithIpspaceName(ipspaceName *string) *AuditLogForwardingGetParams {
o.SetIpspaceName(ipspaceName)
return o
}
// SetIpspaceName adds the ipspaceName to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetIpspaceName(ipspaceName *string) {
o.IpspaceName = ipspaceName
}
// WithIpspaceUUID adds the ipspaceUUID to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithIpspaceUUID(ipspaceUUID *string) *AuditLogForwardingGetParams {
o.SetIpspaceUUID(ipspaceUUID)
return o
}
// SetIpspaceUUID adds the ipspaceUuid to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetIpspaceUUID(ipspaceUUID *string) {
o.IpspaceUUID = ipspaceUUID
}
// WithMaxRecords adds the maxRecords to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithMaxRecords(maxRecords *int64) *AuditLogForwardingGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithOrderBy adds the orderBy to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithOrderBy(orderBy []string) *AuditLogForwardingGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithPort adds the port to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithPort(port *int64) *AuditLogForwardingGetParams {
o.SetPort(port)
return o
}
// SetPort adds the port to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetPort(port *int64) {
o.Port = port
}
// WithProtocol adds the protocol to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithProtocol(protocol *string) *AuditLogForwardingGetParams {
o.SetProtocol(protocol)
return o
}
// SetProtocol adds the protocol to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetProtocol(protocol *string) {
o.Protocol = protocol
}
// WithReturnRecords adds the returnRecords to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithReturnRecords(returnRecords *bool) *AuditLogForwardingGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithReturnTimeout(returnTimeout *int64) *AuditLogForwardingGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithVerifyServer adds the verifyServer to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) WithVerifyServer(verifyServer *bool) *AuditLogForwardingGetParams {
o.SetVerifyServer(verifyServer)
return o
}
// SetVerifyServer adds the verifyServer to the audit log forwarding get params
func (o *AuditLogForwardingGetParams) SetVerifyServer(verifyServer *bool) {
o.VerifyServer = verifyServer
}
// WriteToRequest writes these params to a swagger request
func (o *AuditLogForwardingGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Address != nil {
// query param address
var qrAddress string
if o.Address != nil {
qrAddress = *o.Address
}
qAddress := qrAddress
if qAddress != "" {
if err := r.SetQueryParam("address", qAddress); err != nil {
return err
}
}
}
if o.Facility != nil {
// query param facility
var qrFacility string
if o.Facility != nil {
qrFacility = *o.Facility
}
qFacility := qrFacility
if qFacility != "" {
if err := r.SetQueryParam("facility", qFacility); 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.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.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.Port != nil {
// query param port
var qrPort int64
if o.Port != nil {
qrPort = *o.Port
}
qPort := swag.FormatInt64(qrPort)
if qPort != "" {
if err := r.SetQueryParam("port", qPort); 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.VerifyServer != nil {
// query param verify_server
var qrVerifyServer bool
if o.VerifyServer != nil {
qrVerifyServer = *o.VerifyServer
}
qVerifyServer := swag.FormatBool(qrVerifyServer)
if qVerifyServer != "" {
if err := r.SetQueryParam("verify_server", qVerifyServer); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamAuditLogForwardingGet binds the parameter fields
func (o *AuditLogForwardingGetParams) 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
}
// bindParamAuditLogForwardingGet binds the parameter order_by
func (o *AuditLogForwardingGetParams) 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/security/login_messages_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/login_messages_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewLoginMessagesModifyParams creates a new LoginMessagesModifyParams 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 NewLoginMessagesModifyParams() *LoginMessagesModifyParams {
return &LoginMessagesModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewLoginMessagesModifyParamsWithTimeout creates a new LoginMessagesModifyParams object
// with the ability to set a timeout on a request.
func NewLoginMessagesModifyParamsWithTimeout(timeout time.Duration) *LoginMessagesModifyParams {
return &LoginMessagesModifyParams{
timeout: timeout,
}
}
// NewLoginMessagesModifyParamsWithContext creates a new LoginMessagesModifyParams object
// with the ability to set a context for a request.
func NewLoginMessagesModifyParamsWithContext(ctx context.Context) *LoginMessagesModifyParams {
return &LoginMessagesModifyParams{
Context: ctx,
}
}
// NewLoginMessagesModifyParamsWithHTTPClient creates a new LoginMessagesModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewLoginMessagesModifyParamsWithHTTPClient(client *http.Client) *LoginMessagesModifyParams {
return &LoginMessagesModifyParams{
HTTPClient: client,
}
}
/*
LoginMessagesModifyParams contains all the parameters to send to the API endpoint
for the login messages modify operation.
Typically these are written to a http.Request.
*/
type LoginMessagesModifyParams struct {
/* Info.
Information specification
*/
Info *models.LoginMessages
/* UUID.
Login messages configuration UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the login messages modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LoginMessagesModifyParams) WithDefaults() *LoginMessagesModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the login messages modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LoginMessagesModifyParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the login messages modify params
func (o *LoginMessagesModifyParams) WithTimeout(timeout time.Duration) *LoginMessagesModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the login messages modify params
func (o *LoginMessagesModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the login messages modify params
func (o *LoginMessagesModifyParams) WithContext(ctx context.Context) *LoginMessagesModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the login messages modify params
func (o *LoginMessagesModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the login messages modify params
func (o *LoginMessagesModifyParams) WithHTTPClient(client *http.Client) *LoginMessagesModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the login messages modify params
func (o *LoginMessagesModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the login messages modify params
func (o *LoginMessagesModifyParams) WithInfo(info *models.LoginMessages) *LoginMessagesModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the login messages modify params
func (o *LoginMessagesModifyParams) SetInfo(info *models.LoginMessages) {
o.Info = info
}
// WithUUID adds the uuid to the login messages modify params
func (o *LoginMessagesModifyParams) WithUUID(uuid string) *LoginMessagesModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the login messages modify params
func (o *LoginMessagesModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LoginMessagesModifyParams) 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/security/account_publickey_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/account_publickey_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAccountPublickeyDeleteParams creates a new AccountPublickeyDeleteParams 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 NewAccountPublickeyDeleteParams() *AccountPublickeyDeleteParams {
return &AccountPublickeyDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewAccountPublickeyDeleteParamsWithTimeout creates a new AccountPublickeyDeleteParams object
// with the ability to set a timeout on a request.
func NewAccountPublickeyDeleteParamsWithTimeout(timeout time.Duration) *AccountPublickeyDeleteParams {
return &AccountPublickeyDeleteParams{
timeout: timeout,
}
}
// NewAccountPublickeyDeleteParamsWithContext creates a new AccountPublickeyDeleteParams object
// with the ability to set a context for a request.
func NewAccountPublickeyDeleteParamsWithContext(ctx context.Context) *AccountPublickeyDeleteParams {
return &AccountPublickeyDeleteParams{
Context: ctx,
}
}
// NewAccountPublickeyDeleteParamsWithHTTPClient creates a new AccountPublickeyDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewAccountPublickeyDeleteParamsWithHTTPClient(client *http.Client) *AccountPublickeyDeleteParams {
return &AccountPublickeyDeleteParams{
HTTPClient: client,
}
}
/*
AccountPublickeyDeleteParams contains all the parameters to send to the API endpoint
for the account publickey delete operation.
Typically these are written to a http.Request.
*/
type AccountPublickeyDeleteParams struct {
/* AccountName.
User account name
*/
AccountName string
/* Index.
Index number for the public key (where there are multiple keys for the same account).
*/
Index int64
/* OwnerUUID.
Account owner UUID
*/
OwnerUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the account publickey delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AccountPublickeyDeleteParams) WithDefaults() *AccountPublickeyDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the account publickey delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AccountPublickeyDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithTimeout(timeout time.Duration) *AccountPublickeyDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithContext(ctx context.Context) *AccountPublickeyDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithHTTPClient(client *http.Client) *AccountPublickeyDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAccountName adds the accountName to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithAccountName(accountName string) *AccountPublickeyDeleteParams {
o.SetAccountName(accountName)
return o
}
// SetAccountName adds the accountName to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetAccountName(accountName string) {
o.AccountName = accountName
}
// WithIndex adds the index to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithIndex(index int64) *AccountPublickeyDeleteParams {
o.SetIndex(index)
return o
}
// SetIndex adds the index to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetIndex(index int64) {
o.Index = index
}
// WithOwnerUUID adds the ownerUUID to the account publickey delete params
func (o *AccountPublickeyDeleteParams) WithOwnerUUID(ownerUUID string) *AccountPublickeyDeleteParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the account publickey delete params
func (o *AccountPublickeyDeleteParams) SetOwnerUUID(ownerUUID string) {
o.OwnerUUID = ownerUUID
}
// WriteToRequest writes these params to a swagger request
func (o *AccountPublickeyDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param account.name
if err := r.SetPathParam("account.name", o.AccountName); err != nil {
return err
}
// path param index
if err := r.SetPathParam("index", swag.FormatInt64(o.Index)); err != nil {
return err
}
// path param owner.uuid
if err := r.SetPathParam("owner.uuid", o.OwnerUUID); 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/security/ipsec_policy_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/ipsec_policy_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// IpsecPolicyDeleteReader is a Reader for the IpsecPolicyDelete structure.
type IpsecPolicyDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IpsecPolicyDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIpsecPolicyDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIpsecPolicyDeleteDefault(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
}
}
// NewIpsecPolicyDeleteOK creates a IpsecPolicyDeleteOK with default headers values
func NewIpsecPolicyDeleteOK() *IpsecPolicyDeleteOK {
return &IpsecPolicyDeleteOK{}
}
/*
IpsecPolicyDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IpsecPolicyDeleteOK struct {
}
// IsSuccess returns true when this ipsec policy delete o k response has a 2xx status code
func (o *IpsecPolicyDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ipsec policy delete o k response has a 3xx status code
func (o *IpsecPolicyDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ipsec policy delete o k response has a 4xx status code
func (o *IpsecPolicyDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ipsec policy delete o k response has a 5xx status code
func (o *IpsecPolicyDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this ipsec policy delete o k response a status code equal to that given
func (o *IpsecPolicyDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IpsecPolicyDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /security/ipsec/policies/{uuid}][%d] ipsecPolicyDeleteOK ", 200)
}
func (o *IpsecPolicyDeleteOK) String() string {
return fmt.Sprintf("[DELETE /security/ipsec/policies/{uuid}][%d] ipsecPolicyDeleteOK ", 200)
}
func (o *IpsecPolicyDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIpsecPolicyDeleteDefault creates a IpsecPolicyDeleteDefault with default headers values
func NewIpsecPolicyDeleteDefault(code int) *IpsecPolicyDeleteDefault {
return &IpsecPolicyDeleteDefault{
_statusCode: code,
}
}
/*
IpsecPolicyDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 66257096 | Internal error. Failed to purge connections associated with the IPsec policy. |
| 66257116 | IPsec policy with the specified UUID was not found. |
*/
type IpsecPolicyDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ipsec policy delete default response
func (o *IpsecPolicyDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ipsec policy delete default response has a 2xx status code
func (o *IpsecPolicyDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ipsec policy delete default response has a 3xx status code
func (o *IpsecPolicyDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ipsec policy delete default response has a 4xx status code
func (o *IpsecPolicyDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ipsec policy delete default response has a 5xx status code
func (o *IpsecPolicyDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ipsec policy delete default response a status code equal to that given
func (o *IpsecPolicyDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IpsecPolicyDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /security/ipsec/policies/{uuid}][%d] ipsec_policy_delete default %+v", o._statusCode, o.Payload)
}
func (o *IpsecPolicyDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /security/ipsec/policies/{uuid}][%d] ipsec_policy_delete default %+v", o._statusCode, o.Payload)
}
func (o *IpsecPolicyDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IpsecPolicyDeleteDefault) 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/security/aws_kms_rekey_internal_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/aws_kms_rekey_internal_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// AwsKmsRekeyInternalReader is a Reader for the AwsKmsRekeyInternal structure.
type AwsKmsRekeyInternalReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AwsKmsRekeyInternalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewAwsKmsRekeyInternalAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewAwsKmsRekeyInternalDefault(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
}
}
// NewAwsKmsRekeyInternalAccepted creates a AwsKmsRekeyInternalAccepted with default headers values
func NewAwsKmsRekeyInternalAccepted() *AwsKmsRekeyInternalAccepted {
return &AwsKmsRekeyInternalAccepted{}
}
/*
AwsKmsRekeyInternalAccepted describes a response with status code 202, with default header values.
Accepted
*/
type AwsKmsRekeyInternalAccepted struct {
/* Useful for tracking the resource location
*/
Location string
}
// IsSuccess returns true when this aws kms rekey internal accepted response has a 2xx status code
func (o *AwsKmsRekeyInternalAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this aws kms rekey internal accepted response has a 3xx status code
func (o *AwsKmsRekeyInternalAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this aws kms rekey internal accepted response has a 4xx status code
func (o *AwsKmsRekeyInternalAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this aws kms rekey internal accepted response has a 5xx status code
func (o *AwsKmsRekeyInternalAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this aws kms rekey internal accepted response a status code equal to that given
func (o *AwsKmsRekeyInternalAccepted) IsCode(code int) bool {
return code == 202
}
func (o *AwsKmsRekeyInternalAccepted) Error() string {
return fmt.Sprintf("[POST /security/aws-kms/{aws_kms.uuid}/rekey-internal][%d] awsKmsRekeyInternalAccepted ", 202)
}
func (o *AwsKmsRekeyInternalAccepted) String() string {
return fmt.Sprintf("[POST /security/aws-kms/{aws_kms.uuid}/rekey-internal][%d] awsKmsRekeyInternalAccepted ", 202)
}
func (o *AwsKmsRekeyInternalAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
return nil
}
// NewAwsKmsRekeyInternalDefault creates a AwsKmsRekeyInternalDefault with default headers values
func NewAwsKmsRekeyInternalDefault(code int) *AwsKmsRekeyInternalDefault {
return &AwsKmsRekeyInternalDefault{
_statusCode: code,
}
}
/*
AwsKmsRekeyInternalDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 65537547 | One or more volume encryption keys for encrypted volumes of this data SVM are stored in the key manager configured for the admin SVM. Use the REST API POST method to migrate this data SVM's keys from the admin SVM's key manager to this data SVM's key manager before running the rekey operation. |
| 65537556 | Unable to successfully encrypt or decrypt because the configured external key manager for the given SVM is in a blocked state. |
| 65537559 | There are no existing internal keys for the SVM. A rekey operation is allowed for an SVM with one or more encryption keys. |
| 65537566 | Internal error. All nodes in the cluster are not currently online. |
| 65537926 | AWS KMS is not configured for the given SVM. |
*/
type AwsKmsRekeyInternalDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the aws kms rekey internal default response
func (o *AwsKmsRekeyInternalDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this aws kms rekey internal default response has a 2xx status code
func (o *AwsKmsRekeyInternalDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this aws kms rekey internal default response has a 3xx status code
func (o *AwsKmsRekeyInternalDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this aws kms rekey internal default response has a 4xx status code
func (o *AwsKmsRekeyInternalDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this aws kms rekey internal default response has a 5xx status code
func (o *AwsKmsRekeyInternalDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this aws kms rekey internal default response a status code equal to that given
func (o *AwsKmsRekeyInternalDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *AwsKmsRekeyInternalDefault) Error() string {
return fmt.Sprintf("[POST /security/aws-kms/{aws_kms.uuid}/rekey-internal][%d] aws_kms_rekey_internal default %+v", o._statusCode, o.Payload)
}
func (o *AwsKmsRekeyInternalDefault) String() string {
return fmt.Sprintf("[POST /security/aws-kms/{aws_kms.uuid}/rekey-internal][%d] aws_kms_rekey_internal default %+v", o._statusCode, o.Payload)
}
func (o *AwsKmsRekeyInternalDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *AwsKmsRekeyInternalDefault) 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/security/gcp_kms_modify_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/gcp_kms_modify_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewGcpKmsModifyParams creates a new GcpKmsModifyParams 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 NewGcpKmsModifyParams() *GcpKmsModifyParams {
return &GcpKmsModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewGcpKmsModifyParamsWithTimeout creates a new GcpKmsModifyParams object
// with the ability to set a timeout on a request.
func NewGcpKmsModifyParamsWithTimeout(timeout time.Duration) *GcpKmsModifyParams {
return &GcpKmsModifyParams{
timeout: timeout,
}
}
// NewGcpKmsModifyParamsWithContext creates a new GcpKmsModifyParams object
// with the ability to set a context for a request.
func NewGcpKmsModifyParamsWithContext(ctx context.Context) *GcpKmsModifyParams {
return &GcpKmsModifyParams{
Context: ctx,
}
}
// NewGcpKmsModifyParamsWithHTTPClient creates a new GcpKmsModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewGcpKmsModifyParamsWithHTTPClient(client *http.Client) *GcpKmsModifyParams {
return &GcpKmsModifyParams{
HTTPClient: client,
}
}
/*
GcpKmsModifyParams contains all the parameters to send to the API endpoint
for the gcp kms modify operation.
Typically these are written to a http.Request.
*/
type GcpKmsModifyParams struct {
/* Info.
Google Cloud KMS information
*/
Info *models.GcpKms
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
/* UUID.
Google Cloud KMS UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the gcp kms modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GcpKmsModifyParams) WithDefaults() *GcpKmsModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the gcp kms modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GcpKmsModifyParams) SetDefaults() {
var (
returnTimeoutDefault = int64(0)
)
val := GcpKmsModifyParams{
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the gcp kms modify params
func (o *GcpKmsModifyParams) WithTimeout(timeout time.Duration) *GcpKmsModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the gcp kms modify params
func (o *GcpKmsModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the gcp kms modify params
func (o *GcpKmsModifyParams) WithContext(ctx context.Context) *GcpKmsModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the gcp kms modify params
func (o *GcpKmsModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the gcp kms modify params
func (o *GcpKmsModifyParams) WithHTTPClient(client *http.Client) *GcpKmsModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the gcp kms modify params
func (o *GcpKmsModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the gcp kms modify params
func (o *GcpKmsModifyParams) WithInfo(info *models.GcpKms) *GcpKmsModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the gcp kms modify params
func (o *GcpKmsModifyParams) SetInfo(info *models.GcpKms) {
o.Info = info
}
// WithReturnTimeout adds the returnTimeout to the gcp kms modify params
func (o *GcpKmsModifyParams) WithReturnTimeout(returnTimeout *int64) *GcpKmsModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the gcp kms modify params
func (o *GcpKmsModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithUUID adds the uuid to the gcp kms modify params
func (o *GcpKmsModifyParams) WithUUID(uuid string) *GcpKmsModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the gcp kms modify params
func (o *GcpKmsModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *GcpKmsModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_config_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_config_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityConfigModifyReader is a Reader for the SecurityConfigModify structure.
type SecurityConfigModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityConfigModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewSecurityConfigModifyAccepted()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityConfigModifyDefault(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
}
}
// NewSecurityConfigModifyAccepted creates a SecurityConfigModifyAccepted with default headers values
func NewSecurityConfigModifyAccepted() *SecurityConfigModifyAccepted {
return &SecurityConfigModifyAccepted{}
}
/*
SecurityConfigModifyAccepted describes a response with status code 202, with default header values.
Accepted
*/
type SecurityConfigModifyAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this security config modify accepted response has a 2xx status code
func (o *SecurityConfigModifyAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security config modify accepted response has a 3xx status code
func (o *SecurityConfigModifyAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this security config modify accepted response has a 4xx status code
func (o *SecurityConfigModifyAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this security config modify accepted response has a 5xx status code
func (o *SecurityConfigModifyAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this security config modify accepted response a status code equal to that given
func (o *SecurityConfigModifyAccepted) IsCode(code int) bool {
return code == 202
}
func (o *SecurityConfigModifyAccepted) Error() string {
return fmt.Sprintf("[PATCH /security][%d] securityConfigModifyAccepted %+v", 202, o.Payload)
}
func (o *SecurityConfigModifyAccepted) String() string {
return fmt.Sprintf("[PATCH /security][%d] securityConfigModifyAccepted %+v", 202, o.Payload)
}
func (o *SecurityConfigModifyAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *SecurityConfigModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSecurityConfigModifyDefault creates a SecurityConfigModifyDefault with default headers values
func NewSecurityConfigModifyDefault(code int) *SecurityConfigModifyDefault {
return &SecurityConfigModifyDefault{
_statusCode: code,
}
}
/*
SecurityConfigModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 5636142 | This operation is not supported in a mixed-release cluster. |
| 52428817 | SSLv3 is not supported when FIPS is enabled. |
| 52428824 | TLSv1 is not supported when FIPS is enabled. |
| 52428830 | Cannot enable FIPS-compliant mode because the configured minimum security strength for certificates is not compatible. |
| 52428832 | TLSv1.1 is not supported when FIPS is enabled. |
| 52559974 | Cannot enable FIPS-compliant mode because a certificate that is not FIPS-compliant is in use. |
| 196608081 | Cannot start software encryption conversion while there are data volumes in the cluster. |
| 196608082 | The operation is not valid when the MetroCluster is in switchover mode. |
*/
type SecurityConfigModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security config modify default response
func (o *SecurityConfigModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security config modify default response has a 2xx status code
func (o *SecurityConfigModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security config modify default response has a 3xx status code
func (o *SecurityConfigModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security config modify default response has a 4xx status code
func (o *SecurityConfigModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security config modify default response has a 5xx status code
func (o *SecurityConfigModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security config modify default response a status code equal to that given
func (o *SecurityConfigModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityConfigModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /security][%d] security_config_modify default %+v", o._statusCode, o.Payload)
}
func (o *SecurityConfigModifyDefault) String() string {
return fmt.Sprintf("[PATCH /security][%d] security_config_modify default %+v", o._statusCode, o.Payload)
}
func (o *SecurityConfigModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityConfigModifyDefault) 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/security/cluster_ldap_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/cluster_ldap_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// ClusterLdapModifyReader is a Reader for the ClusterLdapModify structure.
type ClusterLdapModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClusterLdapModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClusterLdapModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewClusterLdapModifyDefault(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
}
}
// NewClusterLdapModifyOK creates a ClusterLdapModifyOK with default headers values
func NewClusterLdapModifyOK() *ClusterLdapModifyOK {
return &ClusterLdapModifyOK{}
}
/*
ClusterLdapModifyOK describes a response with status code 200, with default header values.
OK
*/
type ClusterLdapModifyOK struct {
}
// IsSuccess returns true when this cluster ldap modify o k response has a 2xx status code
func (o *ClusterLdapModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this cluster ldap modify o k response has a 3xx status code
func (o *ClusterLdapModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this cluster ldap modify o k response has a 4xx status code
func (o *ClusterLdapModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this cluster ldap modify o k response has a 5xx status code
func (o *ClusterLdapModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this cluster ldap modify o k response a status code equal to that given
func (o *ClusterLdapModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *ClusterLdapModifyOK) Error() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ldap][%d] clusterLdapModifyOK ", 200)
}
func (o *ClusterLdapModifyOK) String() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ldap][%d] clusterLdapModifyOK ", 200)
}
func (o *ClusterLdapModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClusterLdapModifyDefault creates a ClusterLdapModifyDefault with default headers values
func NewClusterLdapModifyDefault(code int) *ClusterLdapModifyDefault {
return &ClusterLdapModifyDefault{
_statusCode: code,
}
}
/*
ClusterLdapModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 4915203 | The specified LDAP schema does not exist. |
| 4915208 | The specified LDAP servers contain duplicate server entries. |
| 4915229 | DNS resolution failed due to an internal error. Contact technical support if this issue persists. |
| 4915231 | DNS resolution failed for one or more of the specified LDAP servers. Verify that a valid DNS server is configured. |
| 23724132 | DNS resolution failed for all the specified LDAP servers. Verify that a valid DNS server is configured. |
| 4915234 | Specified LDAP server is not supported because it is one of the following: multicast, loopback, 0.0.0.0, or broadcast. |
| 4915248 | LDAP servers cannot be empty or "-". Specified FQDN is not valid because it is empty or "-" or it contains either special characters or "-" at the start or end of the domain. |
| 4915251 | STARTTLS and LDAPS cannot be used together |
| 4915257 | The LDAP configuration is not valid. Verify that the Distinguished Names and bind password are correct. |
| 4915258 | The LDAP configuration is not valid. Verify that the servers are reachable and that the network configuration is correct. |
| 23724130 | Cannot use an IPv6 name server address because there are no IPv6 interfaces. |
| 4915252 | LDAP referral is not supported with STARTTLS, with session security levels sign, seal or with LDAPS. |
*/
type ClusterLdapModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the cluster ldap modify default response
func (o *ClusterLdapModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this cluster ldap modify default response has a 2xx status code
func (o *ClusterLdapModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this cluster ldap modify default response has a 3xx status code
func (o *ClusterLdapModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this cluster ldap modify default response has a 4xx status code
func (o *ClusterLdapModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this cluster ldap modify default response has a 5xx status code
func (o *ClusterLdapModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this cluster ldap modify default response a status code equal to that given
func (o *ClusterLdapModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *ClusterLdapModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ldap][%d] cluster_ldap_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterLdapModifyDefault) String() string {
return fmt.Sprintf("[PATCH /security/authentication/cluster/ldap][%d] cluster_ldap_modify default %+v", o._statusCode, o.Payload)
}
func (o *ClusterLdapModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *ClusterLdapModifyDefault) 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/security/multi_admin_verify_rule_modify_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_rule_modify_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// MultiAdminVerifyRuleModifyReader is a Reader for the MultiAdminVerifyRuleModify structure.
type MultiAdminVerifyRuleModifyReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MultiAdminVerifyRuleModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMultiAdminVerifyRuleModifyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMultiAdminVerifyRuleModifyDefault(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
}
}
// NewMultiAdminVerifyRuleModifyOK creates a MultiAdminVerifyRuleModifyOK with default headers values
func NewMultiAdminVerifyRuleModifyOK() *MultiAdminVerifyRuleModifyOK {
return &MultiAdminVerifyRuleModifyOK{}
}
/*
MultiAdminVerifyRuleModifyOK describes a response with status code 200, with default header values.
OK
*/
type MultiAdminVerifyRuleModifyOK struct {
}
// IsSuccess returns true when this multi admin verify rule modify o k response has a 2xx status code
func (o *MultiAdminVerifyRuleModifyOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this multi admin verify rule modify o k response has a 3xx status code
func (o *MultiAdminVerifyRuleModifyOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this multi admin verify rule modify o k response has a 4xx status code
func (o *MultiAdminVerifyRuleModifyOK) IsClientError() bool {
return false
}
// IsServerError returns true when this multi admin verify rule modify o k response has a 5xx status code
func (o *MultiAdminVerifyRuleModifyOK) IsServerError() bool {
return false
}
// IsCode returns true when this multi admin verify rule modify o k response a status code equal to that given
func (o *MultiAdminVerifyRuleModifyOK) IsCode(code int) bool {
return code == 200
}
func (o *MultiAdminVerifyRuleModifyOK) Error() string {
return fmt.Sprintf("[PATCH /security/multi-admin-verify/rules/{owner.uuid}/{operation}][%d] multiAdminVerifyRuleModifyOK ", 200)
}
func (o *MultiAdminVerifyRuleModifyOK) String() string {
return fmt.Sprintf("[PATCH /security/multi-admin-verify/rules/{owner.uuid}/{operation}][%d] multiAdminVerifyRuleModifyOK ", 200)
}
func (o *MultiAdminVerifyRuleModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewMultiAdminVerifyRuleModifyDefault creates a MultiAdminVerifyRuleModifyDefault with default headers values
func NewMultiAdminVerifyRuleModifyDefault(code int) *MultiAdminVerifyRuleModifyDefault {
return &MultiAdminVerifyRuleModifyDefault{
_statusCode: code,
}
}
/*
MultiAdminVerifyRuleModifyDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 262310 | System rules cannot be deleted or have their query modified. |
| 262311 | Value must be greater than zero. |
| 262312 | Number of required approvers must be less than the total number of unique approvers in the approval-groups. |
| 262313 | Number of unique approvers in the approval-groups must be greater than the number of required approvers. |
| 262316 | Value must be in the range one second to two weeks. |
*/
type MultiAdminVerifyRuleModifyDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the multi admin verify rule modify default response
func (o *MultiAdminVerifyRuleModifyDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this multi admin verify rule modify default response has a 2xx status code
func (o *MultiAdminVerifyRuleModifyDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this multi admin verify rule modify default response has a 3xx status code
func (o *MultiAdminVerifyRuleModifyDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this multi admin verify rule modify default response has a 4xx status code
func (o *MultiAdminVerifyRuleModifyDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this multi admin verify rule modify default response has a 5xx status code
func (o *MultiAdminVerifyRuleModifyDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this multi admin verify rule modify default response a status code equal to that given
func (o *MultiAdminVerifyRuleModifyDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MultiAdminVerifyRuleModifyDefault) Error() string {
return fmt.Sprintf("[PATCH /security/multi-admin-verify/rules/{owner.uuid}/{operation}][%d] multi_admin_verify_rule_modify default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRuleModifyDefault) String() string {
return fmt.Sprintf("[PATCH /security/multi-admin-verify/rules/{owner.uuid}/{operation}][%d] multi_admin_verify_rule_modify default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRuleModifyDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MultiAdminVerifyRuleModifyDefault) 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/security/role_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/role_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewRoleCreateParams creates a new RoleCreateParams 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 NewRoleCreateParams() *RoleCreateParams {
return &RoleCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewRoleCreateParamsWithTimeout creates a new RoleCreateParams object
// with the ability to set a timeout on a request.
func NewRoleCreateParamsWithTimeout(timeout time.Duration) *RoleCreateParams {
return &RoleCreateParams{
timeout: timeout,
}
}
// NewRoleCreateParamsWithContext creates a new RoleCreateParams object
// with the ability to set a context for a request.
func NewRoleCreateParamsWithContext(ctx context.Context) *RoleCreateParams {
return &RoleCreateParams{
Context: ctx,
}
}
// NewRoleCreateParamsWithHTTPClient creates a new RoleCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewRoleCreateParamsWithHTTPClient(client *http.Client) *RoleCreateParams {
return &RoleCreateParams{
HTTPClient: client,
}
}
/*
RoleCreateParams contains all the parameters to send to the API endpoint
for the role create operation.
Typically these are written to a http.Request.
*/
type RoleCreateParams struct {
/* Info.
Role specification
*/
Info *models.Role
/* 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 role create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RoleCreateParams) WithDefaults() *RoleCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the role create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RoleCreateParams) SetDefaults() {
var (
returnRecordsDefault = bool(false)
)
val := RoleCreateParams{
ReturnRecords: &returnRecordsDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the role create params
func (o *RoleCreateParams) WithTimeout(timeout time.Duration) *RoleCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the role create params
func (o *RoleCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the role create params
func (o *RoleCreateParams) WithContext(ctx context.Context) *RoleCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the role create params
func (o *RoleCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the role create params
func (o *RoleCreateParams) WithHTTPClient(client *http.Client) *RoleCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the role create params
func (o *RoleCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInfo adds the info to the role create params
func (o *RoleCreateParams) WithInfo(info *models.Role) *RoleCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the role create params
func (o *RoleCreateParams) SetInfo(info *models.Role) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the role create params
func (o *RoleCreateParams) WithReturnRecords(returnRecords *bool) *RoleCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the role create params
func (o *RoleCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WriteToRequest writes these params to a swagger request
func (o *RoleCreateParams) 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/security/login_messages_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/login_messages_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewLoginMessagesCollectionGetParams creates a new LoginMessagesCollectionGetParams 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 NewLoginMessagesCollectionGetParams() *LoginMessagesCollectionGetParams {
return &LoginMessagesCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewLoginMessagesCollectionGetParamsWithTimeout creates a new LoginMessagesCollectionGetParams object
// with the ability to set a timeout on a request.
func NewLoginMessagesCollectionGetParamsWithTimeout(timeout time.Duration) *LoginMessagesCollectionGetParams {
return &LoginMessagesCollectionGetParams{
timeout: timeout,
}
}
// NewLoginMessagesCollectionGetParamsWithContext creates a new LoginMessagesCollectionGetParams object
// with the ability to set a context for a request.
func NewLoginMessagesCollectionGetParamsWithContext(ctx context.Context) *LoginMessagesCollectionGetParams {
return &LoginMessagesCollectionGetParams{
Context: ctx,
}
}
// NewLoginMessagesCollectionGetParamsWithHTTPClient creates a new LoginMessagesCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewLoginMessagesCollectionGetParamsWithHTTPClient(client *http.Client) *LoginMessagesCollectionGetParams {
return &LoginMessagesCollectionGetParams{
HTTPClient: client,
}
}
/*
LoginMessagesCollectionGetParams contains all the parameters to send to the API endpoint
for the login messages collection get operation.
Typically these are written to a http.Request.
*/
type LoginMessagesCollectionGetParams struct {
/* Banner.
Filter by banner
*/
Banner *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* Message.
Filter by message
*/
Message *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
/* Scope.
Filter by scope
*/
Scope *string
/* ShowClusterMessage.
Filter by show_cluster_message
*/
ShowClusterMessage *bool
/* 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 login messages collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LoginMessagesCollectionGetParams) WithDefaults() *LoginMessagesCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the login messages collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *LoginMessagesCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := LoginMessagesCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithTimeout(timeout time.Duration) *LoginMessagesCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithContext(ctx context.Context) *LoginMessagesCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithHTTPClient(client *http.Client) *LoginMessagesCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithBanner adds the banner to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithBanner(banner *string) *LoginMessagesCollectionGetParams {
o.SetBanner(banner)
return o
}
// SetBanner adds the banner to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetBanner(banner *string) {
o.Banner = banner
}
// WithFields adds the fields to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithFields(fields []string) *LoginMessagesCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithMaxRecords adds the maxRecords to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithMaxRecords(maxRecords *int64) *LoginMessagesCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithMessage adds the message to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithMessage(message *string) *LoginMessagesCollectionGetParams {
o.SetMessage(message)
return o
}
// SetMessage adds the message to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetMessage(message *string) {
o.Message = message
}
// WithOrderBy adds the orderBy to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithOrderBy(orderBy []string) *LoginMessagesCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithReturnRecords adds the returnRecords to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithReturnRecords(returnRecords *bool) *LoginMessagesCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *LoginMessagesCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithScope adds the scope to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithScope(scope *string) *LoginMessagesCollectionGetParams {
o.SetScope(scope)
return o
}
// SetScope adds the scope to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetScope(scope *string) {
o.Scope = scope
}
// WithShowClusterMessage adds the showClusterMessage to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithShowClusterMessage(showClusterMessage *bool) *LoginMessagesCollectionGetParams {
o.SetShowClusterMessage(showClusterMessage)
return o
}
// SetShowClusterMessage adds the showClusterMessage to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetShowClusterMessage(showClusterMessage *bool) {
o.ShowClusterMessage = showClusterMessage
}
// WithSvmName adds the svmName to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithSvmName(svmName *string) *LoginMessagesCollectionGetParams {
o.SetSvmName(svmName)
return o
}
// SetSvmName adds the svmName to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetSvmName(svmName *string) {
o.SvmName = svmName
}
// WithSvmUUID adds the svmUUID to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithSvmUUID(svmUUID *string) *LoginMessagesCollectionGetParams {
o.SetSvmUUID(svmUUID)
return o
}
// SetSvmUUID adds the svmUuid to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetSvmUUID(svmUUID *string) {
o.SvmUUID = svmUUID
}
// WithUUID adds the uuid to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) WithUUID(uuid *string) *LoginMessagesCollectionGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the login messages collection get params
func (o *LoginMessagesCollectionGetParams) SetUUID(uuid *string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *LoginMessagesCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Banner != nil {
// query param banner
var qrBanner string
if o.Banner != nil {
qrBanner = *o.Banner
}
qBanner := qrBanner
if qBanner != "" {
if err := r.SetQueryParam("banner", qBanner); 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.Message != nil {
// query param message
var qrMessage string
if o.Message != nil {
qrMessage = *o.Message
}
qMessage := qrMessage
if qMessage != "" {
if err := r.SetQueryParam("message", qMessage); 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.Scope != nil {
// query param scope
var qrScope string
if o.Scope != nil {
qrScope = *o.Scope
}
qScope := qrScope
if qScope != "" {
if err := r.SetQueryParam("scope", qScope); err != nil {
return err
}
}
}
if o.ShowClusterMessage != nil {
// query param show_cluster_message
var qrShowClusterMessage bool
if o.ShowClusterMessage != nil {
qrShowClusterMessage = *o.ShowClusterMessage
}
qShowClusterMessage := swag.FormatBool(qrShowClusterMessage)
if qShowClusterMessage != "" {
if err := r.SetQueryParam("show_cluster_message", qShowClusterMessage); 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
}
// bindParamLoginMessagesCollectionGet binds the parameter fields
func (o *LoginMessagesCollectionGetParams) 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
}
// bindParamLoginMessagesCollectionGet binds the parameter order_by
func (o *LoginMessagesCollectionGetParams) 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/security/ipsec_ca_certificate_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/ipsec_ca_certificate_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// IpsecCaCertificateDeleteReader is a Reader for the IpsecCaCertificateDelete structure.
type IpsecCaCertificateDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *IpsecCaCertificateDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewIpsecCaCertificateDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewIpsecCaCertificateDeleteDefault(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
}
}
// NewIpsecCaCertificateDeleteOK creates a IpsecCaCertificateDeleteOK with default headers values
func NewIpsecCaCertificateDeleteOK() *IpsecCaCertificateDeleteOK {
return &IpsecCaCertificateDeleteOK{}
}
/*
IpsecCaCertificateDeleteOK describes a response with status code 200, with default header values.
OK
*/
type IpsecCaCertificateDeleteOK struct {
}
// IsSuccess returns true when this ipsec ca certificate delete o k response has a 2xx status code
func (o *IpsecCaCertificateDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ipsec ca certificate delete o k response has a 3xx status code
func (o *IpsecCaCertificateDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ipsec ca certificate delete o k response has a 4xx status code
func (o *IpsecCaCertificateDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ipsec ca certificate delete o k response has a 5xx status code
func (o *IpsecCaCertificateDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this ipsec ca certificate delete o k response a status code equal to that given
func (o *IpsecCaCertificateDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *IpsecCaCertificateDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /security/ipsec/ca-certificates/{certificate.uuid}][%d] ipsecCaCertificateDeleteOK ", 200)
}
func (o *IpsecCaCertificateDeleteOK) String() string {
return fmt.Sprintf("[DELETE /security/ipsec/ca-certificates/{certificate.uuid}][%d] ipsecCaCertificateDeleteOK ", 200)
}
func (o *IpsecCaCertificateDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewIpsecCaCertificateDeleteDefault creates a IpsecCaCertificateDeleteDefault with default headers values
func NewIpsecCaCertificateDeleteDefault(code int) *IpsecCaCertificateDeleteDefault {
return &IpsecCaCertificateDeleteDefault{
_statusCode: code,
}
}
/*
IpsecCaCertificateDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 66257298 | CA certificate is not installed for IPsec. |
| 66257303 | The CA certificate cannot be removed from IPsec because it is not installed. |
*/
type IpsecCaCertificateDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the ipsec ca certificate delete default response
func (o *IpsecCaCertificateDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this ipsec ca certificate delete default response has a 2xx status code
func (o *IpsecCaCertificateDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this ipsec ca certificate delete default response has a 3xx status code
func (o *IpsecCaCertificateDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this ipsec ca certificate delete default response has a 4xx status code
func (o *IpsecCaCertificateDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this ipsec ca certificate delete default response has a 5xx status code
func (o *IpsecCaCertificateDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this ipsec ca certificate delete default response a status code equal to that given
func (o *IpsecCaCertificateDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *IpsecCaCertificateDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /security/ipsec/ca-certificates/{certificate.uuid}][%d] ipsec_ca_certificate_delete default %+v", o._statusCode, o.Payload)
}
func (o *IpsecCaCertificateDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /security/ipsec/ca-certificates/{certificate.uuid}][%d] ipsec_ca_certificate_delete default %+v", o._statusCode, o.Payload)
}
func (o *IpsecCaCertificateDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *IpsecCaCertificateDeleteDefault) 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/security/key_manager_auth_key_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/key_manager_auth_key_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// KeyManagerAuthKeyDeleteReader is a Reader for the KeyManagerAuthKeyDelete structure.
type KeyManagerAuthKeyDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *KeyManagerAuthKeyDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewKeyManagerAuthKeyDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewKeyManagerAuthKeyDeleteDefault(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
}
}
// NewKeyManagerAuthKeyDeleteOK creates a KeyManagerAuthKeyDeleteOK with default headers values
func NewKeyManagerAuthKeyDeleteOK() *KeyManagerAuthKeyDeleteOK {
return &KeyManagerAuthKeyDeleteOK{}
}
/*
KeyManagerAuthKeyDeleteOK describes a response with status code 200, with default header values.
OK
*/
type KeyManagerAuthKeyDeleteOK struct {
}
// IsSuccess returns true when this key manager auth key delete o k response has a 2xx status code
func (o *KeyManagerAuthKeyDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this key manager auth key delete o k response has a 3xx status code
func (o *KeyManagerAuthKeyDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this key manager auth key delete o k response has a 4xx status code
func (o *KeyManagerAuthKeyDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this key manager auth key delete o k response has a 5xx status code
func (o *KeyManagerAuthKeyDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this key manager auth key delete o k response a status code equal to that given
func (o *KeyManagerAuthKeyDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *KeyManagerAuthKeyDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /security/key-managers/{security_key_manager.uuid}/auth-keys/{key_id}][%d] keyManagerAuthKeyDeleteOK ", 200)
}
func (o *KeyManagerAuthKeyDeleteOK) String() string {
return fmt.Sprintf("[DELETE /security/key-managers/{security_key_manager.uuid}/auth-keys/{key_id}][%d] keyManagerAuthKeyDeleteOK ", 200)
}
func (o *KeyManagerAuthKeyDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewKeyManagerAuthKeyDeleteDefault creates a KeyManagerAuthKeyDeleteDefault with default headers values
func NewKeyManagerAuthKeyDeleteDefault(code int) *KeyManagerAuthKeyDeleteDefault {
return &KeyManagerAuthKeyDeleteDefault{
_statusCode: code,
}
}
/*
KeyManagerAuthKeyDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 65536828 | External key management is not enabled for the SVM. |
| 65536859 | Authentication key-Id provided for deletion is in use. |
| 65536860 | Key-id provided for deletion is not an authentication key. |
| 65538800 | External KMIP DKMIP keymanager not configured on administrative Vserver. |
| 65538801 | Internal error while accessing keymanager database. |
| 65538802 | The UUID provided is not associated with the administrator SVM key manager. |
| 66060296 | Failed to delete key from an external key server. |
*/
type KeyManagerAuthKeyDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the key manager auth key delete default response
func (o *KeyManagerAuthKeyDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this key manager auth key delete default response has a 2xx status code
func (o *KeyManagerAuthKeyDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this key manager auth key delete default response has a 3xx status code
func (o *KeyManagerAuthKeyDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this key manager auth key delete default response has a 4xx status code
func (o *KeyManagerAuthKeyDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this key manager auth key delete default response has a 5xx status code
func (o *KeyManagerAuthKeyDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this key manager auth key delete default response a status code equal to that given
func (o *KeyManagerAuthKeyDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *KeyManagerAuthKeyDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /security/key-managers/{security_key_manager.uuid}/auth-keys/{key_id}][%d] key_manager_auth_key_delete default %+v", o._statusCode, o.Payload)
}
func (o *KeyManagerAuthKeyDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /security/key-managers/{security_key_manager.uuid}/auth-keys/{key_id}][%d] key_manager_auth_key_delete default %+v", o._statusCode, o.Payload)
}
func (o *KeyManagerAuthKeyDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *KeyManagerAuthKeyDeleteDefault) 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/security/gcp_kms_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/gcp_kms_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// GcpKmsGetReader is a Reader for the GcpKmsGet structure.
type GcpKmsGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GcpKmsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGcpKmsGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewGcpKmsGetDefault(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
}
}
// NewGcpKmsGetOK creates a GcpKmsGetOK with default headers values
func NewGcpKmsGetOK() *GcpKmsGetOK {
return &GcpKmsGetOK{}
}
/*
GcpKmsGetOK describes a response with status code 200, with default header values.
OK
*/
type GcpKmsGetOK struct {
Payload *models.GcpKms
}
// IsSuccess returns true when this gcp kms get o k response has a 2xx status code
func (o *GcpKmsGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this gcp kms get o k response has a 3xx status code
func (o *GcpKmsGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this gcp kms get o k response has a 4xx status code
func (o *GcpKmsGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this gcp kms get o k response has a 5xx status code
func (o *GcpKmsGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this gcp kms get o k response a status code equal to that given
func (o *GcpKmsGetOK) IsCode(code int) bool {
return code == 200
}
func (o *GcpKmsGetOK) Error() string {
return fmt.Sprintf("[GET /security/gcp-kms/{uuid}][%d] gcpKmsGetOK %+v", 200, o.Payload)
}
func (o *GcpKmsGetOK) String() string {
return fmt.Sprintf("[GET /security/gcp-kms/{uuid}][%d] gcpKmsGetOK %+v", 200, o.Payload)
}
func (o *GcpKmsGetOK) GetPayload() *models.GcpKms {
return o.Payload
}
func (o *GcpKmsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.GcpKms)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGcpKmsGetDefault creates a GcpKmsGetDefault with default headers values
func NewGcpKmsGetDefault(code int) *GcpKmsGetDefault {
return &GcpKmsGetDefault{
_statusCode: code,
}
}
/*
GcpKmsGetDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 65537551 | Top-level internal key protection key (KEK) unavailable on one or more nodes. |
| 65537552 | Embedded KMIP server status not available. |
| 65537730 | The Google Cloud Key Management Service is unreachable from one or more nodes. |
*/
type GcpKmsGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the gcp kms get default response
func (o *GcpKmsGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this gcp kms get default response has a 2xx status code
func (o *GcpKmsGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this gcp kms get default response has a 3xx status code
func (o *GcpKmsGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this gcp kms get default response has a 4xx status code
func (o *GcpKmsGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this gcp kms get default response has a 5xx status code
func (o *GcpKmsGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this gcp kms get default response a status code equal to that given
func (o *GcpKmsGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *GcpKmsGetDefault) Error() string {
return fmt.Sprintf("[GET /security/gcp-kms/{uuid}][%d] gcp_kms_get default %+v", o._statusCode, o.Payload)
}
func (o *GcpKmsGetDefault) String() string {
return fmt.Sprintf("[GET /security/gcp-kms/{uuid}][%d] gcp_kms_get default %+v", o._statusCode, o.Payload)
}
func (o *GcpKmsGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *GcpKmsGetDefault) 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/security/multi_admin_verify_request_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_request_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// MultiAdminVerifyRequestCreateReader is a Reader for the MultiAdminVerifyRequestCreate structure.
type MultiAdminVerifyRequestCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MultiAdminVerifyRequestCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewMultiAdminVerifyRequestCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMultiAdminVerifyRequestCreateDefault(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
}
}
// NewMultiAdminVerifyRequestCreateCreated creates a MultiAdminVerifyRequestCreateCreated with default headers values
func NewMultiAdminVerifyRequestCreateCreated() *MultiAdminVerifyRequestCreateCreated {
return &MultiAdminVerifyRequestCreateCreated{}
}
/*
MultiAdminVerifyRequestCreateCreated describes a response with status code 201, with default header values.
Created
*/
type MultiAdminVerifyRequestCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
Payload *models.MultiAdminVerifyRequestResponse
}
// IsSuccess returns true when this multi admin verify request create created response has a 2xx status code
func (o *MultiAdminVerifyRequestCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this multi admin verify request create created response has a 3xx status code
func (o *MultiAdminVerifyRequestCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this multi admin verify request create created response has a 4xx status code
func (o *MultiAdminVerifyRequestCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this multi admin verify request create created response has a 5xx status code
func (o *MultiAdminVerifyRequestCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this multi admin verify request create created response a status code equal to that given
func (o *MultiAdminVerifyRequestCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *MultiAdminVerifyRequestCreateCreated) Error() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/requests][%d] multiAdminVerifyRequestCreateCreated %+v", 201, o.Payload)
}
func (o *MultiAdminVerifyRequestCreateCreated) String() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/requests][%d] multiAdminVerifyRequestCreateCreated %+v", 201, o.Payload)
}
func (o *MultiAdminVerifyRequestCreateCreated) GetPayload() *models.MultiAdminVerifyRequestResponse {
return o.Payload
}
func (o *MultiAdminVerifyRequestCreateCreated) 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.MultiAdminVerifyRequestResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMultiAdminVerifyRequestCreateDefault creates a MultiAdminVerifyRequestCreateDefault with default headers values
func NewMultiAdminVerifyRequestCreateDefault(code int) *MultiAdminVerifyRequestCreateDefault {
return &MultiAdminVerifyRequestCreateDefault{
_statusCode: code,
}
}
/*
MultiAdminVerifyRequestCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 262148 | The specified command is not recognized. |
| 262304 | Too many requests. Delete one before creating another. |
| 262305 | Can't approve non-pending request. |
| 262306 | Can't veto an expired request. |
| 262308 | The specified command is not supported by this feature. |
| 262309 | The feature must be enabled first. |
| 262311 | Value must be greater than zero. |
| 262312 | Number of required approvers must be less than the total number of unique approvers in the approval-groups. |
| 262313 | Number of unique approvers in the approval-groups must be greater than the number of required approvers. |
| 262326 | Failed to parse query. |
| 262327 | Failed to crate the request. |
| 262328 | There is no matching rule for this request. |
| 262330 | Cannot approve/veto a request multiple times. |
| 262334 | The parameter specified in the command is not supported. |
| 262337 | Cannot approve/veto the user's own request. |
*/
type MultiAdminVerifyRequestCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the multi admin verify request create default response
func (o *MultiAdminVerifyRequestCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this multi admin verify request create default response has a 2xx status code
func (o *MultiAdminVerifyRequestCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this multi admin verify request create default response has a 3xx status code
func (o *MultiAdminVerifyRequestCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this multi admin verify request create default response has a 4xx status code
func (o *MultiAdminVerifyRequestCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this multi admin verify request create default response has a 5xx status code
func (o *MultiAdminVerifyRequestCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this multi admin verify request create default response a status code equal to that given
func (o *MultiAdminVerifyRequestCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MultiAdminVerifyRequestCreateDefault) Error() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/requests][%d] multi_admin_verify_request_create default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRequestCreateDefault) String() string {
return fmt.Sprintf("[POST /security/multi-admin-verify/requests][%d] multi_admin_verify_request_create default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRequestCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MultiAdminVerifyRequestCreateDefault) 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/security/aws_kms_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/aws_kms_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAwsKmsGetParams creates a new AwsKmsGetParams 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 NewAwsKmsGetParams() *AwsKmsGetParams {
return &AwsKmsGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewAwsKmsGetParamsWithTimeout creates a new AwsKmsGetParams object
// with the ability to set a timeout on a request.
func NewAwsKmsGetParamsWithTimeout(timeout time.Duration) *AwsKmsGetParams {
return &AwsKmsGetParams{
timeout: timeout,
}
}
// NewAwsKmsGetParamsWithContext creates a new AwsKmsGetParams object
// with the ability to set a context for a request.
func NewAwsKmsGetParamsWithContext(ctx context.Context) *AwsKmsGetParams {
return &AwsKmsGetParams{
Context: ctx,
}
}
// NewAwsKmsGetParamsWithHTTPClient creates a new AwsKmsGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewAwsKmsGetParamsWithHTTPClient(client *http.Client) *AwsKmsGetParams {
return &AwsKmsGetParams{
HTTPClient: client,
}
}
/*
AwsKmsGetParams contains all the parameters to send to the API endpoint
for the aws kms get operation.
Typically these are written to a http.Request.
*/
type AwsKmsGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
AWS KMS UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the aws kms get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AwsKmsGetParams) WithDefaults() *AwsKmsGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the aws kms get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AwsKmsGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the aws kms get params
func (o *AwsKmsGetParams) WithTimeout(timeout time.Duration) *AwsKmsGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the aws kms get params
func (o *AwsKmsGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the aws kms get params
func (o *AwsKmsGetParams) WithContext(ctx context.Context) *AwsKmsGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the aws kms get params
func (o *AwsKmsGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the aws kms get params
func (o *AwsKmsGetParams) WithHTTPClient(client *http.Client) *AwsKmsGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the aws kms get params
func (o *AwsKmsGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the aws kms get params
func (o *AwsKmsGetParams) WithFields(fields []string) *AwsKmsGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the aws kms get params
func (o *AwsKmsGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the aws kms get params
func (o *AwsKmsGetParams) WithUUID(uuid string) *AwsKmsGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the aws kms get params
func (o *AwsKmsGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *AwsKmsGetParams) 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
}
// bindParamAwsKmsGet binds the parameter fields
func (o *AwsKmsGetParams) 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/security/account_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/account_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewAccountGetParams creates a new AccountGetParams 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 NewAccountGetParams() *AccountGetParams {
return &AccountGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewAccountGetParamsWithTimeout creates a new AccountGetParams object
// with the ability to set a timeout on a request.
func NewAccountGetParamsWithTimeout(timeout time.Duration) *AccountGetParams {
return &AccountGetParams{
timeout: timeout,
}
}
// NewAccountGetParamsWithContext creates a new AccountGetParams object
// with the ability to set a context for a request.
func NewAccountGetParamsWithContext(ctx context.Context) *AccountGetParams {
return &AccountGetParams{
Context: ctx,
}
}
// NewAccountGetParamsWithHTTPClient creates a new AccountGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewAccountGetParamsWithHTTPClient(client *http.Client) *AccountGetParams {
return &AccountGetParams{
HTTPClient: client,
}
}
/*
AccountGetParams contains all the parameters to send to the API endpoint
for the account get operation.
Typically these are written to a http.Request.
*/
type AccountGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Name.
User account name
*/
Name string
/* OwnerUUID.
Account owner UUID
*/
OwnerUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the account get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AccountGetParams) WithDefaults() *AccountGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the account get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AccountGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the account get params
func (o *AccountGetParams) WithTimeout(timeout time.Duration) *AccountGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the account get params
func (o *AccountGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the account get params
func (o *AccountGetParams) WithContext(ctx context.Context) *AccountGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the account get params
func (o *AccountGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the account get params
func (o *AccountGetParams) WithHTTPClient(client *http.Client) *AccountGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the account get params
func (o *AccountGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the account get params
func (o *AccountGetParams) WithFields(fields []string) *AccountGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the account get params
func (o *AccountGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithName adds the name to the account get params
func (o *AccountGetParams) WithName(name string) *AccountGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the account get params
func (o *AccountGetParams) SetName(name string) {
o.Name = name
}
// WithOwnerUUID adds the ownerUUID to the account get params
func (o *AccountGetParams) WithOwnerUUID(ownerUUID string) *AccountGetParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the account get params
func (o *AccountGetParams) SetOwnerUUID(ownerUUID string) {
o.OwnerUUID = ownerUUID
}
// WriteToRequest writes these params to a swagger request
func (o *AccountGetParams) 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
}
// path param owner.uuid
if err := r.SetPathParam("owner.uuid", o.OwnerUUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamAccountGet binds the parameter fields
func (o *AccountGetParams) 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/security/security_log_forwarding_create_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_log_forwarding_create_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewSecurityLogForwardingCreateParams creates a new SecurityLogForwardingCreateParams 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 NewSecurityLogForwardingCreateParams() *SecurityLogForwardingCreateParams {
return &SecurityLogForwardingCreateParams{
timeout: cr.DefaultTimeout,
}
}
// NewSecurityLogForwardingCreateParamsWithTimeout creates a new SecurityLogForwardingCreateParams object
// with the ability to set a timeout on a request.
func NewSecurityLogForwardingCreateParamsWithTimeout(timeout time.Duration) *SecurityLogForwardingCreateParams {
return &SecurityLogForwardingCreateParams{
timeout: timeout,
}
}
// NewSecurityLogForwardingCreateParamsWithContext creates a new SecurityLogForwardingCreateParams object
// with the ability to set a context for a request.
func NewSecurityLogForwardingCreateParamsWithContext(ctx context.Context) *SecurityLogForwardingCreateParams {
return &SecurityLogForwardingCreateParams{
Context: ctx,
}
}
// NewSecurityLogForwardingCreateParamsWithHTTPClient creates a new SecurityLogForwardingCreateParams object
// with the ability to set a custom HTTPClient for a request.
func NewSecurityLogForwardingCreateParamsWithHTTPClient(client *http.Client) *SecurityLogForwardingCreateParams {
return &SecurityLogForwardingCreateParams{
HTTPClient: client,
}
}
/*
SecurityLogForwardingCreateParams contains all the parameters to send to the API endpoint
for the security log forwarding create operation.
Typically these are written to a http.Request.
*/
type SecurityLogForwardingCreateParams struct {
/* Force.
Skip the Connectivity Test
*/
Force *bool
/* Info.
Remote syslog/splunk server information
*/
Info *models.SecurityAuditLogForward
/* 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 security log forwarding create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityLogForwardingCreateParams) WithDefaults() *SecurityLogForwardingCreateParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the security log forwarding create params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityLogForwardingCreateParams) SetDefaults() {
var (
forceDefault = bool(false)
returnRecordsDefault = bool(false)
returnTimeoutDefault = int64(0)
)
val := SecurityLogForwardingCreateParams{
Force: &forceDefault,
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithTimeout(timeout time.Duration) *SecurityLogForwardingCreateParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithContext(ctx context.Context) *SecurityLogForwardingCreateParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithHTTPClient(client *http.Client) *SecurityLogForwardingCreateParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithForce adds the force to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithForce(force *bool) *SecurityLogForwardingCreateParams {
o.SetForce(force)
return o
}
// SetForce adds the force to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetForce(force *bool) {
o.Force = force
}
// WithInfo adds the info to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithInfo(info *models.SecurityAuditLogForward) *SecurityLogForwardingCreateParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetInfo(info *models.SecurityAuditLogForward) {
o.Info = info
}
// WithReturnRecords adds the returnRecords to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithReturnRecords(returnRecords *bool) *SecurityLogForwardingCreateParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) WithReturnTimeout(returnTimeout *int64) *SecurityLogForwardingCreateParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the security log forwarding create params
func (o *SecurityLogForwardingCreateParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WriteToRequest writes these params to a swagger request
func (o *SecurityLogForwardingCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Force != nil {
// query param force
var qrForce bool
if o.Force != nil {
qrForce = *o.Force
}
qForce := swag.FormatBool(qrForce)
if qForce != "" {
if err := r.SetQueryParam("force", qForce); err != nil {
return err
}
}
}
if o.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/security/security_key_manager_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_key_manager_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityKeyManagerDeleteReader is a Reader for the SecurityKeyManagerDelete structure.
type SecurityKeyManagerDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityKeyManagerDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSecurityKeyManagerDeleteOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityKeyManagerDeleteDefault(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
}
}
// NewSecurityKeyManagerDeleteOK creates a SecurityKeyManagerDeleteOK with default headers values
func NewSecurityKeyManagerDeleteOK() *SecurityKeyManagerDeleteOK {
return &SecurityKeyManagerDeleteOK{}
}
/*
SecurityKeyManagerDeleteOK describes a response with status code 200, with default header values.
OK
*/
type SecurityKeyManagerDeleteOK struct {
}
// IsSuccess returns true when this security key manager delete o k response has a 2xx status code
func (o *SecurityKeyManagerDeleteOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security key manager delete o k response has a 3xx status code
func (o *SecurityKeyManagerDeleteOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this security key manager delete o k response has a 4xx status code
func (o *SecurityKeyManagerDeleteOK) IsClientError() bool {
return false
}
// IsServerError returns true when this security key manager delete o k response has a 5xx status code
func (o *SecurityKeyManagerDeleteOK) IsServerError() bool {
return false
}
// IsCode returns true when this security key manager delete o k response a status code equal to that given
func (o *SecurityKeyManagerDeleteOK) IsCode(code int) bool {
return code == 200
}
func (o *SecurityKeyManagerDeleteOK) Error() string {
return fmt.Sprintf("[DELETE /security/key-managers/{uuid}][%d] securityKeyManagerDeleteOK ", 200)
}
func (o *SecurityKeyManagerDeleteOK) String() string {
return fmt.Sprintf("[DELETE /security/key-managers/{uuid}][%d] securityKeyManagerDeleteOK ", 200)
}
func (o *SecurityKeyManagerDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewSecurityKeyManagerDeleteDefault creates a SecurityKeyManagerDeleteDefault with default headers values
func NewSecurityKeyManagerDeleteDefault(code int) *SecurityKeyManagerDeleteDefault {
return &SecurityKeyManagerDeleteDefault{
_statusCode: code,
}
}
/*
SecurityKeyManagerDeleteDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 65536208 | Failed to delete the SVM Key ID. |
| 65536233 | Internal error. Deletion of km_wrapped_kdb key database has failed for the Onboard Key Manager. |
| 65536234 | Internal error. Deletion of cluster_kdb key database has failed for the Onboard Key Manager. |
| 65536239 | Encrypted volumes are found for the SVM. |
| 65536242 | One or more self-encrypting drives are assigned an authentication key. |
| 65536243 | Cannot determine authentication key presence on one or more self-encrypting drives. |
| 65536800 | Failed to lookup onboard keys. |
| 65536813 | Encrypted kernel core files found. |
| 65536817 | Failed to determine if key manager is safe to disable. |
| 65536822 | Multitenant key management is not supported in the current cluster version. |
| 65536827 | Failed to determine if the SVM has any encrypted volumes. |
| 65536828 | External key management is not enabled for the SVM. |
| 65536867 | Encrypted volumes are found for the SVM. |
| 196608301 | Failed to determine the type of encryption. |
| 196608305 | NAE aggregates are found in the cluster. |
*/
type SecurityKeyManagerDeleteDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security key manager delete default response
func (o *SecurityKeyManagerDeleteDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security key manager delete default response has a 2xx status code
func (o *SecurityKeyManagerDeleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security key manager delete default response has a 3xx status code
func (o *SecurityKeyManagerDeleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security key manager delete default response has a 4xx status code
func (o *SecurityKeyManagerDeleteDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security key manager delete default response has a 5xx status code
func (o *SecurityKeyManagerDeleteDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security key manager delete default response a status code equal to that given
func (o *SecurityKeyManagerDeleteDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityKeyManagerDeleteDefault) Error() string {
return fmt.Sprintf("[DELETE /security/key-managers/{uuid}][%d] security_key_manager_delete default %+v", o._statusCode, o.Payload)
}
func (o *SecurityKeyManagerDeleteDefault) String() string {
return fmt.Sprintf("[DELETE /security/key-managers/{uuid}][%d] security_key_manager_delete default %+v", o._statusCode, o.Payload)
}
func (o *SecurityKeyManagerDeleteDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityKeyManagerDeleteDefault) 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/security/multi_admin_verify_request_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_request_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// MultiAdminVerifyRequestCollectionGetReader is a Reader for the MultiAdminVerifyRequestCollectionGet structure.
type MultiAdminVerifyRequestCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *MultiAdminVerifyRequestCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewMultiAdminVerifyRequestCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewMultiAdminVerifyRequestCollectionGetDefault(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
}
}
// NewMultiAdminVerifyRequestCollectionGetOK creates a MultiAdminVerifyRequestCollectionGetOK with default headers values
func NewMultiAdminVerifyRequestCollectionGetOK() *MultiAdminVerifyRequestCollectionGetOK {
return &MultiAdminVerifyRequestCollectionGetOK{}
}
/*
MultiAdminVerifyRequestCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type MultiAdminVerifyRequestCollectionGetOK struct {
Payload *models.MultiAdminVerifyRequestResponse
}
// IsSuccess returns true when this multi admin verify request collection get o k response has a 2xx status code
func (o *MultiAdminVerifyRequestCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this multi admin verify request collection get o k response has a 3xx status code
func (o *MultiAdminVerifyRequestCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this multi admin verify request collection get o k response has a 4xx status code
func (o *MultiAdminVerifyRequestCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this multi admin verify request collection get o k response has a 5xx status code
func (o *MultiAdminVerifyRequestCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this multi admin verify request collection get o k response a status code equal to that given
func (o *MultiAdminVerifyRequestCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *MultiAdminVerifyRequestCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /security/multi-admin-verify/requests][%d] multiAdminVerifyRequestCollectionGetOK %+v", 200, o.Payload)
}
func (o *MultiAdminVerifyRequestCollectionGetOK) String() string {
return fmt.Sprintf("[GET /security/multi-admin-verify/requests][%d] multiAdminVerifyRequestCollectionGetOK %+v", 200, o.Payload)
}
func (o *MultiAdminVerifyRequestCollectionGetOK) GetPayload() *models.MultiAdminVerifyRequestResponse {
return o.Payload
}
func (o *MultiAdminVerifyRequestCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.MultiAdminVerifyRequestResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewMultiAdminVerifyRequestCollectionGetDefault creates a MultiAdminVerifyRequestCollectionGetDefault with default headers values
func NewMultiAdminVerifyRequestCollectionGetDefault(code int) *MultiAdminVerifyRequestCollectionGetDefault {
return &MultiAdminVerifyRequestCollectionGetDefault{
_statusCode: code,
}
}
/*
MultiAdminVerifyRequestCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type MultiAdminVerifyRequestCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the multi admin verify request collection get default response
func (o *MultiAdminVerifyRequestCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this multi admin verify request collection get default response has a 2xx status code
func (o *MultiAdminVerifyRequestCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this multi admin verify request collection get default response has a 3xx status code
func (o *MultiAdminVerifyRequestCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this multi admin verify request collection get default response has a 4xx status code
func (o *MultiAdminVerifyRequestCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this multi admin verify request collection get default response has a 5xx status code
func (o *MultiAdminVerifyRequestCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this multi admin verify request collection get default response a status code equal to that given
func (o *MultiAdminVerifyRequestCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *MultiAdminVerifyRequestCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /security/multi-admin-verify/requests][%d] multi_admin_verify_request_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRequestCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /security/multi-admin-verify/requests][%d] multi_admin_verify_request_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *MultiAdminVerifyRequestCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *MultiAdminVerifyRequestCollectionGetDefault) 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/security/anti_ransomware_suspect_delete_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/anti_ransomware_suspect_delete_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// AntiRansomwareSuspectDeleteReader is a Reader for the AntiRansomwareSuspectDelete structure.
type AntiRansomwareSuspectDeleteReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AntiRansomwareSuspectDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 202:
result := NewAntiRansomwareSuspectDeleteAccepted()
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())
}
}
// NewAntiRansomwareSuspectDeleteAccepted creates a AntiRansomwareSuspectDeleteAccepted with default headers values
func NewAntiRansomwareSuspectDeleteAccepted() *AntiRansomwareSuspectDeleteAccepted {
return &AntiRansomwareSuspectDeleteAccepted{}
}
/*
AntiRansomwareSuspectDeleteAccepted describes a response with status code 202, with default header values.
Accepted
*/
type AntiRansomwareSuspectDeleteAccepted struct {
Payload *models.JobLinkResponse
}
// IsSuccess returns true when this anti ransomware suspect delete accepted response has a 2xx status code
func (o *AntiRansomwareSuspectDeleteAccepted) IsSuccess() bool {
return true
}
// IsRedirect returns true when this anti ransomware suspect delete accepted response has a 3xx status code
func (o *AntiRansomwareSuspectDeleteAccepted) IsRedirect() bool {
return false
}
// IsClientError returns true when this anti ransomware suspect delete accepted response has a 4xx status code
func (o *AntiRansomwareSuspectDeleteAccepted) IsClientError() bool {
return false
}
// IsServerError returns true when this anti ransomware suspect delete accepted response has a 5xx status code
func (o *AntiRansomwareSuspectDeleteAccepted) IsServerError() bool {
return false
}
// IsCode returns true when this anti ransomware suspect delete accepted response a status code equal to that given
func (o *AntiRansomwareSuspectDeleteAccepted) IsCode(code int) bool {
return code == 202
}
func (o *AntiRansomwareSuspectDeleteAccepted) Error() string {
return fmt.Sprintf("[DELETE /security/anti-ransomware/suspects/{volume.uuid}][%d] antiRansomwareSuspectDeleteAccepted %+v", 202, o.Payload)
}
func (o *AntiRansomwareSuspectDeleteAccepted) String() string {
return fmt.Sprintf("[DELETE /security/anti-ransomware/suspects/{volume.uuid}][%d] antiRansomwareSuspectDeleteAccepted %+v", 202, o.Payload)
}
func (o *AntiRansomwareSuspectDeleteAccepted) GetPayload() *models.JobLinkResponse {
return o.Payload
}
func (o *AntiRansomwareSuspectDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.JobLinkResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
kubev2v/forklift | https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/azure_key_vault_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/azure_key_vault_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// AzureKeyVaultGetReader is a Reader for the AzureKeyVaultGet structure.
type AzureKeyVaultGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AzureKeyVaultGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAzureKeyVaultGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewAzureKeyVaultGetDefault(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
}
}
// NewAzureKeyVaultGetOK creates a AzureKeyVaultGetOK with default headers values
func NewAzureKeyVaultGetOK() *AzureKeyVaultGetOK {
return &AzureKeyVaultGetOK{}
}
/*
AzureKeyVaultGetOK describes a response with status code 200, with default header values.
OK
*/
type AzureKeyVaultGetOK struct {
Payload *models.AzureKeyVault
}
// IsSuccess returns true when this azure key vault get o k response has a 2xx status code
func (o *AzureKeyVaultGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this azure key vault get o k response has a 3xx status code
func (o *AzureKeyVaultGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this azure key vault get o k response has a 4xx status code
func (o *AzureKeyVaultGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this azure key vault get o k response has a 5xx status code
func (o *AzureKeyVaultGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this azure key vault get o k response a status code equal to that given
func (o *AzureKeyVaultGetOK) IsCode(code int) bool {
return code == 200
}
func (o *AzureKeyVaultGetOK) Error() string {
return fmt.Sprintf("[GET /security/azure-key-vaults/{uuid}][%d] azureKeyVaultGetOK %+v", 200, o.Payload)
}
func (o *AzureKeyVaultGetOK) String() string {
return fmt.Sprintf("[GET /security/azure-key-vaults/{uuid}][%d] azureKeyVaultGetOK %+v", 200, o.Payload)
}
func (o *AzureKeyVaultGetOK) GetPayload() *models.AzureKeyVault {
return o.Payload
}
func (o *AzureKeyVaultGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.AzureKeyVault)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewAzureKeyVaultGetDefault creates a AzureKeyVaultGetDefault with default headers values
func NewAzureKeyVaultGetDefault(code int) *AzureKeyVaultGetDefault {
return &AzureKeyVaultGetDefault{
_statusCode: code,
}
}
/*
AzureKeyVaultGetDefault describes a response with status code -1, with default header values.
Error
*/
type AzureKeyVaultGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the azure key vault get default response
func (o *AzureKeyVaultGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this azure key vault get default response has a 2xx status code
func (o *AzureKeyVaultGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this azure key vault get default response has a 3xx status code
func (o *AzureKeyVaultGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this azure key vault get default response has a 4xx status code
func (o *AzureKeyVaultGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this azure key vault get default response has a 5xx status code
func (o *AzureKeyVaultGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this azure key vault get default response a status code equal to that given
func (o *AzureKeyVaultGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *AzureKeyVaultGetDefault) Error() string {
return fmt.Sprintf("[GET /security/azure-key-vaults/{uuid}][%d] azure_key_vault_get default %+v", o._statusCode, o.Payload)
}
func (o *AzureKeyVaultGetDefault) String() string {
return fmt.Sprintf("[GET /security/azure-key-vaults/{uuid}][%d] azure_key_vault_get default %+v", o._statusCode, o.Payload)
}
func (o *AzureKeyVaultGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *AzureKeyVaultGetDefault) 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/security/account_password_create_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/account_password_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// AccountPasswordCreateReader is a Reader for the AccountPasswordCreate structure.
type AccountPasswordCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AccountPasswordCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewAccountPasswordCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewAccountPasswordCreateDefault(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
}
}
// NewAccountPasswordCreateCreated creates a AccountPasswordCreateCreated with default headers values
func NewAccountPasswordCreateCreated() *AccountPasswordCreateCreated {
return &AccountPasswordCreateCreated{}
}
/*
AccountPasswordCreateCreated describes a response with status code 201, with default header values.
Created
*/
type AccountPasswordCreateCreated struct {
/* Useful for tracking the resource location
*/
Location string
}
// IsSuccess returns true when this account password create created response has a 2xx status code
func (o *AccountPasswordCreateCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this account password create created response has a 3xx status code
func (o *AccountPasswordCreateCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this account password create created response has a 4xx status code
func (o *AccountPasswordCreateCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this account password create created response has a 5xx status code
func (o *AccountPasswordCreateCreated) IsServerError() bool {
return false
}
// IsCode returns true when this account password create created response a status code equal to that given
func (o *AccountPasswordCreateCreated) IsCode(code int) bool {
return code == 201
}
func (o *AccountPasswordCreateCreated) Error() string {
return fmt.Sprintf("[POST /security/authentication/password][%d] accountPasswordCreateCreated ", 201)
}
func (o *AccountPasswordCreateCreated) String() string {
return fmt.Sprintf("[POST /security/authentication/password][%d] accountPasswordCreateCreated ", 201)
}
func (o *AccountPasswordCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Location
hdrLocation := response.GetHeader("Location")
if hdrLocation != "" {
o.Location = hdrLocation
}
return nil
}
// NewAccountPasswordCreateDefault creates a AccountPasswordCreateDefault with default headers values
func NewAccountPasswordCreateDefault(code int) *AccountPasswordCreateDefault {
return &AccountPasswordCreateDefault{
_statusCode: code,
}
}
/*
AccountPasswordCreateDefault describes a response with status code -1, with default header values.
ONTAP Error Response Codes
| Error Code | Description |
| ---------- | ----------- |
| 7077918 | The password cannot contain the username. |
| 7077919 | The minimum length for new password does not meet the policy. |
| 7077920 | The new password must have both letters and numbers. |
| 7077921 | The minimum number of special characters required do not meet the policy. |
| 7077924 | The new password must be different than last N passwords. |
| 7077925 | The new password must be different to the old password. |
| 7077940 | The password exceeds maximum supported length. |
| 7077941 | Defined password composition exceeds the maximum password length of 128 characters. |
*/
type AccountPasswordCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the account password create default response
func (o *AccountPasswordCreateDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this account password create default response has a 2xx status code
func (o *AccountPasswordCreateDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this account password create default response has a 3xx status code
func (o *AccountPasswordCreateDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this account password create default response has a 4xx status code
func (o *AccountPasswordCreateDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this account password create default response has a 5xx status code
func (o *AccountPasswordCreateDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this account password create default response a status code equal to that given
func (o *AccountPasswordCreateDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *AccountPasswordCreateDefault) Error() string {
return fmt.Sprintf("[POST /security/authentication/password][%d] account_password_create default %+v", o._statusCode, o.Payload)
}
func (o *AccountPasswordCreateDefault) String() string {
return fmt.Sprintf("[POST /security/authentication/password][%d] account_password_create default %+v", o._statusCode, o.Payload)
}
func (o *AccountPasswordCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *AccountPasswordCreateDefault) 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/security/security_audit_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_audit_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityAuditGetReader is a Reader for the SecurityAuditGet structure.
type SecurityAuditGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityAuditGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSecurityAuditGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityAuditGetDefault(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
}
}
// NewSecurityAuditGetOK creates a SecurityAuditGetOK with default headers values
func NewSecurityAuditGetOK() *SecurityAuditGetOK {
return &SecurityAuditGetOK{}
}
/*
SecurityAuditGetOK describes a response with status code 200, with default header values.
OK
*/
type SecurityAuditGetOK struct {
Payload *models.SecurityAudit
}
// IsSuccess returns true when this security audit get o k response has a 2xx status code
func (o *SecurityAuditGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security audit get o k response has a 3xx status code
func (o *SecurityAuditGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this security audit get o k response has a 4xx status code
func (o *SecurityAuditGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this security audit get o k response has a 5xx status code
func (o *SecurityAuditGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this security audit get o k response a status code equal to that given
func (o *SecurityAuditGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SecurityAuditGetOK) Error() string {
return fmt.Sprintf("[GET /security/audit][%d] securityAuditGetOK %+v", 200, o.Payload)
}
func (o *SecurityAuditGetOK) String() string {
return fmt.Sprintf("[GET /security/audit][%d] securityAuditGetOK %+v", 200, o.Payload)
}
func (o *SecurityAuditGetOK) GetPayload() *models.SecurityAudit {
return o.Payload
}
func (o *SecurityAuditGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SecurityAudit)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSecurityAuditGetDefault creates a SecurityAuditGetDefault with default headers values
func NewSecurityAuditGetDefault(code int) *SecurityAuditGetDefault {
return &SecurityAuditGetDefault{
_statusCode: code,
}
}
/*
SecurityAuditGetDefault describes a response with status code -1, with default header values.
Error
*/
type SecurityAuditGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security audit get default response
func (o *SecurityAuditGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security audit get default response has a 2xx status code
func (o *SecurityAuditGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security audit get default response has a 3xx status code
func (o *SecurityAuditGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security audit get default response has a 4xx status code
func (o *SecurityAuditGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security audit get default response has a 5xx status code
func (o *SecurityAuditGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security audit get default response a status code equal to that given
func (o *SecurityAuditGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityAuditGetDefault) Error() string {
return fmt.Sprintf("[GET /security/audit][%d] security_audit_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityAuditGetDefault) String() string {
return fmt.Sprintf("[GET /security/audit][%d] security_audit_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityAuditGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityAuditGetDefault) 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/security/role_privilege_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/role_privilege_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewRolePrivilegeGetParams creates a new RolePrivilegeGetParams 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 NewRolePrivilegeGetParams() *RolePrivilegeGetParams {
return &RolePrivilegeGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewRolePrivilegeGetParamsWithTimeout creates a new RolePrivilegeGetParams object
// with the ability to set a timeout on a request.
func NewRolePrivilegeGetParamsWithTimeout(timeout time.Duration) *RolePrivilegeGetParams {
return &RolePrivilegeGetParams{
timeout: timeout,
}
}
// NewRolePrivilegeGetParamsWithContext creates a new RolePrivilegeGetParams object
// with the ability to set a context for a request.
func NewRolePrivilegeGetParamsWithContext(ctx context.Context) *RolePrivilegeGetParams {
return &RolePrivilegeGetParams{
Context: ctx,
}
}
// NewRolePrivilegeGetParamsWithHTTPClient creates a new RolePrivilegeGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewRolePrivilegeGetParamsWithHTTPClient(client *http.Client) *RolePrivilegeGetParams {
return &RolePrivilegeGetParams{
HTTPClient: client,
}
}
/*
RolePrivilegeGetParams contains all the parameters to send to the API endpoint
for the role privilege get operation.
Typically these are written to a http.Request.
*/
type RolePrivilegeGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Name.
Role name
*/
Name string
/* OwnerUUID.
Role owner UUID
*/
OwnerUUID string
/* Path.
REST API path or command/command directory path
*/
Path string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the role privilege get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RolePrivilegeGetParams) WithDefaults() *RolePrivilegeGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the role privilege get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RolePrivilegeGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the role privilege get params
func (o *RolePrivilegeGetParams) WithTimeout(timeout time.Duration) *RolePrivilegeGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the role privilege get params
func (o *RolePrivilegeGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the role privilege get params
func (o *RolePrivilegeGetParams) WithContext(ctx context.Context) *RolePrivilegeGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the role privilege get params
func (o *RolePrivilegeGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the role privilege get params
func (o *RolePrivilegeGetParams) WithHTTPClient(client *http.Client) *RolePrivilegeGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the role privilege get params
func (o *RolePrivilegeGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the role privilege get params
func (o *RolePrivilegeGetParams) WithFields(fields []string) *RolePrivilegeGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the role privilege get params
func (o *RolePrivilegeGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithName adds the name to the role privilege get params
func (o *RolePrivilegeGetParams) WithName(name string) *RolePrivilegeGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the role privilege get params
func (o *RolePrivilegeGetParams) SetName(name string) {
o.Name = name
}
// WithOwnerUUID adds the ownerUUID to the role privilege get params
func (o *RolePrivilegeGetParams) WithOwnerUUID(ownerUUID string) *RolePrivilegeGetParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the role privilege get params
func (o *RolePrivilegeGetParams) SetOwnerUUID(ownerUUID string) {
o.OwnerUUID = ownerUUID
}
// WithPath adds the path to the role privilege get params
func (o *RolePrivilegeGetParams) WithPath(path string) *RolePrivilegeGetParams {
o.SetPath(path)
return o
}
// SetPath adds the path to the role privilege get params
func (o *RolePrivilegeGetParams) SetPath(path string) {
o.Path = path
}
// WriteToRequest writes these params to a swagger request
func (o *RolePrivilegeGetParams) 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
}
// path param owner.uuid
if err := r.SetPathParam("owner.uuid", o.OwnerUUID); err != nil {
return err
}
// path param path
if err := r.SetPathParam("path", o.Path); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamRolePrivilegeGet binds the parameter fields
func (o *RolePrivilegeGetParams) 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/security/key_manager_keys_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/key_manager_keys_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewKeyManagerKeysGetParams creates a new KeyManagerKeysGetParams 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 NewKeyManagerKeysGetParams() *KeyManagerKeysGetParams {
return &KeyManagerKeysGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewKeyManagerKeysGetParamsWithTimeout creates a new KeyManagerKeysGetParams object
// with the ability to set a timeout on a request.
func NewKeyManagerKeysGetParamsWithTimeout(timeout time.Duration) *KeyManagerKeysGetParams {
return &KeyManagerKeysGetParams{
timeout: timeout,
}
}
// NewKeyManagerKeysGetParamsWithContext creates a new KeyManagerKeysGetParams object
// with the ability to set a context for a request.
func NewKeyManagerKeysGetParamsWithContext(ctx context.Context) *KeyManagerKeysGetParams {
return &KeyManagerKeysGetParams{
Context: ctx,
}
}
// NewKeyManagerKeysGetParamsWithHTTPClient creates a new KeyManagerKeysGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewKeyManagerKeysGetParamsWithHTTPClient(client *http.Client) *KeyManagerKeysGetParams {
return &KeyManagerKeysGetParams{
HTTPClient: client,
}
}
/*
KeyManagerKeysGetParams contains all the parameters to send to the API endpoint
for the key manager keys get operation.
Typically these are written to a http.Request.
*/
type KeyManagerKeysGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* KeyID.
Key identifier.
*/
KeyID string
/* NodeUUID.
Node UUID.
*/
NodeUUID string
/* SecurityKeyManagerUUID.
Key manager UUID.
*/
SecurityKeyManagerUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the key manager keys get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *KeyManagerKeysGetParams) WithDefaults() *KeyManagerKeysGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the key manager keys get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *KeyManagerKeysGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithTimeout(timeout time.Duration) *KeyManagerKeysGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithContext(ctx context.Context) *KeyManagerKeysGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithHTTPClient(client *http.Client) *KeyManagerKeysGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithFields(fields []string) *KeyManagerKeysGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithKeyID adds the keyID to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithKeyID(keyID string) *KeyManagerKeysGetParams {
o.SetKeyID(keyID)
return o
}
// SetKeyID adds the keyId to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetKeyID(keyID string) {
o.KeyID = keyID
}
// WithNodeUUID adds the nodeUUID to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithNodeUUID(nodeUUID string) *KeyManagerKeysGetParams {
o.SetNodeUUID(nodeUUID)
return o
}
// SetNodeUUID adds the nodeUuid to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetNodeUUID(nodeUUID string) {
o.NodeUUID = nodeUUID
}
// WithSecurityKeyManagerUUID adds the securityKeyManagerUUID to the key manager keys get params
func (o *KeyManagerKeysGetParams) WithSecurityKeyManagerUUID(securityKeyManagerUUID string) *KeyManagerKeysGetParams {
o.SetSecurityKeyManagerUUID(securityKeyManagerUUID)
return o
}
// SetSecurityKeyManagerUUID adds the securityKeyManagerUuid to the key manager keys get params
func (o *KeyManagerKeysGetParams) SetSecurityKeyManagerUUID(securityKeyManagerUUID string) {
o.SecurityKeyManagerUUID = securityKeyManagerUUID
}
// WriteToRequest writes these params to a swagger request
func (o *KeyManagerKeysGetParams) 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 key_id
if err := r.SetPathParam("key_id", o.KeyID); err != nil {
return err
}
// path param node.uuid
if err := r.SetPathParam("node.uuid", o.NodeUUID); err != nil {
return err
}
// path param security_key_manager.uuid
if err := r.SetPathParam("security_key_manager.uuid", o.SecurityKeyManagerUUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamKeyManagerKeysGet binds the parameter fields
func (o *KeyManagerKeysGetParams) 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/security/publickey_collection_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/publickey_collection_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// PublickeyCollectionGetReader is a Reader for the PublickeyCollectionGet structure.
type PublickeyCollectionGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PublickeyCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPublickeyCollectionGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPublickeyCollectionGetDefault(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
}
}
// NewPublickeyCollectionGetOK creates a PublickeyCollectionGetOK with default headers values
func NewPublickeyCollectionGetOK() *PublickeyCollectionGetOK {
return &PublickeyCollectionGetOK{}
}
/*
PublickeyCollectionGetOK describes a response with status code 200, with default header values.
OK
*/
type PublickeyCollectionGetOK struct {
Payload *models.PublickeyResponse
}
// IsSuccess returns true when this publickey collection get o k response has a 2xx status code
func (o *PublickeyCollectionGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this publickey collection get o k response has a 3xx status code
func (o *PublickeyCollectionGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this publickey collection get o k response has a 4xx status code
func (o *PublickeyCollectionGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this publickey collection get o k response has a 5xx status code
func (o *PublickeyCollectionGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this publickey collection get o k response a status code equal to that given
func (o *PublickeyCollectionGetOK) IsCode(code int) bool {
return code == 200
}
func (o *PublickeyCollectionGetOK) Error() string {
return fmt.Sprintf("[GET /security/authentication/publickeys][%d] publickeyCollectionGetOK %+v", 200, o.Payload)
}
func (o *PublickeyCollectionGetOK) String() string {
return fmt.Sprintf("[GET /security/authentication/publickeys][%d] publickeyCollectionGetOK %+v", 200, o.Payload)
}
func (o *PublickeyCollectionGetOK) GetPayload() *models.PublickeyResponse {
return o.Payload
}
func (o *PublickeyCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.PublickeyResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPublickeyCollectionGetDefault creates a PublickeyCollectionGetDefault with default headers values
func NewPublickeyCollectionGetDefault(code int) *PublickeyCollectionGetDefault {
return &PublickeyCollectionGetDefault{
_statusCode: code,
}
}
/*
PublickeyCollectionGetDefault describes a response with status code -1, with default header values.
Error
*/
type PublickeyCollectionGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the publickey collection get default response
func (o *PublickeyCollectionGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this publickey collection get default response has a 2xx status code
func (o *PublickeyCollectionGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this publickey collection get default response has a 3xx status code
func (o *PublickeyCollectionGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this publickey collection get default response has a 4xx status code
func (o *PublickeyCollectionGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this publickey collection get default response has a 5xx status code
func (o *PublickeyCollectionGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this publickey collection get default response a status code equal to that given
func (o *PublickeyCollectionGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *PublickeyCollectionGetDefault) Error() string {
return fmt.Sprintf("[GET /security/authentication/publickeys][%d] publickey_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PublickeyCollectionGetDefault) String() string {
return fmt.Sprintf("[GET /security/authentication/publickeys][%d] publickey_collection_get default %+v", o._statusCode, o.Payload)
}
func (o *PublickeyCollectionGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PublickeyCollectionGetDefault) 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/security/security_certificate_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_certificate_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewSecurityCertificateGetParams creates a new SecurityCertificateGetParams 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 NewSecurityCertificateGetParams() *SecurityCertificateGetParams {
return &SecurityCertificateGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewSecurityCertificateGetParamsWithTimeout creates a new SecurityCertificateGetParams object
// with the ability to set a timeout on a request.
func NewSecurityCertificateGetParamsWithTimeout(timeout time.Duration) *SecurityCertificateGetParams {
return &SecurityCertificateGetParams{
timeout: timeout,
}
}
// NewSecurityCertificateGetParamsWithContext creates a new SecurityCertificateGetParams object
// with the ability to set a context for a request.
func NewSecurityCertificateGetParamsWithContext(ctx context.Context) *SecurityCertificateGetParams {
return &SecurityCertificateGetParams{
Context: ctx,
}
}
// NewSecurityCertificateGetParamsWithHTTPClient creates a new SecurityCertificateGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewSecurityCertificateGetParamsWithHTTPClient(client *http.Client) *SecurityCertificateGetParams {
return &SecurityCertificateGetParams{
HTTPClient: client,
}
}
/*
SecurityCertificateGetParams contains all the parameters to send to the API endpoint
for the security certificate get operation.
Typically these are written to a http.Request.
*/
type SecurityCertificateGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* UUID.
Certificate UUID
*/
UUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the security certificate get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityCertificateGetParams) WithDefaults() *SecurityCertificateGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the security certificate get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SecurityCertificateGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the security certificate get params
func (o *SecurityCertificateGetParams) WithTimeout(timeout time.Duration) *SecurityCertificateGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the security certificate get params
func (o *SecurityCertificateGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the security certificate get params
func (o *SecurityCertificateGetParams) WithContext(ctx context.Context) *SecurityCertificateGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the security certificate get params
func (o *SecurityCertificateGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the security certificate get params
func (o *SecurityCertificateGetParams) WithHTTPClient(client *http.Client) *SecurityCertificateGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the security certificate get params
func (o *SecurityCertificateGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the security certificate get params
func (o *SecurityCertificateGetParams) WithFields(fields []string) *SecurityCertificateGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the security certificate get params
func (o *SecurityCertificateGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithUUID adds the uuid to the security certificate get params
func (o *SecurityCertificateGetParams) WithUUID(uuid string) *SecurityCertificateGetParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the security certificate get params
func (o *SecurityCertificateGetParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WriteToRequest writes these params to a swagger request
func (o *SecurityCertificateGetParams) 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
}
// bindParamSecurityCertificateGet binds the parameter fields
func (o *SecurityCertificateGetParams) 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/security/security_key_manager_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_key_manager_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityKeyManagerGetReader is a Reader for the SecurityKeyManagerGet structure.
type SecurityKeyManagerGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityKeyManagerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSecurityKeyManagerGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityKeyManagerGetDefault(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
}
}
// NewSecurityKeyManagerGetOK creates a SecurityKeyManagerGetOK with default headers values
func NewSecurityKeyManagerGetOK() *SecurityKeyManagerGetOK {
return &SecurityKeyManagerGetOK{}
}
/*
SecurityKeyManagerGetOK describes a response with status code 200, with default header values.
OK
*/
type SecurityKeyManagerGetOK struct {
Payload *models.SecurityKeyManager
}
// IsSuccess returns true when this security key manager get o k response has a 2xx status code
func (o *SecurityKeyManagerGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security key manager get o k response has a 3xx status code
func (o *SecurityKeyManagerGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this security key manager get o k response has a 4xx status code
func (o *SecurityKeyManagerGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this security key manager get o k response has a 5xx status code
func (o *SecurityKeyManagerGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this security key manager get o k response a status code equal to that given
func (o *SecurityKeyManagerGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SecurityKeyManagerGetOK) Error() string {
return fmt.Sprintf("[GET /security/key-managers/{uuid}][%d] securityKeyManagerGetOK %+v", 200, o.Payload)
}
func (o *SecurityKeyManagerGetOK) String() string {
return fmt.Sprintf("[GET /security/key-managers/{uuid}][%d] securityKeyManagerGetOK %+v", 200, o.Payload)
}
func (o *SecurityKeyManagerGetOK) GetPayload() *models.SecurityKeyManager {
return o.Payload
}
func (o *SecurityKeyManagerGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SecurityKeyManager)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSecurityKeyManagerGetDefault creates a SecurityKeyManagerGetDefault with default headers values
func NewSecurityKeyManagerGetDefault(code int) *SecurityKeyManagerGetDefault {
return &SecurityKeyManagerGetDefault{
_statusCode: code,
}
}
/*
SecurityKeyManagerGetDefault describes a response with status code -1, with default header values.
Error
*/
type SecurityKeyManagerGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security key manager get default response
func (o *SecurityKeyManagerGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security key manager get default response has a 2xx status code
func (o *SecurityKeyManagerGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security key manager get default response has a 3xx status code
func (o *SecurityKeyManagerGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security key manager get default response has a 4xx status code
func (o *SecurityKeyManagerGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security key manager get default response has a 5xx status code
func (o *SecurityKeyManagerGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security key manager get default response a status code equal to that given
func (o *SecurityKeyManagerGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityKeyManagerGetDefault) Error() string {
return fmt.Sprintf("[GET /security/key-managers/{uuid}][%d] security_key_manager_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityKeyManagerGetDefault) String() string {
return fmt.Sprintf("[GET /security/key-managers/{uuid}][%d] security_key_manager_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityKeyManagerGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityKeyManagerGetDefault) 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/security/role_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/role_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewRoleGetParams creates a new RoleGetParams 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 NewRoleGetParams() *RoleGetParams {
return &RoleGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewRoleGetParamsWithTimeout creates a new RoleGetParams object
// with the ability to set a timeout on a request.
func NewRoleGetParamsWithTimeout(timeout time.Duration) *RoleGetParams {
return &RoleGetParams{
timeout: timeout,
}
}
// NewRoleGetParamsWithContext creates a new RoleGetParams object
// with the ability to set a context for a request.
func NewRoleGetParamsWithContext(ctx context.Context) *RoleGetParams {
return &RoleGetParams{
Context: ctx,
}
}
// NewRoleGetParamsWithHTTPClient creates a new RoleGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewRoleGetParamsWithHTTPClient(client *http.Client) *RoleGetParams {
return &RoleGetParams{
HTTPClient: client,
}
}
/*
RoleGetParams contains all the parameters to send to the API endpoint
for the role get operation.
Typically these are written to a http.Request.
*/
type RoleGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Name.
Role name
*/
Name string
/* OwnerUUID.
Role owner UUID
*/
OwnerUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the role get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RoleGetParams) WithDefaults() *RoleGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the role get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RoleGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the role get params
func (o *RoleGetParams) WithTimeout(timeout time.Duration) *RoleGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the role get params
func (o *RoleGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the role get params
func (o *RoleGetParams) WithContext(ctx context.Context) *RoleGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the role get params
func (o *RoleGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the role get params
func (o *RoleGetParams) WithHTTPClient(client *http.Client) *RoleGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the role get params
func (o *RoleGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the role get params
func (o *RoleGetParams) WithFields(fields []string) *RoleGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the role get params
func (o *RoleGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithName adds the name to the role get params
func (o *RoleGetParams) WithName(name string) *RoleGetParams {
o.SetName(name)
return o
}
// SetName adds the name to the role get params
func (o *RoleGetParams) SetName(name string) {
o.Name = name
}
// WithOwnerUUID adds the ownerUUID to the role get params
func (o *RoleGetParams) WithOwnerUUID(ownerUUID string) *RoleGetParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the role get params
func (o *RoleGetParams) SetOwnerUUID(ownerUUID string) {
o.OwnerUUID = ownerUUID
}
// WriteToRequest writes these params to a swagger request
func (o *RoleGetParams) 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
}
// path param owner.uuid
if err := r.SetPathParam("owner.uuid", o.OwnerUUID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamRoleGet binds the parameter fields
func (o *RoleGetParams) 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/security/publickey_collection_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/publickey_collection_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewPublickeyCollectionGetParams creates a new PublickeyCollectionGetParams 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 NewPublickeyCollectionGetParams() *PublickeyCollectionGetParams {
return &PublickeyCollectionGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewPublickeyCollectionGetParamsWithTimeout creates a new PublickeyCollectionGetParams object
// with the ability to set a timeout on a request.
func NewPublickeyCollectionGetParamsWithTimeout(timeout time.Duration) *PublickeyCollectionGetParams {
return &PublickeyCollectionGetParams{
timeout: timeout,
}
}
// NewPublickeyCollectionGetParamsWithContext creates a new PublickeyCollectionGetParams object
// with the ability to set a context for a request.
func NewPublickeyCollectionGetParamsWithContext(ctx context.Context) *PublickeyCollectionGetParams {
return &PublickeyCollectionGetParams{
Context: ctx,
}
}
// NewPublickeyCollectionGetParamsWithHTTPClient creates a new PublickeyCollectionGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewPublickeyCollectionGetParamsWithHTTPClient(client *http.Client) *PublickeyCollectionGetParams {
return &PublickeyCollectionGetParams{
HTTPClient: client,
}
}
/*
PublickeyCollectionGetParams contains all the parameters to send to the API endpoint
for the publickey collection get operation.
Typically these are written to a http.Request.
*/
type PublickeyCollectionGetParams struct {
/* AccountName.
Filter by account.name
*/
AccountName *string
/* Comment.
Filter by comment
*/
Comment *string
/* Fields.
Specify the fields to return.
*/
Fields []string
/* Index.
Filter by index
*/
Index *int64
/* MaxRecords.
Limit the number of records returned.
*/
MaxRecords *int64
/* ObfuscatedFingerprint.
Filter by obfuscated_fingerprint
*/
ObfuscatedFingerprint *string
/* OrderBy.
Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending.
*/
OrderBy []string
/* OwnerName.
Filter by owner.name
*/
OwnerName *string
/* OwnerUUID.
Filter by owner.uuid
*/
OwnerUUID *string
/* PublicKey.
Filter by public_key
*/
PublicKey *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
/* ShaFingerprint.
Filter by sha_fingerprint
*/
ShaFingerprint *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the publickey collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PublickeyCollectionGetParams) WithDefaults() *PublickeyCollectionGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the publickey collection get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PublickeyCollectionGetParams) SetDefaults() {
var (
returnRecordsDefault = bool(true)
returnTimeoutDefault = int64(15)
)
val := PublickeyCollectionGetParams{
ReturnRecords: &returnRecordsDefault,
ReturnTimeout: &returnTimeoutDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithTimeout(timeout time.Duration) *PublickeyCollectionGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithContext(ctx context.Context) *PublickeyCollectionGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithHTTPClient(client *http.Client) *PublickeyCollectionGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAccountName adds the accountName to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithAccountName(accountName *string) *PublickeyCollectionGetParams {
o.SetAccountName(accountName)
return o
}
// SetAccountName adds the accountName to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetAccountName(accountName *string) {
o.AccountName = accountName
}
// WithComment adds the comment to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithComment(comment *string) *PublickeyCollectionGetParams {
o.SetComment(comment)
return o
}
// SetComment adds the comment to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetComment(comment *string) {
o.Comment = comment
}
// WithFields adds the fields to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithFields(fields []string) *PublickeyCollectionGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIndex adds the index to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithIndex(index *int64) *PublickeyCollectionGetParams {
o.SetIndex(index)
return o
}
// SetIndex adds the index to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetIndex(index *int64) {
o.Index = index
}
// WithMaxRecords adds the maxRecords to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithMaxRecords(maxRecords *int64) *PublickeyCollectionGetParams {
o.SetMaxRecords(maxRecords)
return o
}
// SetMaxRecords adds the maxRecords to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetMaxRecords(maxRecords *int64) {
o.MaxRecords = maxRecords
}
// WithObfuscatedFingerprint adds the obfuscatedFingerprint to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithObfuscatedFingerprint(obfuscatedFingerprint *string) *PublickeyCollectionGetParams {
o.SetObfuscatedFingerprint(obfuscatedFingerprint)
return o
}
// SetObfuscatedFingerprint adds the obfuscatedFingerprint to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetObfuscatedFingerprint(obfuscatedFingerprint *string) {
o.ObfuscatedFingerprint = obfuscatedFingerprint
}
// WithOrderBy adds the orderBy to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithOrderBy(orderBy []string) *PublickeyCollectionGetParams {
o.SetOrderBy(orderBy)
return o
}
// SetOrderBy adds the orderBy to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetOrderBy(orderBy []string) {
o.OrderBy = orderBy
}
// WithOwnerName adds the ownerName to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithOwnerName(ownerName *string) *PublickeyCollectionGetParams {
o.SetOwnerName(ownerName)
return o
}
// SetOwnerName adds the ownerName to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetOwnerName(ownerName *string) {
o.OwnerName = ownerName
}
// WithOwnerUUID adds the ownerUUID to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithOwnerUUID(ownerUUID *string) *PublickeyCollectionGetParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetOwnerUUID(ownerUUID *string) {
o.OwnerUUID = ownerUUID
}
// WithPublicKey adds the publicKey to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithPublicKey(publicKey *string) *PublickeyCollectionGetParams {
o.SetPublicKey(publicKey)
return o
}
// SetPublicKey adds the publicKey to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetPublicKey(publicKey *string) {
o.PublicKey = publicKey
}
// WithReturnRecords adds the returnRecords to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithReturnRecords(returnRecords *bool) *PublickeyCollectionGetParams {
o.SetReturnRecords(returnRecords)
return o
}
// SetReturnRecords adds the returnRecords to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetReturnRecords(returnRecords *bool) {
o.ReturnRecords = returnRecords
}
// WithReturnTimeout adds the returnTimeout to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *PublickeyCollectionGetParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithScope adds the scope to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithScope(scope *string) *PublickeyCollectionGetParams {
o.SetScope(scope)
return o
}
// SetScope adds the scope to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetScope(scope *string) {
o.Scope = scope
}
// WithShaFingerprint adds the shaFingerprint to the publickey collection get params
func (o *PublickeyCollectionGetParams) WithShaFingerprint(shaFingerprint *string) *PublickeyCollectionGetParams {
o.SetShaFingerprint(shaFingerprint)
return o
}
// SetShaFingerprint adds the shaFingerprint to the publickey collection get params
func (o *PublickeyCollectionGetParams) SetShaFingerprint(shaFingerprint *string) {
o.ShaFingerprint = shaFingerprint
}
// WriteToRequest writes these params to a swagger request
func (o *PublickeyCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AccountName != nil {
// query param account.name
var qrAccountName string
if o.AccountName != nil {
qrAccountName = *o.AccountName
}
qAccountName := qrAccountName
if qAccountName != "" {
if err := r.SetQueryParam("account.name", qAccountName); err != nil {
return err
}
}
}
if o.Comment != nil {
// query param comment
var qrComment string
if o.Comment != nil {
qrComment = *o.Comment
}
qComment := qrComment
if qComment != "" {
if err := r.SetQueryParam("comment", qComment); err != nil {
return err
}
}
}
if o.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.Index != nil {
// query param index
var qrIndex int64
if o.Index != nil {
qrIndex = *o.Index
}
qIndex := swag.FormatInt64(qrIndex)
if qIndex != "" {
if err := r.SetQueryParam("index", qIndex); 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.ObfuscatedFingerprint != nil {
// query param obfuscated_fingerprint
var qrObfuscatedFingerprint string
if o.ObfuscatedFingerprint != nil {
qrObfuscatedFingerprint = *o.ObfuscatedFingerprint
}
qObfuscatedFingerprint := qrObfuscatedFingerprint
if qObfuscatedFingerprint != "" {
if err := r.SetQueryParam("obfuscated_fingerprint", qObfuscatedFingerprint); 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.OwnerName != nil {
// query param owner.name
var qrOwnerName string
if o.OwnerName != nil {
qrOwnerName = *o.OwnerName
}
qOwnerName := qrOwnerName
if qOwnerName != "" {
if err := r.SetQueryParam("owner.name", qOwnerName); err != nil {
return err
}
}
}
if o.OwnerUUID != nil {
// query param owner.uuid
var qrOwnerUUID string
if o.OwnerUUID != nil {
qrOwnerUUID = *o.OwnerUUID
}
qOwnerUUID := qrOwnerUUID
if qOwnerUUID != "" {
if err := r.SetQueryParam("owner.uuid", qOwnerUUID); err != nil {
return err
}
}
}
if o.PublicKey != nil {
// query param public_key
var qrPublicKey string
if o.PublicKey != nil {
qrPublicKey = *o.PublicKey
}
qPublicKey := qrPublicKey
if qPublicKey != "" {
if err := r.SetQueryParam("public_key", qPublicKey); 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.Scope != nil {
// query param scope
var qrScope string
if o.Scope != nil {
qrScope = *o.Scope
}
qScope := qrScope
if qScope != "" {
if err := r.SetQueryParam("scope", qScope); err != nil {
return err
}
}
}
if o.ShaFingerprint != nil {
// query param sha_fingerprint
var qrShaFingerprint string
if o.ShaFingerprint != nil {
qrShaFingerprint = *o.ShaFingerprint
}
qShaFingerprint := qrShaFingerprint
if qShaFingerprint != "" {
if err := r.SetQueryParam("sha_fingerprint", qShaFingerprint); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamPublickeyCollectionGet binds the parameter fields
func (o *PublickeyCollectionGetParams) 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
}
// bindParamPublickeyCollectionGet binds the parameter order_by
func (o *PublickeyCollectionGetParams) 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/security/security_certificate_get_responses.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/security_certificate_get_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// SecurityCertificateGetReader is a Reader for the SecurityCertificateGet structure.
type SecurityCertificateGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *SecurityCertificateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewSecurityCertificateGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewSecurityCertificateGetDefault(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
}
}
// NewSecurityCertificateGetOK creates a SecurityCertificateGetOK with default headers values
func NewSecurityCertificateGetOK() *SecurityCertificateGetOK {
return &SecurityCertificateGetOK{}
}
/*
SecurityCertificateGetOK describes a response with status code 200, with default header values.
OK
*/
type SecurityCertificateGetOK struct {
Payload *models.SecurityCertificate
}
// IsSuccess returns true when this security certificate get o k response has a 2xx status code
func (o *SecurityCertificateGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this security certificate get o k response has a 3xx status code
func (o *SecurityCertificateGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this security certificate get o k response has a 4xx status code
func (o *SecurityCertificateGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this security certificate get o k response has a 5xx status code
func (o *SecurityCertificateGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this security certificate get o k response a status code equal to that given
func (o *SecurityCertificateGetOK) IsCode(code int) bool {
return code == 200
}
func (o *SecurityCertificateGetOK) Error() string {
return fmt.Sprintf("[GET /security/certificates/{uuid}][%d] securityCertificateGetOK %+v", 200, o.Payload)
}
func (o *SecurityCertificateGetOK) String() string {
return fmt.Sprintf("[GET /security/certificates/{uuid}][%d] securityCertificateGetOK %+v", 200, o.Payload)
}
func (o *SecurityCertificateGetOK) GetPayload() *models.SecurityCertificate {
return o.Payload
}
func (o *SecurityCertificateGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.SecurityCertificate)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewSecurityCertificateGetDefault creates a SecurityCertificateGetDefault with default headers values
func NewSecurityCertificateGetDefault(code int) *SecurityCertificateGetDefault {
return &SecurityCertificateGetDefault{
_statusCode: code,
}
}
/*
SecurityCertificateGetDefault describes a response with status code -1, with default header values.
Error
*/
type SecurityCertificateGetDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the security certificate get default response
func (o *SecurityCertificateGetDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this security certificate get default response has a 2xx status code
func (o *SecurityCertificateGetDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this security certificate get default response has a 3xx status code
func (o *SecurityCertificateGetDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this security certificate get default response has a 4xx status code
func (o *SecurityCertificateGetDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this security certificate get default response has a 5xx status code
func (o *SecurityCertificateGetDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this security certificate get default response a status code equal to that given
func (o *SecurityCertificateGetDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *SecurityCertificateGetDefault) Error() string {
return fmt.Sprintf("[GET /security/certificates/{uuid}][%d] security_certificate_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityCertificateGetDefault) String() string {
return fmt.Sprintf("[GET /security/certificates/{uuid}][%d] security_certificate_get default %+v", o._statusCode, o.Payload)
}
func (o *SecurityCertificateGetDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *SecurityCertificateGetDefault) 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/security/multi_admin_verify_request_get_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_request_get_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewMultiAdminVerifyRequestGetParams creates a new MultiAdminVerifyRequestGetParams 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 NewMultiAdminVerifyRequestGetParams() *MultiAdminVerifyRequestGetParams {
return &MultiAdminVerifyRequestGetParams{
timeout: cr.DefaultTimeout,
}
}
// NewMultiAdminVerifyRequestGetParamsWithTimeout creates a new MultiAdminVerifyRequestGetParams object
// with the ability to set a timeout on a request.
func NewMultiAdminVerifyRequestGetParamsWithTimeout(timeout time.Duration) *MultiAdminVerifyRequestGetParams {
return &MultiAdminVerifyRequestGetParams{
timeout: timeout,
}
}
// NewMultiAdminVerifyRequestGetParamsWithContext creates a new MultiAdminVerifyRequestGetParams object
// with the ability to set a context for a request.
func NewMultiAdminVerifyRequestGetParamsWithContext(ctx context.Context) *MultiAdminVerifyRequestGetParams {
return &MultiAdminVerifyRequestGetParams{
Context: ctx,
}
}
// NewMultiAdminVerifyRequestGetParamsWithHTTPClient creates a new MultiAdminVerifyRequestGetParams object
// with the ability to set a custom HTTPClient for a request.
func NewMultiAdminVerifyRequestGetParamsWithHTTPClient(client *http.Client) *MultiAdminVerifyRequestGetParams {
return &MultiAdminVerifyRequestGetParams{
HTTPClient: client,
}
}
/*
MultiAdminVerifyRequestGetParams contains all the parameters to send to the API endpoint
for the multi admin verify request get operation.
Typically these are written to a http.Request.
*/
type MultiAdminVerifyRequestGetParams struct {
/* Fields.
Specify the fields to return.
*/
Fields []string
// Index.
Index string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the multi admin verify request get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MultiAdminVerifyRequestGetParams) WithDefaults() *MultiAdminVerifyRequestGetParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the multi admin verify request get params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MultiAdminVerifyRequestGetParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) WithTimeout(timeout time.Duration) *MultiAdminVerifyRequestGetParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) WithContext(ctx context.Context) *MultiAdminVerifyRequestGetParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) WithHTTPClient(client *http.Client) *MultiAdminVerifyRequestGetParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFields adds the fields to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) WithFields(fields []string) *MultiAdminVerifyRequestGetParams {
o.SetFields(fields)
return o
}
// SetFields adds the fields to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) SetFields(fields []string) {
o.Fields = fields
}
// WithIndex adds the index to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) WithIndex(index string) *MultiAdminVerifyRequestGetParams {
o.SetIndex(index)
return o
}
// SetIndex adds the index to the multi admin verify request get params
func (o *MultiAdminVerifyRequestGetParams) SetIndex(index string) {
o.Index = index
}
// WriteToRequest writes these params to a swagger request
func (o *MultiAdminVerifyRequestGetParams) 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 index
if err := r.SetPathParam("index", o.Index); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindParamMultiAdminVerifyRequestGet binds the parameter fields
func (o *MultiAdminVerifyRequestGetParams) 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/security/multi_admin_verify_rule_delete_parameters.go | cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/security/multi_admin_verify_rule_delete_parameters.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// 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"
)
// NewMultiAdminVerifyRuleDeleteParams creates a new MultiAdminVerifyRuleDeleteParams 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 NewMultiAdminVerifyRuleDeleteParams() *MultiAdminVerifyRuleDeleteParams {
return &MultiAdminVerifyRuleDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewMultiAdminVerifyRuleDeleteParamsWithTimeout creates a new MultiAdminVerifyRuleDeleteParams object
// with the ability to set a timeout on a request.
func NewMultiAdminVerifyRuleDeleteParamsWithTimeout(timeout time.Duration) *MultiAdminVerifyRuleDeleteParams {
return &MultiAdminVerifyRuleDeleteParams{
timeout: timeout,
}
}
// NewMultiAdminVerifyRuleDeleteParamsWithContext creates a new MultiAdminVerifyRuleDeleteParams object
// with the ability to set a context for a request.
func NewMultiAdminVerifyRuleDeleteParamsWithContext(ctx context.Context) *MultiAdminVerifyRuleDeleteParams {
return &MultiAdminVerifyRuleDeleteParams{
Context: ctx,
}
}
// NewMultiAdminVerifyRuleDeleteParamsWithHTTPClient creates a new MultiAdminVerifyRuleDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewMultiAdminVerifyRuleDeleteParamsWithHTTPClient(client *http.Client) *MultiAdminVerifyRuleDeleteParams {
return &MultiAdminVerifyRuleDeleteParams{
HTTPClient: client,
}
}
/*
MultiAdminVerifyRuleDeleteParams contains all the parameters to send to the API endpoint
for the multi admin verify rule delete operation.
Typically these are written to a http.Request.
*/
type MultiAdminVerifyRuleDeleteParams struct {
// Operation.
Operation string
// OwnerUUID.
OwnerUUID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the multi admin verify rule delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MultiAdminVerifyRuleDeleteParams) WithDefaults() *MultiAdminVerifyRuleDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the multi admin verify rule delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *MultiAdminVerifyRuleDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) WithTimeout(timeout time.Duration) *MultiAdminVerifyRuleDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) WithContext(ctx context.Context) *MultiAdminVerifyRuleDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) WithHTTPClient(client *http.Client) *MultiAdminVerifyRuleDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithOperation adds the operation to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) WithOperation(operation string) *MultiAdminVerifyRuleDeleteParams {
o.SetOperation(operation)
return o
}
// SetOperation adds the operation to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) SetOperation(operation string) {
o.Operation = operation
}
// WithOwnerUUID adds the ownerUUID to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) WithOwnerUUID(ownerUUID string) *MultiAdminVerifyRuleDeleteParams {
o.SetOwnerUUID(ownerUUID)
return o
}
// SetOwnerUUID adds the ownerUuid to the multi admin verify rule delete params
func (o *MultiAdminVerifyRuleDeleteParams) SetOwnerUUID(ownerUUID string) {
o.OwnerUUID = ownerUUID
}
// WriteToRequest writes these params to a swagger request
func (o *MultiAdminVerifyRuleDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param operation
if err := r.SetPathParam("operation", o.Operation); err != nil {
return err
}
// path param owner.uuid
if err := r.SetPathParam("owner.uuid", o.OwnerUUID); 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.