blob: 69b3c7b75a1205e1f4a50531e3e6f131db057e40 [file] [log] [blame]
Serge Bazanskicc25bdf2018-10-25 14:02:58 +02001// Code generated by go-swagger; DO NOT EDIT.
2
3// Copyright 2018 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
17package ipam
18
19// This file was generated by the swagger tool.
20// Editing this file might prove futile when you re-run the swagger generate command
21
22import (
23 "net/http"
24 "time"
25
26 "golang.org/x/net/context"
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/swag"
32
33 strfmt "github.com/go-openapi/strfmt"
34
35 "github.com/digitalocean/go-netbox/netbox/models"
36)
37
38// NewIPAMVlanGroupsPartialUpdateParams creates a new IPAMVlanGroupsPartialUpdateParams object
39// with the default values initialized.
40func NewIPAMVlanGroupsPartialUpdateParams() *IPAMVlanGroupsPartialUpdateParams {
41 var ()
42 return &IPAMVlanGroupsPartialUpdateParams{
43
44 timeout: cr.DefaultTimeout,
45 }
46}
47
48// NewIPAMVlanGroupsPartialUpdateParamsWithTimeout creates a new IPAMVlanGroupsPartialUpdateParams object
49// with the default values initialized, and the ability to set a timeout on a request
50func NewIPAMVlanGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams {
51 var ()
52 return &IPAMVlanGroupsPartialUpdateParams{
53
54 timeout: timeout,
55 }
56}
57
58// NewIPAMVlanGroupsPartialUpdateParamsWithContext creates a new IPAMVlanGroupsPartialUpdateParams object
59// with the default values initialized, and the ability to set a context for a request
60func NewIPAMVlanGroupsPartialUpdateParamsWithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams {
61 var ()
62 return &IPAMVlanGroupsPartialUpdateParams{
63
64 Context: ctx,
65 }
66}
67
68// NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient creates a new IPAMVlanGroupsPartialUpdateParams object
69// with the default values initialized, and the ability to set a custom HTTPClient for a request
70func NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams {
71 var ()
72 return &IPAMVlanGroupsPartialUpdateParams{
73 HTTPClient: client,
74 }
75}
76
77/*IPAMVlanGroupsPartialUpdateParams contains all the parameters to send to the API endpoint
78for the ipam vlan groups partial update operation typically these are written to a http.Request
79*/
80type IPAMVlanGroupsPartialUpdateParams struct {
81
82 /*Data*/
83 Data *models.WritableVLANGroup
84 /*ID
85 A unique integer value identifying this VLAN group.
86
87 */
88 ID int64
89
90 timeout time.Duration
91 Context context.Context
92 HTTPClient *http.Client
93}
94
95// WithTimeout adds the timeout to the ipam vlan groups partial update params
96func (o *IPAMVlanGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams {
97 o.SetTimeout(timeout)
98 return o
99}
100
101// SetTimeout adds the timeout to the ipam vlan groups partial update params
102func (o *IPAMVlanGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) {
103 o.timeout = timeout
104}
105
106// WithContext adds the context to the ipam vlan groups partial update params
107func (o *IPAMVlanGroupsPartialUpdateParams) WithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams {
108 o.SetContext(ctx)
109 return o
110}
111
112// SetContext adds the context to the ipam vlan groups partial update params
113func (o *IPAMVlanGroupsPartialUpdateParams) SetContext(ctx context.Context) {
114 o.Context = ctx
115}
116
117// WithHTTPClient adds the HTTPClient to the ipam vlan groups partial update params
118func (o *IPAMVlanGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams {
119 o.SetHTTPClient(client)
120 return o
121}
122
123// SetHTTPClient adds the HTTPClient to the ipam vlan groups partial update params
124func (o *IPAMVlanGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) {
125 o.HTTPClient = client
126}
127
128// WithData adds the data to the ipam vlan groups partial update params
129func (o *IPAMVlanGroupsPartialUpdateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsPartialUpdateParams {
130 o.SetData(data)
131 return o
132}
133
134// SetData adds the data to the ipam vlan groups partial update params
135func (o *IPAMVlanGroupsPartialUpdateParams) SetData(data *models.WritableVLANGroup) {
136 o.Data = data
137}
138
139// WithID adds the id to the ipam vlan groups partial update params
140func (o *IPAMVlanGroupsPartialUpdateParams) WithID(id int64) *IPAMVlanGroupsPartialUpdateParams {
141 o.SetID(id)
142 return o
143}
144
145// SetID adds the id to the ipam vlan groups partial update params
146func (o *IPAMVlanGroupsPartialUpdateParams) SetID(id int64) {
147 o.ID = id
148}
149
150// WriteToRequest writes these params to a swagger request
151func (o *IPAMVlanGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
152
153 if err := r.SetTimeout(o.timeout); err != nil {
154 return err
155 }
156 var res []error
157
158 if o.Data != nil {
159 if err := r.SetBodyParam(o.Data); err != nil {
160 return err
161 }
162 }
163
164 // path param id
165 if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
166 return err
167 }
168
169 if len(res) > 0 {
170 return errors.CompositeValidationError(res...)
171 }
172 return nil
173}