blob: 1b6a820097561c84b1b1f8ca570e72162a45d7b2 [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// NewSecretsGetSessionKeyCreateParams creates a new SecretsGetSessionKeyCreateParams object
36// with the default values initialized.
37func NewSecretsGetSessionKeyCreateParams() *SecretsGetSessionKeyCreateParams {
38
39 return &SecretsGetSessionKeyCreateParams{
40
41 timeout: cr.DefaultTimeout,
42 }
43}
44
45// NewSecretsGetSessionKeyCreateParamsWithTimeout creates a new SecretsGetSessionKeyCreateParams object
46// with the default values initialized, and the ability to set a timeout on a request
47func NewSecretsGetSessionKeyCreateParamsWithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams {
48
49 return &SecretsGetSessionKeyCreateParams{
50
51 timeout: timeout,
52 }
53}
54
55// NewSecretsGetSessionKeyCreateParamsWithContext creates a new SecretsGetSessionKeyCreateParams object
56// with the default values initialized, and the ability to set a context for a request
57func NewSecretsGetSessionKeyCreateParamsWithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams {
58
59 return &SecretsGetSessionKeyCreateParams{
60
61 Context: ctx,
62 }
63}
64
65// NewSecretsGetSessionKeyCreateParamsWithHTTPClient creates a new SecretsGetSessionKeyCreateParams object
66// with the default values initialized, and the ability to set a custom HTTPClient for a request
67func NewSecretsGetSessionKeyCreateParamsWithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams {
68
69 return &SecretsGetSessionKeyCreateParams{
70 HTTPClient: client,
71 }
72}
73
74/*SecretsGetSessionKeyCreateParams contains all the parameters to send to the API endpoint
75for the secrets get session key create operation typically these are written to a http.Request
76*/
77type SecretsGetSessionKeyCreateParams struct {
78 timeout time.Duration
79 Context context.Context
80 HTTPClient *http.Client
81}
82
83// WithTimeout adds the timeout to the secrets get session key create params
84func (o *SecretsGetSessionKeyCreateParams) WithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams {
85 o.SetTimeout(timeout)
86 return o
87}
88
89// SetTimeout adds the timeout to the secrets get session key create params
90func (o *SecretsGetSessionKeyCreateParams) SetTimeout(timeout time.Duration) {
91 o.timeout = timeout
92}
93
94// WithContext adds the context to the secrets get session key create params
95func (o *SecretsGetSessionKeyCreateParams) WithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams {
96 o.SetContext(ctx)
97 return o
98}
99
100// SetContext adds the context to the secrets get session key create params
101func (o *SecretsGetSessionKeyCreateParams) SetContext(ctx context.Context) {
102 o.Context = ctx
103}
104
105// WithHTTPClient adds the HTTPClient to the secrets get session key create params
106func (o *SecretsGetSessionKeyCreateParams) WithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams {
107 o.SetHTTPClient(client)
108 return o
109}
110
111// SetHTTPClient adds the HTTPClient to the secrets get session key create params
112func (o *SecretsGetSessionKeyCreateParams) SetHTTPClient(client *http.Client) {
113 o.HTTPClient = client
114}
115
116// WriteToRequest writes these params to a swagger request
117func (o *SecretsGetSessionKeyCreateParams) 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}