blob: 558cdde7480b1b217de8a984a1ecaceccbdd10c6 [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 extras
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// NewExtrasExportTemplatesPartialUpdateParams creates a new ExtrasExportTemplatesPartialUpdateParams object
39// with the default values initialized.
40func NewExtrasExportTemplatesPartialUpdateParams() *ExtrasExportTemplatesPartialUpdateParams {
41 var ()
42 return &ExtrasExportTemplatesPartialUpdateParams{
43
44 timeout: cr.DefaultTimeout,
45 }
46}
47
48// NewExtrasExportTemplatesPartialUpdateParamsWithTimeout creates a new ExtrasExportTemplatesPartialUpdateParams object
49// with the default values initialized, and the ability to set a timeout on a request
50func NewExtrasExportTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesPartialUpdateParams {
51 var ()
52 return &ExtrasExportTemplatesPartialUpdateParams{
53
54 timeout: timeout,
55 }
56}
57
58// NewExtrasExportTemplatesPartialUpdateParamsWithContext creates a new ExtrasExportTemplatesPartialUpdateParams object
59// with the default values initialized, and the ability to set a context for a request
60func NewExtrasExportTemplatesPartialUpdateParamsWithContext(ctx context.Context) *ExtrasExportTemplatesPartialUpdateParams {
61 var ()
62 return &ExtrasExportTemplatesPartialUpdateParams{
63
64 Context: ctx,
65 }
66}
67
68// NewExtrasExportTemplatesPartialUpdateParamsWithHTTPClient creates a new ExtrasExportTemplatesPartialUpdateParams object
69// with the default values initialized, and the ability to set a custom HTTPClient for a request
70func NewExtrasExportTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesPartialUpdateParams {
71 var ()
72 return &ExtrasExportTemplatesPartialUpdateParams{
73 HTTPClient: client,
74 }
75}
76
77/*ExtrasExportTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
78for the extras export templates partial update operation typically these are written to a http.Request
79*/
80type ExtrasExportTemplatesPartialUpdateParams struct {
81
82 /*Data*/
83 Data *models.ExportTemplate
84 /*ID
85 A unique integer value identifying this export template.
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 extras export templates partial update params
96func (o *ExtrasExportTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesPartialUpdateParams {
97 o.SetTimeout(timeout)
98 return o
99}
100
101// SetTimeout adds the timeout to the extras export templates partial update params
102func (o *ExtrasExportTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
103 o.timeout = timeout
104}
105
106// WithContext adds the context to the extras export templates partial update params
107func (o *ExtrasExportTemplatesPartialUpdateParams) WithContext(ctx context.Context) *ExtrasExportTemplatesPartialUpdateParams {
108 o.SetContext(ctx)
109 return o
110}
111
112// SetContext adds the context to the extras export templates partial update params
113func (o *ExtrasExportTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
114 o.Context = ctx
115}
116
117// WithHTTPClient adds the HTTPClient to the extras export templates partial update params
118func (o *ExtrasExportTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesPartialUpdateParams {
119 o.SetHTTPClient(client)
120 return o
121}
122
123// SetHTTPClient adds the HTTPClient to the extras export templates partial update params
124func (o *ExtrasExportTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
125 o.HTTPClient = client
126}
127
128// WithData adds the data to the extras export templates partial update params
129func (o *ExtrasExportTemplatesPartialUpdateParams) WithData(data *models.ExportTemplate) *ExtrasExportTemplatesPartialUpdateParams {
130 o.SetData(data)
131 return o
132}
133
134// SetData adds the data to the extras export templates partial update params
135func (o *ExtrasExportTemplatesPartialUpdateParams) SetData(data *models.ExportTemplate) {
136 o.Data = data
137}
138
139// WithID adds the id to the extras export templates partial update params
140func (o *ExtrasExportTemplatesPartialUpdateParams) WithID(id int64) *ExtrasExportTemplatesPartialUpdateParams {
141 o.SetID(id)
142 return o
143}
144
145// SetID adds the id to the extras export templates partial update params
146func (o *ExtrasExportTemplatesPartialUpdateParams) SetID(id int64) {
147 o.ID = id
148}
149
150// WriteToRequest writes these params to a swagger request
151func (o *ExtrasExportTemplatesPartialUpdateParams) 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}