github.com/digitalocean/go-netbox@v0.0.2/netbox/client/plugins/plugins_ip_reservations_related_ip_v6_read_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 plugins 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 // NewPluginsIPReservationsRelatedIPV6ReadParams creates a new PluginsIPReservationsRelatedIPV6ReadParams 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 NewPluginsIPReservationsRelatedIPV6ReadParams() *PluginsIPReservationsRelatedIPV6ReadParams { 41 return &PluginsIPReservationsRelatedIPV6ReadParams{ 42 timeout: cr.DefaultTimeout, 43 } 44 } 45 46 // NewPluginsIPReservationsRelatedIPV6ReadParamsWithTimeout creates a new PluginsIPReservationsRelatedIPV6ReadParams object 47 // with the ability to set a timeout on a request. 48 func NewPluginsIPReservationsRelatedIPV6ReadParamsWithTimeout(timeout time.Duration) *PluginsIPReservationsRelatedIPV6ReadParams { 49 return &PluginsIPReservationsRelatedIPV6ReadParams{ 50 timeout: timeout, 51 } 52 } 53 54 // NewPluginsIPReservationsRelatedIPV6ReadParamsWithContext creates a new PluginsIPReservationsRelatedIPV6ReadParams object 55 // with the ability to set a context for a request. 56 func NewPluginsIPReservationsRelatedIPV6ReadParamsWithContext(ctx context.Context) *PluginsIPReservationsRelatedIPV6ReadParams { 57 return &PluginsIPReservationsRelatedIPV6ReadParams{ 58 Context: ctx, 59 } 60 } 61 62 // NewPluginsIPReservationsRelatedIPV6ReadParamsWithHTTPClient creates a new PluginsIPReservationsRelatedIPV6ReadParams object 63 // with the ability to set a custom HTTPClient for a request. 64 func NewPluginsIPReservationsRelatedIPV6ReadParamsWithHTTPClient(client *http.Client) *PluginsIPReservationsRelatedIPV6ReadParams { 65 return &PluginsIPReservationsRelatedIPV6ReadParams{ 66 HTTPClient: client, 67 } 68 } 69 70 /* PluginsIPReservationsRelatedIPV6ReadParams contains all the parameters to send to the API endpoint 71 for the plugins ip reservations related ipv6 read operation. 72 73 Typically these are written to a http.Request. 74 */ 75 type PluginsIPReservationsRelatedIPV6ReadParams struct { 76 77 // ID. 78 ID string 79 80 timeout time.Duration 81 Context context.Context 82 HTTPClient *http.Client 83 } 84 85 // WithDefaults hydrates default values in the plugins ip reservations related ipv6 read params (not the query body). 86 // 87 // All values with no default are reset to their zero value. 88 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithDefaults() *PluginsIPReservationsRelatedIPV6ReadParams { 89 o.SetDefaults() 90 return o 91 } 92 93 // SetDefaults hydrates default values in the plugins ip reservations related ipv6 read params (not the query body). 94 // 95 // All values with no default are reset to their zero value. 96 func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetDefaults() { 97 // no default values defined for this parameter 98 } 99 100 // WithTimeout adds the timeout to the plugins ip reservations related ipv6 read params 101 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithTimeout(timeout time.Duration) *PluginsIPReservationsRelatedIPV6ReadParams { 102 o.SetTimeout(timeout) 103 return o 104 } 105 106 // SetTimeout adds the timeout to the plugins ip reservations related ipv6 read params 107 func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetTimeout(timeout time.Duration) { 108 o.timeout = timeout 109 } 110 111 // WithContext adds the context to the plugins ip reservations related ipv6 read params 112 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithContext(ctx context.Context) *PluginsIPReservationsRelatedIPV6ReadParams { 113 o.SetContext(ctx) 114 return o 115 } 116 117 // SetContext adds the context to the plugins ip reservations related ipv6 read params 118 func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetContext(ctx context.Context) { 119 o.Context = ctx 120 } 121 122 // WithHTTPClient adds the HTTPClient to the plugins ip reservations related ipv6 read params 123 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithHTTPClient(client *http.Client) *PluginsIPReservationsRelatedIPV6ReadParams { 124 o.SetHTTPClient(client) 125 return o 126 } 127 128 // SetHTTPClient adds the HTTPClient to the plugins ip reservations related ipv6 read params 129 func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetHTTPClient(client *http.Client) { 130 o.HTTPClient = client 131 } 132 133 // WithID adds the id to the plugins ip reservations related ipv6 read params 134 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WithID(id string) *PluginsIPReservationsRelatedIPV6ReadParams { 135 o.SetID(id) 136 return o 137 } 138 139 // SetID adds the id to the plugins ip reservations related ipv6 read params 140 func (o *PluginsIPReservationsRelatedIPV6ReadParams) SetID(id string) { 141 o.ID = id 142 } 143 144 // WriteToRequest writes these params to a swagger request 145 func (o *PluginsIPReservationsRelatedIPV6ReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { 146 147 if err := r.SetTimeout(o.timeout); err != nil { 148 return err 149 } 150 var res []error 151 152 // path param id 153 if err := r.SetPathParam("id", o.ID); err != nil { 154 return err 155 } 156 157 if len(res) > 0 { 158 return errors.CompositeValidationError(res...) 159 } 160 return nil 161 }