github.com/digitalocean/go-netbox@v0.0.2/netbox/client/dcim/dcim_sites_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 dcim 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 // NewDcimSitesBulkDeleteParams creates a new DcimSitesBulkDeleteParams 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 NewDcimSitesBulkDeleteParams() *DcimSitesBulkDeleteParams { 41 return &DcimSitesBulkDeleteParams{ 42 timeout: cr.DefaultTimeout, 43 } 44 } 45 46 // NewDcimSitesBulkDeleteParamsWithTimeout creates a new DcimSitesBulkDeleteParams object 47 // with the ability to set a timeout on a request. 48 func NewDcimSitesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimSitesBulkDeleteParams { 49 return &DcimSitesBulkDeleteParams{ 50 timeout: timeout, 51 } 52 } 53 54 // NewDcimSitesBulkDeleteParamsWithContext creates a new DcimSitesBulkDeleteParams object 55 // with the ability to set a context for a request. 56 func NewDcimSitesBulkDeleteParamsWithContext(ctx context.Context) *DcimSitesBulkDeleteParams { 57 return &DcimSitesBulkDeleteParams{ 58 Context: ctx, 59 } 60 } 61 62 // NewDcimSitesBulkDeleteParamsWithHTTPClient creates a new DcimSitesBulkDeleteParams object 63 // with the ability to set a custom HTTPClient for a request. 64 func NewDcimSitesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimSitesBulkDeleteParams { 65 return &DcimSitesBulkDeleteParams{ 66 HTTPClient: client, 67 } 68 } 69 70 /* DcimSitesBulkDeleteParams contains all the parameters to send to the API endpoint 71 for the dcim sites bulk delete operation. 72 73 Typically these are written to a http.Request. 74 */ 75 type DcimSitesBulkDeleteParams struct { 76 timeout time.Duration 77 Context context.Context 78 HTTPClient *http.Client 79 } 80 81 // WithDefaults hydrates default values in the dcim sites bulk delete params (not the query body). 82 // 83 // All values with no default are reset to their zero value. 84 func (o *DcimSitesBulkDeleteParams) WithDefaults() *DcimSitesBulkDeleteParams { 85 o.SetDefaults() 86 return o 87 } 88 89 // SetDefaults hydrates default values in the dcim sites bulk delete params (not the query body). 90 // 91 // All values with no default are reset to their zero value. 92 func (o *DcimSitesBulkDeleteParams) SetDefaults() { 93 // no default values defined for this parameter 94 } 95 96 // WithTimeout adds the timeout to the dcim sites bulk delete params 97 func (o *DcimSitesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimSitesBulkDeleteParams { 98 o.SetTimeout(timeout) 99 return o 100 } 101 102 // SetTimeout adds the timeout to the dcim sites bulk delete params 103 func (o *DcimSitesBulkDeleteParams) SetTimeout(timeout time.Duration) { 104 o.timeout = timeout 105 } 106 107 // WithContext adds the context to the dcim sites bulk delete params 108 func (o *DcimSitesBulkDeleteParams) WithContext(ctx context.Context) *DcimSitesBulkDeleteParams { 109 o.SetContext(ctx) 110 return o 111 } 112 113 // SetContext adds the context to the dcim sites bulk delete params 114 func (o *DcimSitesBulkDeleteParams) SetContext(ctx context.Context) { 115 o.Context = ctx 116 } 117 118 // WithHTTPClient adds the HTTPClient to the dcim sites bulk delete params 119 func (o *DcimSitesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimSitesBulkDeleteParams { 120 o.SetHTTPClient(client) 121 return o 122 } 123 124 // SetHTTPClient adds the HTTPClient to the dcim sites bulk delete params 125 func (o *DcimSitesBulkDeleteParams) SetHTTPClient(client *http.Client) { 126 o.HTTPClient = client 127 } 128 129 // WriteToRequest writes these params to a swagger request 130 func (o *DcimSitesBulkDeleteParams) 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 }