blob: 9f8e92d12ab7ebef8334ebba0a5911cad380e5e0 [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 secrets
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// NewSecretsChoicesReadParams creates a new SecretsChoicesReadParams object
36// with the default values initialized.
37func NewSecretsChoicesReadParams() *SecretsChoicesReadParams {
38 var ()
39 return &SecretsChoicesReadParams{
40
41 timeout: cr.DefaultTimeout,
42 }
43}
44
45// NewSecretsChoicesReadParamsWithTimeout creates a new SecretsChoicesReadParams object
46// with the default values initialized, and the ability to set a timeout on a request
47func NewSecretsChoicesReadParamsWithTimeout(timeout time.Duration) *SecretsChoicesReadParams {
48 var ()
49 return &SecretsChoicesReadParams{
50
51 timeout: timeout,
52 }
53}
54
55// NewSecretsChoicesReadParamsWithContext creates a new SecretsChoicesReadParams object
56// with the default values initialized, and the ability to set a context for a request
57func NewSecretsChoicesReadParamsWithContext(ctx context.Context) *SecretsChoicesReadParams {
58 var ()
59 return &SecretsChoicesReadParams{
60
61 Context: ctx,
62 }
63}
64
65// NewSecretsChoicesReadParamsWithHTTPClient creates a new SecretsChoicesReadParams object
66// with the default values initialized, and the ability to set a custom HTTPClient for a request
67func NewSecretsChoicesReadParamsWithHTTPClient(client *http.Client) *SecretsChoicesReadParams {
68 var ()
69 return &SecretsChoicesReadParams{
70 HTTPClient: client,
71 }
72}
73
74/*SecretsChoicesReadParams contains all the parameters to send to the API endpoint
75for the secrets choices read operation typically these are written to a http.Request
76*/
77type SecretsChoicesReadParams struct {
78
79 /*ID*/
80 ID string
81
82 timeout time.Duration
83 Context context.Context
84 HTTPClient *http.Client
85}
86
87// WithTimeout adds the timeout to the secrets choices read params
88func (o *SecretsChoicesReadParams) WithTimeout(timeout time.Duration) *SecretsChoicesReadParams {
89 o.SetTimeout(timeout)
90 return o
91}
92
93// SetTimeout adds the timeout to the secrets choices read params
94func (o *SecretsChoicesReadParams) SetTimeout(timeout time.Duration) {
95 o.timeout = timeout
96}
97
98// WithContext adds the context to the secrets choices read params
99func (o *SecretsChoicesReadParams) WithContext(ctx context.Context) *SecretsChoicesReadParams {
100 o.SetContext(ctx)
101 return o
102}
103
104// SetContext adds the context to the secrets choices read params
105func (o *SecretsChoicesReadParams) SetContext(ctx context.Context) {
106 o.Context = ctx
107}
108
109// WithHTTPClient adds the HTTPClient to the secrets choices read params
110func (o *SecretsChoicesReadParams) WithHTTPClient(client *http.Client) *SecretsChoicesReadParams {
111 o.SetHTTPClient(client)
112 return o
113}
114
115// SetHTTPClient adds the HTTPClient to the secrets choices read params
116func (o *SecretsChoicesReadParams) SetHTTPClient(client *http.Client) {
117 o.HTTPClient = client
118}
119
120// WithID adds the id to the secrets choices read params
121func (o *SecretsChoicesReadParams) WithID(id string) *SecretsChoicesReadParams {
122 o.SetID(id)
123 return o
124}
125
126// SetID adds the id to the secrets choices read params
127func (o *SecretsChoicesReadParams) SetID(id string) {
128 o.ID = id
129}
130
131// WriteToRequest writes these params to a swagger request
132func (o *SecretsChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
133
134 if err := r.SetTimeout(o.timeout); err != nil {
135 return err
136 }
137 var res []error
138
139 // path param id
140 if err := r.SetPathParam("id", o.ID); err != nil {
141 return err
142 }
143
144 if len(res) > 0 {
145 return errors.CompositeValidationError(res...)
146 }
147 return nil
148}