github.com/digitalocean/go-netbox@v0.0.2/netbox/client/virtualization/virtualization_virtual_machines_bulk_delete_parameters.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright 2020 The go-netbox Authors.
     4  //
     5  // Licensed under the Apache License, Version 2.0 (the "License");
     6  // you may not use this file except in compliance with the License.
     7  // You may obtain a copy of the License at
     8  //
     9  //   http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS,
    13  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  // See the License for the specific language governing permissions and
    15  // limitations under the License.
    16  //
    17  
    18  package virtualization
    19  
    20  // This file was generated by the swagger tool.
    21  // Editing this file might prove futile when you re-run the swagger generate command
    22  
    23  import (
    24  	"context"
    25  	"net/http"
    26  	"time"
    27  
    28  	"github.com/go-openapi/errors"
    29  	"github.com/go-openapi/runtime"
    30  	cr "github.com/go-openapi/runtime/client"
    31  	"github.com/go-openapi/strfmt"
    32  )
    33  
    34  // NewVirtualizationVirtualMachinesBulkDeleteParams creates a new VirtualizationVirtualMachinesBulkDeleteParams object,
    35  // with the default timeout for this client.
    36  //
    37  // Default values are not hydrated, since defaults are normally applied by the API server side.
    38  //
    39  // To enforce default values in parameter, use SetDefaults or WithDefaults.
    40  func NewVirtualizationVirtualMachinesBulkDeleteParams() *VirtualizationVirtualMachinesBulkDeleteParams {
    41  	return &VirtualizationVirtualMachinesBulkDeleteParams{
    42  		timeout: cr.DefaultTimeout,
    43  	}
    44  }
    45  
    46  // NewVirtualizationVirtualMachinesBulkDeleteParamsWithTimeout creates a new VirtualizationVirtualMachinesBulkDeleteParams object
    47  // with the ability to set a timeout on a request.
    48  func NewVirtualizationVirtualMachinesBulkDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesBulkDeleteParams {
    49  	return &VirtualizationVirtualMachinesBulkDeleteParams{
    50  		timeout: timeout,
    51  	}
    52  }
    53  
    54  // NewVirtualizationVirtualMachinesBulkDeleteParamsWithContext creates a new VirtualizationVirtualMachinesBulkDeleteParams object
    55  // with the ability to set a context for a request.
    56  func NewVirtualizationVirtualMachinesBulkDeleteParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesBulkDeleteParams {
    57  	return &VirtualizationVirtualMachinesBulkDeleteParams{
    58  		Context: ctx,
    59  	}
    60  }
    61  
    62  // NewVirtualizationVirtualMachinesBulkDeleteParamsWithHTTPClient creates a new VirtualizationVirtualMachinesBulkDeleteParams object
    63  // with the ability to set a custom HTTPClient for a request.
    64  func NewVirtualizationVirtualMachinesBulkDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesBulkDeleteParams {
    65  	return &VirtualizationVirtualMachinesBulkDeleteParams{
    66  		HTTPClient: client,
    67  	}
    68  }
    69  
    70  /* VirtualizationVirtualMachinesBulkDeleteParams contains all the parameters to send to the API endpoint
    71     for the virtualization virtual machines bulk delete operation.
    72  
    73     Typically these are written to a http.Request.
    74  */
    75  type VirtualizationVirtualMachinesBulkDeleteParams struct {
    76  	timeout    time.Duration
    77  	Context    context.Context
    78  	HTTPClient *http.Client
    79  }
    80  
    81  // WithDefaults hydrates default values in the virtualization virtual machines bulk delete params (not the query body).
    82  //
    83  // All values with no default are reset to their zero value.
    84  func (o *VirtualizationVirtualMachinesBulkDeleteParams) WithDefaults() *VirtualizationVirtualMachinesBulkDeleteParams {
    85  	o.SetDefaults()
    86  	return o
    87  }
    88  
    89  // SetDefaults hydrates default values in the virtualization virtual machines bulk delete params (not the query body).
    90  //
    91  // All values with no default are reset to their zero value.
    92  func (o *VirtualizationVirtualMachinesBulkDeleteParams) SetDefaults() {
    93  	// no default values defined for this parameter
    94  }
    95  
    96  // WithTimeout adds the timeout to the virtualization virtual machines bulk delete params
    97  func (o *VirtualizationVirtualMachinesBulkDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesBulkDeleteParams {
    98  	o.SetTimeout(timeout)
    99  	return o
   100  }
   101  
   102  // SetTimeout adds the timeout to the virtualization virtual machines bulk delete params
   103  func (o *VirtualizationVirtualMachinesBulkDeleteParams) SetTimeout(timeout time.Duration) {
   104  	o.timeout = timeout
   105  }
   106  
   107  // WithContext adds the context to the virtualization virtual machines bulk delete params
   108  func (o *VirtualizationVirtualMachinesBulkDeleteParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesBulkDeleteParams {
   109  	o.SetContext(ctx)
   110  	return o
   111  }
   112  
   113  // SetContext adds the context to the virtualization virtual machines bulk delete params
   114  func (o *VirtualizationVirtualMachinesBulkDeleteParams) SetContext(ctx context.Context) {
   115  	o.Context = ctx
   116  }
   117  
   118  // WithHTTPClient adds the HTTPClient to the virtualization virtual machines bulk delete params
   119  func (o *VirtualizationVirtualMachinesBulkDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesBulkDeleteParams {
   120  	o.SetHTTPClient(client)
   121  	return o
   122  }
   123  
   124  // SetHTTPClient adds the HTTPClient to the virtualization virtual machines bulk delete params
   125  func (o *VirtualizationVirtualMachinesBulkDeleteParams) SetHTTPClient(client *http.Client) {
   126  	o.HTTPClient = client
   127  }
   128  
   129  // WriteToRequest writes these params to a swagger request
   130  func (o *VirtualizationVirtualMachinesBulkDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
   131  
   132  	if err := r.SetTimeout(o.timeout); err != nil {
   133  		return err
   134  	}
   135  	var res []error
   136  
   137  	if len(res) > 0 {
   138  		return errors.CompositeValidationError(res...)
   139  	}
   140  	return nil
   141  }