blob: 9c2378f97de6cba05d90a69075cc3a9399ef592a [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
32 strfmt "github.com/go-openapi/strfmt"
33)
34
35// NewIPAMChoicesListParams creates a new IPAMChoicesListParams object
36// with the default values initialized.
37func NewIPAMChoicesListParams() *IPAMChoicesListParams {
38
39 return &IPAMChoicesListParams{
40
41 timeout: cr.DefaultTimeout,
42 }
43}
44
45// NewIPAMChoicesListParamsWithTimeout creates a new IPAMChoicesListParams object
46// with the default values initialized, and the ability to set a timeout on a request
47func NewIPAMChoicesListParamsWithTimeout(timeout time.Duration) *IPAMChoicesListParams {
48
49 return &IPAMChoicesListParams{
50
51 timeout: timeout,
52 }
53}
54
55// NewIPAMChoicesListParamsWithContext creates a new IPAMChoicesListParams object
56// with the default values initialized, and the ability to set a context for a request
57func NewIPAMChoicesListParamsWithContext(ctx context.Context) *IPAMChoicesListParams {
58
59 return &IPAMChoicesListParams{
60
61 Context: ctx,
62 }
63}
64
65// NewIPAMChoicesListParamsWithHTTPClient creates a new IPAMChoicesListParams object
66// with the default values initialized, and the ability to set a custom HTTPClient for a request
67func NewIPAMChoicesListParamsWithHTTPClient(client *http.Client) *IPAMChoicesListParams {
68
69 return &IPAMChoicesListParams{
70 HTTPClient: client,
71 }
72}
73
74/*IPAMChoicesListParams contains all the parameters to send to the API endpoint
75for the ipam choices list operation typically these are written to a http.Request
76*/
77type IPAMChoicesListParams struct {
78 timeout time.Duration
79 Context context.Context
80 HTTPClient *http.Client
81}
82
83// WithTimeout adds the timeout to the ipam choices list params
84func (o *IPAMChoicesListParams) WithTimeout(timeout time.Duration) *IPAMChoicesListParams {
85 o.SetTimeout(timeout)
86 return o
87}
88
89// SetTimeout adds the timeout to the ipam choices list params
90func (o *IPAMChoicesListParams) SetTimeout(timeout time.Duration) {
91 o.timeout = timeout
92}
93
94// WithContext adds the context to the ipam choices list params
95func (o *IPAMChoicesListParams) WithContext(ctx context.Context) *IPAMChoicesListParams {
96 o.SetContext(ctx)
97 return o
98}
99
100// SetContext adds the context to the ipam choices list params
101func (o *IPAMChoicesListParams) SetContext(ctx context.Context) {
102 o.Context = ctx
103}
104
105// WithHTTPClient adds the HTTPClient to the ipam choices list params
106func (o *IPAMChoicesListParams) WithHTTPClient(client *http.Client) *IPAMChoicesListParams {
107 o.SetHTTPClient(client)
108 return o
109}
110
111// SetHTTPClient adds the HTTPClient to the ipam choices list params
112func (o *IPAMChoicesListParams) SetHTTPClient(client *http.Client) {
113 o.HTTPClient = client
114}
115
116// WriteToRequest writes these params to a swagger request
117func (o *IPAMChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
118
119 if err := r.SetTimeout(o.timeout); err != nil {
120 return err
121 }
122 var res []error
123
124 if len(res) > 0 {
125 return errors.CompositeValidationError(res...)
126 }
127 return nil
128}