blob: 2524a3be637bc6984f97fc9d138eb11121ba3e7e [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 dcim
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
32 strfmt "github.com/go-openapi/strfmt"
33)
34
35// NewDcimConnectedDeviceListParams creates a new DcimConnectedDeviceListParams object
36// with the default values initialized.
37func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams {
38 var ()
39 return &DcimConnectedDeviceListParams{
40
41 timeout: cr.DefaultTimeout,
42 }
43}
44
45// NewDcimConnectedDeviceListParamsWithTimeout creates a new DcimConnectedDeviceListParams object
46// with the default values initialized, and the ability to set a timeout on a request
47func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams {
48 var ()
49 return &DcimConnectedDeviceListParams{
50
51 timeout: timeout,
52 }
53}
54
55// NewDcimConnectedDeviceListParamsWithContext creates a new DcimConnectedDeviceListParams object
56// with the default values initialized, and the ability to set a context for a request
57func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConnectedDeviceListParams {
58 var ()
59 return &DcimConnectedDeviceListParams{
60
61 Context: ctx,
62 }
63}
64
65// NewDcimConnectedDeviceListParamsWithHTTPClient creates a new DcimConnectedDeviceListParams object
66// with the default values initialized, and the ability to set a custom HTTPClient for a request
67func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams {
68 var ()
69 return &DcimConnectedDeviceListParams{
70 HTTPClient: client,
71 }
72}
73
74/*DcimConnectedDeviceListParams contains all the parameters to send to the API endpoint
75for the dcim connected device list operation typically these are written to a http.Request
76*/
77type DcimConnectedDeviceListParams struct {
78
79 /*PeerDevice
80 The name of the peer device
81
82 */
83 PeerDevice string
84 /*PeerInterface
85 The name of the peer interface
86
87 */
88 PeerInterface string
89
90 timeout time.Duration
91 Context context.Context
92 HTTPClient *http.Client
93}
94
95// WithTimeout adds the timeout to the dcim connected device list params
96func (o *DcimConnectedDeviceListParams) WithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams {
97 o.SetTimeout(timeout)
98 return o
99}
100
101// SetTimeout adds the timeout to the dcim connected device list params
102func (o *DcimConnectedDeviceListParams) SetTimeout(timeout time.Duration) {
103 o.timeout = timeout
104}
105
106// WithContext adds the context to the dcim connected device list params
107func (o *DcimConnectedDeviceListParams) WithContext(ctx context.Context) *DcimConnectedDeviceListParams {
108 o.SetContext(ctx)
109 return o
110}
111
112// SetContext adds the context to the dcim connected device list params
113func (o *DcimConnectedDeviceListParams) SetContext(ctx context.Context) {
114 o.Context = ctx
115}
116
117// WithHTTPClient adds the HTTPClient to the dcim connected device list params
118func (o *DcimConnectedDeviceListParams) WithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams {
119 o.SetHTTPClient(client)
120 return o
121}
122
123// SetHTTPClient adds the HTTPClient to the dcim connected device list params
124func (o *DcimConnectedDeviceListParams) SetHTTPClient(client *http.Client) {
125 o.HTTPClient = client
126}
127
128// WithPeerDevice adds the peerDevice to the dcim connected device list params
129func (o *DcimConnectedDeviceListParams) WithPeerDevice(peerDevice string) *DcimConnectedDeviceListParams {
130 o.SetPeerDevice(peerDevice)
131 return o
132}
133
134// SetPeerDevice adds the peerDevice to the dcim connected device list params
135func (o *DcimConnectedDeviceListParams) SetPeerDevice(peerDevice string) {
136 o.PeerDevice = peerDevice
137}
138
139// WithPeerInterface adds the peerInterface to the dcim connected device list params
140func (o *DcimConnectedDeviceListParams) WithPeerInterface(peerInterface string) *DcimConnectedDeviceListParams {
141 o.SetPeerInterface(peerInterface)
142 return o
143}
144
145// SetPeerInterface adds the peerInterface to the dcim connected device list params
146func (o *DcimConnectedDeviceListParams) SetPeerInterface(peerInterface string) {
147 o.PeerInterface = peerInterface
148}
149
150// WriteToRequest writes these params to a swagger request
151func (o *DcimConnectedDeviceListParams) 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 // query param peer-device
159 qrPeerDevice := o.PeerDevice
160 qPeerDevice := qrPeerDevice
161 if qPeerDevice != "" {
162 if err := r.SetQueryParam("peer-device", qPeerDevice); err != nil {
163 return err
164 }
165 }
166
167 // query param peer-interface
168 qrPeerInterface := o.PeerInterface
169 qPeerInterface := qrPeerInterface
170 if qPeerInterface != "" {
171 if err := r.SetQueryParam("peer-interface", qPeerInterface); err != nil {
172 return err
173 }
174 }
175
176 if len(res) > 0 {
177 return errors.CompositeValidationError(res...)
178 }
179 return nil
180}