vendorify
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go
new file mode 100644
index 0000000..b8a5a7b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsChoicesListParams creates a new CircuitsChoicesListParams object
+// with the default values initialized.
+func NewCircuitsChoicesListParams() *CircuitsChoicesListParams {
+
+ return &CircuitsChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsChoicesListParamsWithTimeout creates a new CircuitsChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsChoicesListParamsWithTimeout(timeout time.Duration) *CircuitsChoicesListParams {
+
+ return &CircuitsChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsChoicesListParamsWithContext creates a new CircuitsChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsChoicesListParamsWithContext(ctx context.Context) *CircuitsChoicesListParams {
+
+ return &CircuitsChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsChoicesListParamsWithHTTPClient creates a new CircuitsChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsChoicesListParamsWithHTTPClient(client *http.Client) *CircuitsChoicesListParams {
+
+ return &CircuitsChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsChoicesListParams contains all the parameters to send to the API endpoint
+for the circuits choices list operation typically these are written to a http.Request
+*/
+type CircuitsChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits choices list params
+func (o *CircuitsChoicesListParams) WithTimeout(timeout time.Duration) *CircuitsChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits choices list params
+func (o *CircuitsChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits choices list params
+func (o *CircuitsChoicesListParams) WithContext(ctx context.Context) *CircuitsChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits choices list params
+func (o *CircuitsChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits choices list params
+func (o *CircuitsChoicesListParams) WithHTTPClient(client *http.Client) *CircuitsChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits choices list params
+func (o *CircuitsChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go
new file mode 100644
index 0000000..893161c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsChoicesListReader is a Reader for the CircuitsChoicesList structure.
+type CircuitsChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsChoicesListOK creates a CircuitsChoicesListOK with default headers values
+func NewCircuitsChoicesListOK() *CircuitsChoicesListOK {
+ return &CircuitsChoicesListOK{}
+}
+
+/*CircuitsChoicesListOK handles this case with default header values.
+
+CircuitsChoicesListOK circuits choices list o k
+*/
+type CircuitsChoicesListOK struct {
+}
+
+func (o *CircuitsChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/_choices/][%d] circuitsChoicesListOK ", 200)
+}
+
+func (o *CircuitsChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go
new file mode 100644
index 0000000..170d8b9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsChoicesReadParams creates a new CircuitsChoicesReadParams object
+// with the default values initialized.
+func NewCircuitsChoicesReadParams() *CircuitsChoicesReadParams {
+ var ()
+ return &CircuitsChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsChoicesReadParamsWithTimeout creates a new CircuitsChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsChoicesReadParamsWithTimeout(timeout time.Duration) *CircuitsChoicesReadParams {
+ var ()
+ return &CircuitsChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsChoicesReadParamsWithContext creates a new CircuitsChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsChoicesReadParamsWithContext(ctx context.Context) *CircuitsChoicesReadParams {
+ var ()
+ return &CircuitsChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsChoicesReadParamsWithHTTPClient creates a new CircuitsChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsChoicesReadParamsWithHTTPClient(client *http.Client) *CircuitsChoicesReadParams {
+ var ()
+ return &CircuitsChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsChoicesReadParams contains all the parameters to send to the API endpoint
+for the circuits choices read operation typically these are written to a http.Request
+*/
+type CircuitsChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits choices read params
+func (o *CircuitsChoicesReadParams) WithTimeout(timeout time.Duration) *CircuitsChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits choices read params
+func (o *CircuitsChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits choices read params
+func (o *CircuitsChoicesReadParams) WithContext(ctx context.Context) *CircuitsChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits choices read params
+func (o *CircuitsChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits choices read params
+func (o *CircuitsChoicesReadParams) WithHTTPClient(client *http.Client) *CircuitsChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits choices read params
+func (o *CircuitsChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits choices read params
+func (o *CircuitsChoicesReadParams) WithID(id string) *CircuitsChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits choices read params
+func (o *CircuitsChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go
new file mode 100644
index 0000000..f991ba8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsChoicesReadReader is a Reader for the CircuitsChoicesRead structure.
+type CircuitsChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsChoicesReadOK creates a CircuitsChoicesReadOK with default headers values
+func NewCircuitsChoicesReadOK() *CircuitsChoicesReadOK {
+ return &CircuitsChoicesReadOK{}
+}
+
+/*CircuitsChoicesReadOK handles this case with default header values.
+
+CircuitsChoicesReadOK circuits choices read o k
+*/
+type CircuitsChoicesReadOK struct {
+}
+
+func (o *CircuitsChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/_choices/{id}/][%d] circuitsChoicesReadOK ", 200)
+}
+
+func (o *CircuitsChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go
new file mode 100644
index 0000000..d5e6554
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTerminationsCreateParams creates a new CircuitsCircuitTerminationsCreateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsCreateParams() *CircuitsCircuitTerminationsCreateParams {
+ var ()
+ return &CircuitsCircuitTerminationsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsCreateParamsWithTimeout creates a new CircuitsCircuitTerminationsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsCreateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsCreateParams {
+ var ()
+ return &CircuitsCircuitTerminationsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsCreateParamsWithContext creates a new CircuitsCircuitTerminationsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsCreateParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsCreateParams {
+ var ()
+ return &CircuitsCircuitTerminationsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsCreateParamsWithHTTPClient creates a new CircuitsCircuitTerminationsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsCreateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsCreateParams {
+ var ()
+ return &CircuitsCircuitTerminationsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsCreateParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations create operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuitTermination
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) WithData(data *models.WritableCircuitTermination) *CircuitsCircuitTerminationsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit terminations create params
+func (o *CircuitsCircuitTerminationsCreateParams) SetData(data *models.WritableCircuitTermination) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go
new file mode 100644
index 0000000..fd0bee5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTerminationsCreateReader is a Reader for the CircuitsCircuitTerminationsCreate structure.
+type CircuitsCircuitTerminationsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewCircuitsCircuitTerminationsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsCreateCreated creates a CircuitsCircuitTerminationsCreateCreated with default headers values
+func NewCircuitsCircuitTerminationsCreateCreated() *CircuitsCircuitTerminationsCreateCreated {
+ return &CircuitsCircuitTerminationsCreateCreated{}
+}
+
+/*CircuitsCircuitTerminationsCreateCreated handles this case with default header values.
+
+CircuitsCircuitTerminationsCreateCreated circuits circuit terminations create created
+*/
+type CircuitsCircuitTerminationsCreateCreated struct {
+ Payload *models.WritableCircuitTermination
+}
+
+func (o *CircuitsCircuitTerminationsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /circuits/circuit-terminations/][%d] circuitsCircuitTerminationsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *CircuitsCircuitTerminationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuitTermination)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go
new file mode 100644
index 0000000..04fc84f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTerminationsDeleteParams creates a new CircuitsCircuitTerminationsDeleteParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsDeleteParams() *CircuitsCircuitTerminationsDeleteParams {
+ var ()
+ return &CircuitsCircuitTerminationsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsDeleteParamsWithTimeout creates a new CircuitsCircuitTerminationsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsDeleteParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsDeleteParams {
+ var ()
+ return &CircuitsCircuitTerminationsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsDeleteParamsWithContext creates a new CircuitsCircuitTerminationsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsDeleteParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsDeleteParams {
+ var ()
+ return &CircuitsCircuitTerminationsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsDeleteParamsWithHTTPClient creates a new CircuitsCircuitTerminationsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsDeleteParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsDeleteParams {
+ var ()
+ return &CircuitsCircuitTerminationsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsDeleteParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations delete operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit termination.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) WithID(id int64) *CircuitsCircuitTerminationsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit terminations delete params
+func (o *CircuitsCircuitTerminationsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go
new file mode 100644
index 0000000..cc3336e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsCircuitTerminationsDeleteReader is a Reader for the CircuitsCircuitTerminationsDelete structure.
+type CircuitsCircuitTerminationsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewCircuitsCircuitTerminationsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsDeleteNoContent creates a CircuitsCircuitTerminationsDeleteNoContent with default headers values
+func NewCircuitsCircuitTerminationsDeleteNoContent() *CircuitsCircuitTerminationsDeleteNoContent {
+ return &CircuitsCircuitTerminationsDeleteNoContent{}
+}
+
+/*CircuitsCircuitTerminationsDeleteNoContent handles this case with default header values.
+
+CircuitsCircuitTerminationsDeleteNoContent circuits circuit terminations delete no content
+*/
+type CircuitsCircuitTerminationsDeleteNoContent struct {
+}
+
+func (o *CircuitsCircuitTerminationsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsDeleteNoContent ", 204)
+}
+
+func (o *CircuitsCircuitTerminationsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go
new file mode 100644
index 0000000..c25cbe1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go
@@ -0,0 +1,427 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTerminationsListParams creates a new CircuitsCircuitTerminationsListParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsListParams() *CircuitsCircuitTerminationsListParams {
+ var ()
+ return &CircuitsCircuitTerminationsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsListParamsWithTimeout creates a new CircuitsCircuitTerminationsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsListParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsListParams {
+ var ()
+ return &CircuitsCircuitTerminationsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsListParamsWithContext creates a new CircuitsCircuitTerminationsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsListParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsListParams {
+ var ()
+ return &CircuitsCircuitTerminationsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsListParamsWithHTTPClient creates a new CircuitsCircuitTerminationsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsListParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsListParams {
+ var ()
+ return &CircuitsCircuitTerminationsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsListParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations list operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsListParams struct {
+
+ /*CircuitID*/
+ CircuitID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*PortSpeed*/
+ PortSpeed *float64
+ /*Q*/
+ Q *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*TermSide*/
+ TermSide *string
+ /*UpstreamSpeed*/
+ UpstreamSpeed *float64
+ /*XconnectID*/
+ XconnectID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithCircuitID adds the circuitID to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithCircuitID(circuitID *string) *CircuitsCircuitTerminationsListParams {
+ o.SetCircuitID(circuitID)
+ return o
+}
+
+// SetCircuitID adds the circuitId to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetCircuitID(circuitID *string) {
+ o.CircuitID = circuitID
+}
+
+// WithLimit adds the limit to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithLimit(limit *int64) *CircuitsCircuitTerminationsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithOffset(offset *int64) *CircuitsCircuitTerminationsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithPortSpeed adds the portSpeed to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithPortSpeed(portSpeed *float64) *CircuitsCircuitTerminationsListParams {
+ o.SetPortSpeed(portSpeed)
+ return o
+}
+
+// SetPortSpeed adds the portSpeed to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetPortSpeed(portSpeed *float64) {
+ o.PortSpeed = portSpeed
+}
+
+// WithQ adds the q to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithQ(q *string) *CircuitsCircuitTerminationsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSite adds the site to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithSite(site *string) *CircuitsCircuitTerminationsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithSiteID(siteID *string) *CircuitsCircuitTerminationsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithTermSide adds the termSide to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithTermSide(termSide *string) *CircuitsCircuitTerminationsListParams {
+ o.SetTermSide(termSide)
+ return o
+}
+
+// SetTermSide adds the termSide to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetTermSide(termSide *string) {
+ o.TermSide = termSide
+}
+
+// WithUpstreamSpeed adds the upstreamSpeed to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithUpstreamSpeed(upstreamSpeed *float64) *CircuitsCircuitTerminationsListParams {
+ o.SetUpstreamSpeed(upstreamSpeed)
+ return o
+}
+
+// SetUpstreamSpeed adds the upstreamSpeed to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetUpstreamSpeed(upstreamSpeed *float64) {
+ o.UpstreamSpeed = upstreamSpeed
+}
+
+// WithXconnectID adds the xconnectID to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) WithXconnectID(xconnectID *string) *CircuitsCircuitTerminationsListParams {
+ o.SetXconnectID(xconnectID)
+ return o
+}
+
+// SetXconnectID adds the xconnectId to the circuits circuit terminations list params
+func (o *CircuitsCircuitTerminationsListParams) SetXconnectID(xconnectID *string) {
+ o.XconnectID = xconnectID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.CircuitID != nil {
+
+ // query param circuit_id
+ var qrCircuitID string
+ if o.CircuitID != nil {
+ qrCircuitID = *o.CircuitID
+ }
+ qCircuitID := qrCircuitID
+ if qCircuitID != "" {
+ if err := r.SetQueryParam("circuit_id", qCircuitID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.PortSpeed != nil {
+
+ // query param port_speed
+ var qrPortSpeed float64
+ if o.PortSpeed != nil {
+ qrPortSpeed = *o.PortSpeed
+ }
+ qPortSpeed := swag.FormatFloat64(qrPortSpeed)
+ if qPortSpeed != "" {
+ if err := r.SetQueryParam("port_speed", qPortSpeed); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TermSide != nil {
+
+ // query param term_side
+ var qrTermSide string
+ if o.TermSide != nil {
+ qrTermSide = *o.TermSide
+ }
+ qTermSide := qrTermSide
+ if qTermSide != "" {
+ if err := r.SetQueryParam("term_side", qTermSide); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.UpstreamSpeed != nil {
+
+ // query param upstream_speed
+ var qrUpstreamSpeed float64
+ if o.UpstreamSpeed != nil {
+ qrUpstreamSpeed = *o.UpstreamSpeed
+ }
+ qUpstreamSpeed := swag.FormatFloat64(qrUpstreamSpeed)
+ if qUpstreamSpeed != "" {
+ if err := r.SetQueryParam("upstream_speed", qUpstreamSpeed); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.XconnectID != nil {
+
+ // query param xconnect_id
+ var qrXconnectID string
+ if o.XconnectID != nil {
+ qrXconnectID = *o.XconnectID
+ }
+ qXconnectID := qrXconnectID
+ if qXconnectID != "" {
+ if err := r.SetQueryParam("xconnect_id", qXconnectID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go
new file mode 100644
index 0000000..29be56d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTerminationsListReader is a Reader for the CircuitsCircuitTerminationsList structure.
+type CircuitsCircuitTerminationsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTerminationsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsListOK creates a CircuitsCircuitTerminationsListOK with default headers values
+func NewCircuitsCircuitTerminationsListOK() *CircuitsCircuitTerminationsListOK {
+ return &CircuitsCircuitTerminationsListOK{}
+}
+
+/*CircuitsCircuitTerminationsListOK handles this case with default header values.
+
+CircuitsCircuitTerminationsListOK circuits circuit terminations list o k
+*/
+type CircuitsCircuitTerminationsListOK struct {
+ Payload *models.CircuitsCircuitTerminationsListOKBody
+}
+
+func (o *CircuitsCircuitTerminationsListOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuit-terminations/][%d] circuitsCircuitTerminationsListOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTerminationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitsCircuitTerminationsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go
new file mode 100644
index 0000000..294471a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTerminationsPartialUpdateParams creates a new CircuitsCircuitTerminationsPartialUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsPartialUpdateParams() *CircuitsCircuitTerminationsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsPartialUpdateParamsWithTimeout creates a new CircuitsCircuitTerminationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsPartialUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsPartialUpdateParamsWithContext creates a new CircuitsCircuitTerminationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsPartialUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsPartialUpdateParamsWithHTTPClient creates a new CircuitsCircuitTerminationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsPartialUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations partial update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuitTermination
+ /*ID
+ A unique integer value identifying this circuit termination.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WithData(data *models.WritableCircuitTermination) *CircuitsCircuitTerminationsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) SetData(data *models.WritableCircuitTermination) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WithID(id int64) *CircuitsCircuitTerminationsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit terminations partial update params
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go
new file mode 100644
index 0000000..4ad26a9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTerminationsPartialUpdateReader is a Reader for the CircuitsCircuitTerminationsPartialUpdate structure.
+type CircuitsCircuitTerminationsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTerminationsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsPartialUpdateOK creates a CircuitsCircuitTerminationsPartialUpdateOK with default headers values
+func NewCircuitsCircuitTerminationsPartialUpdateOK() *CircuitsCircuitTerminationsPartialUpdateOK {
+ return &CircuitsCircuitTerminationsPartialUpdateOK{}
+}
+
+/*CircuitsCircuitTerminationsPartialUpdateOK handles this case with default header values.
+
+CircuitsCircuitTerminationsPartialUpdateOK circuits circuit terminations partial update o k
+*/
+type CircuitsCircuitTerminationsPartialUpdateOK struct {
+ Payload *models.WritableCircuitTermination
+}
+
+func (o *CircuitsCircuitTerminationsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTerminationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuitTermination)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go
new file mode 100644
index 0000000..9751e38
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTerminationsReadParams creates a new CircuitsCircuitTerminationsReadParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsReadParams() *CircuitsCircuitTerminationsReadParams {
+ var ()
+ return &CircuitsCircuitTerminationsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsReadParamsWithTimeout creates a new CircuitsCircuitTerminationsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsReadParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsReadParams {
+ var ()
+ return &CircuitsCircuitTerminationsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsReadParamsWithContext creates a new CircuitsCircuitTerminationsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsReadParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsReadParams {
+ var ()
+ return &CircuitsCircuitTerminationsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsReadParamsWithHTTPClient creates a new CircuitsCircuitTerminationsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsReadParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsReadParams {
+ var ()
+ return &CircuitsCircuitTerminationsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsReadParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations read operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit termination.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) WithID(id int64) *CircuitsCircuitTerminationsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit terminations read params
+func (o *CircuitsCircuitTerminationsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go
new file mode 100644
index 0000000..18d3308
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTerminationsReadReader is a Reader for the CircuitsCircuitTerminationsRead structure.
+type CircuitsCircuitTerminationsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTerminationsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsReadOK creates a CircuitsCircuitTerminationsReadOK with default headers values
+func NewCircuitsCircuitTerminationsReadOK() *CircuitsCircuitTerminationsReadOK {
+ return &CircuitsCircuitTerminationsReadOK{}
+}
+
+/*CircuitsCircuitTerminationsReadOK handles this case with default header values.
+
+CircuitsCircuitTerminationsReadOK circuits circuit terminations read o k
+*/
+type CircuitsCircuitTerminationsReadOK struct {
+ Payload *models.CircuitTermination
+}
+
+func (o *CircuitsCircuitTerminationsReadOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsReadOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTerminationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitTermination)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go
new file mode 100644
index 0000000..4c793ef
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTerminationsUpdateParams creates a new CircuitsCircuitTerminationsUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTerminationsUpdateParams() *CircuitsCircuitTerminationsUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsUpdateParamsWithTimeout creates a new CircuitsCircuitTerminationsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTerminationsUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTerminationsUpdateParamsWithContext creates a new CircuitsCircuitTerminationsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTerminationsUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitTerminationsUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTerminationsUpdateParamsWithHTTPClient creates a new CircuitsCircuitTerminationsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTerminationsUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsUpdateParams {
+ var ()
+ return &CircuitsCircuitTerminationsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTerminationsUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuit terminations update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTerminationsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuitTermination
+ /*ID
+ A unique integer value identifying this circuit termination.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTerminationsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitTerminationsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTerminationsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) WithData(data *models.WritableCircuitTermination) *CircuitsCircuitTerminationsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) SetData(data *models.WritableCircuitTermination) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) WithID(id int64) *CircuitsCircuitTerminationsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit terminations update params
+func (o *CircuitsCircuitTerminationsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTerminationsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go
new file mode 100644
index 0000000..a69b94e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTerminationsUpdateReader is a Reader for the CircuitsCircuitTerminationsUpdate structure.
+type CircuitsCircuitTerminationsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTerminationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTerminationsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTerminationsUpdateOK creates a CircuitsCircuitTerminationsUpdateOK with default headers values
+func NewCircuitsCircuitTerminationsUpdateOK() *CircuitsCircuitTerminationsUpdateOK {
+ return &CircuitsCircuitTerminationsUpdateOK{}
+}
+
+/*CircuitsCircuitTerminationsUpdateOK handles this case with default header values.
+
+CircuitsCircuitTerminationsUpdateOK circuits circuit terminations update o k
+*/
+type CircuitsCircuitTerminationsUpdateOK struct {
+ Payload *models.WritableCircuitTermination
+}
+
+func (o *CircuitsCircuitTerminationsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /circuits/circuit-terminations/{id}/][%d] circuitsCircuitTerminationsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTerminationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuitTermination)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_parameters.go
new file mode 100644
index 0000000..0c20aac
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTypesCreateParams creates a new CircuitsCircuitTypesCreateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesCreateParams() *CircuitsCircuitTypesCreateParams {
+ var ()
+ return &CircuitsCircuitTypesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesCreateParamsWithTimeout creates a new CircuitsCircuitTypesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesCreateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesCreateParams {
+ var ()
+ return &CircuitsCircuitTypesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesCreateParamsWithContext creates a new CircuitsCircuitTypesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesCreateParamsWithContext(ctx context.Context) *CircuitsCircuitTypesCreateParams {
+ var ()
+ return &CircuitsCircuitTypesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesCreateParamsWithHTTPClient creates a new CircuitsCircuitTypesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesCreateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesCreateParams {
+ var ()
+ return &CircuitsCircuitTypesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesCreateParams contains all the parameters to send to the API endpoint
+for the circuits circuit types create operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesCreateParams struct {
+
+ /*Data*/
+ Data *models.CircuitType
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) WithContext(ctx context.Context) *CircuitsCircuitTypesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) WithData(data *models.CircuitType) *CircuitsCircuitTypesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit types create params
+func (o *CircuitsCircuitTypesCreateParams) SetData(data *models.CircuitType) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go
new file mode 100644
index 0000000..042fd2f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTypesCreateReader is a Reader for the CircuitsCircuitTypesCreate structure.
+type CircuitsCircuitTypesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewCircuitsCircuitTypesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesCreateCreated creates a CircuitsCircuitTypesCreateCreated with default headers values
+func NewCircuitsCircuitTypesCreateCreated() *CircuitsCircuitTypesCreateCreated {
+ return &CircuitsCircuitTypesCreateCreated{}
+}
+
+/*CircuitsCircuitTypesCreateCreated handles this case with default header values.
+
+CircuitsCircuitTypesCreateCreated circuits circuit types create created
+*/
+type CircuitsCircuitTypesCreateCreated struct {
+ Payload *models.CircuitType
+}
+
+func (o *CircuitsCircuitTypesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /circuits/circuit-types/][%d] circuitsCircuitTypesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *CircuitsCircuitTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_parameters.go
new file mode 100644
index 0000000..7e9eb16
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTypesDeleteParams creates a new CircuitsCircuitTypesDeleteParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesDeleteParams() *CircuitsCircuitTypesDeleteParams {
+ var ()
+ return &CircuitsCircuitTypesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesDeleteParamsWithTimeout creates a new CircuitsCircuitTypesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesDeleteParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesDeleteParams {
+ var ()
+ return &CircuitsCircuitTypesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesDeleteParamsWithContext creates a new CircuitsCircuitTypesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesDeleteParamsWithContext(ctx context.Context) *CircuitsCircuitTypesDeleteParams {
+ var ()
+ return &CircuitsCircuitTypesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesDeleteParamsWithHTTPClient creates a new CircuitsCircuitTypesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesDeleteParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesDeleteParams {
+ var ()
+ return &CircuitsCircuitTypesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesDeleteParams contains all the parameters to send to the API endpoint
+for the circuits circuit types delete operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) WithContext(ctx context.Context) *CircuitsCircuitTypesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) WithID(id int64) *CircuitsCircuitTypesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit types delete params
+func (o *CircuitsCircuitTypesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go
new file mode 100644
index 0000000..cc10b20
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsCircuitTypesDeleteReader is a Reader for the CircuitsCircuitTypesDelete structure.
+type CircuitsCircuitTypesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewCircuitsCircuitTypesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesDeleteNoContent creates a CircuitsCircuitTypesDeleteNoContent with default headers values
+func NewCircuitsCircuitTypesDeleteNoContent() *CircuitsCircuitTypesDeleteNoContent {
+ return &CircuitsCircuitTypesDeleteNoContent{}
+}
+
+/*CircuitsCircuitTypesDeleteNoContent handles this case with default header values.
+
+CircuitsCircuitTypesDeleteNoContent circuits circuit types delete no content
+*/
+type CircuitsCircuitTypesDeleteNoContent struct {
+}
+
+func (o *CircuitsCircuitTypesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesDeleteNoContent ", 204)
+}
+
+func (o *CircuitsCircuitTypesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_parameters.go
new file mode 100644
index 0000000..00c01d9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTypesListParams creates a new CircuitsCircuitTypesListParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesListParams() *CircuitsCircuitTypesListParams {
+ var ()
+ return &CircuitsCircuitTypesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesListParamsWithTimeout creates a new CircuitsCircuitTypesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesListParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesListParams {
+ var ()
+ return &CircuitsCircuitTypesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesListParamsWithContext creates a new CircuitsCircuitTypesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesListParamsWithContext(ctx context.Context) *CircuitsCircuitTypesListParams {
+ var ()
+ return &CircuitsCircuitTypesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesListParamsWithHTTPClient creates a new CircuitsCircuitTypesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesListParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesListParams {
+ var ()
+ return &CircuitsCircuitTypesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesListParams contains all the parameters to send to the API endpoint
+for the circuits circuit types list operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithContext(ctx context.Context) *CircuitsCircuitTypesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithLimit(limit *int64) *CircuitsCircuitTypesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithName(name *string) *CircuitsCircuitTypesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithOffset(offset *int64) *CircuitsCircuitTypesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) WithSlug(slug *string) *CircuitsCircuitTypesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the circuits circuit types list params
+func (o *CircuitsCircuitTypesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go
new file mode 100644
index 0000000..5d13ece
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTypesListReader is a Reader for the CircuitsCircuitTypesList structure.
+type CircuitsCircuitTypesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTypesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesListOK creates a CircuitsCircuitTypesListOK with default headers values
+func NewCircuitsCircuitTypesListOK() *CircuitsCircuitTypesListOK {
+ return &CircuitsCircuitTypesListOK{}
+}
+
+/*CircuitsCircuitTypesListOK handles this case with default header values.
+
+CircuitsCircuitTypesListOK circuits circuit types list o k
+*/
+type CircuitsCircuitTypesListOK struct {
+ Payload *models.CircuitsCircuitTypesListOKBody
+}
+
+func (o *CircuitsCircuitTypesListOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuit-types/][%d] circuitsCircuitTypesListOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitsCircuitTypesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go
new file mode 100644
index 0000000..2bd833a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTypesPartialUpdateParams creates a new CircuitsCircuitTypesPartialUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesPartialUpdateParams() *CircuitsCircuitTypesPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesPartialUpdateParamsWithTimeout creates a new CircuitsCircuitTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesPartialUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesPartialUpdateParamsWithContext creates a new CircuitsCircuitTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesPartialUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitTypesPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesPartialUpdateParamsWithHTTPClient creates a new CircuitsCircuitTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesPartialUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuit types partial update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.CircuitType
+ /*ID
+ A unique integer value identifying this circuit type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitTypesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) WithData(data *models.CircuitType) *CircuitsCircuitTypesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) SetData(data *models.CircuitType) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) WithID(id int64) *CircuitsCircuitTypesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit types partial update params
+func (o *CircuitsCircuitTypesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go
new file mode 100644
index 0000000..1e8ff2d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTypesPartialUpdateReader is a Reader for the CircuitsCircuitTypesPartialUpdate structure.
+type CircuitsCircuitTypesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTypesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesPartialUpdateOK creates a CircuitsCircuitTypesPartialUpdateOK with default headers values
+func NewCircuitsCircuitTypesPartialUpdateOK() *CircuitsCircuitTypesPartialUpdateOK {
+ return &CircuitsCircuitTypesPartialUpdateOK{}
+}
+
+/*CircuitsCircuitTypesPartialUpdateOK handles this case with default header values.
+
+CircuitsCircuitTypesPartialUpdateOK circuits circuit types partial update o k
+*/
+type CircuitsCircuitTypesPartialUpdateOK struct {
+ Payload *models.CircuitType
+}
+
+func (o *CircuitsCircuitTypesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_parameters.go
new file mode 100644
index 0000000..a36b410
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitTypesReadParams creates a new CircuitsCircuitTypesReadParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesReadParams() *CircuitsCircuitTypesReadParams {
+ var ()
+ return &CircuitsCircuitTypesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesReadParamsWithTimeout creates a new CircuitsCircuitTypesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesReadParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesReadParams {
+ var ()
+ return &CircuitsCircuitTypesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesReadParamsWithContext creates a new CircuitsCircuitTypesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesReadParamsWithContext(ctx context.Context) *CircuitsCircuitTypesReadParams {
+ var ()
+ return &CircuitsCircuitTypesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesReadParamsWithHTTPClient creates a new CircuitsCircuitTypesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesReadParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesReadParams {
+ var ()
+ return &CircuitsCircuitTypesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesReadParams contains all the parameters to send to the API endpoint
+for the circuits circuit types read operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) WithContext(ctx context.Context) *CircuitsCircuitTypesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) WithID(id int64) *CircuitsCircuitTypesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit types read params
+func (o *CircuitsCircuitTypesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go
new file mode 100644
index 0000000..32c6448
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTypesReadReader is a Reader for the CircuitsCircuitTypesRead structure.
+type CircuitsCircuitTypesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTypesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesReadOK creates a CircuitsCircuitTypesReadOK with default headers values
+func NewCircuitsCircuitTypesReadOK() *CircuitsCircuitTypesReadOK {
+ return &CircuitsCircuitTypesReadOK{}
+}
+
+/*CircuitsCircuitTypesReadOK handles this case with default header values.
+
+CircuitsCircuitTypesReadOK circuits circuit types read o k
+*/
+type CircuitsCircuitTypesReadOK struct {
+ Payload *models.CircuitType
+}
+
+func (o *CircuitsCircuitTypesReadOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesReadOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_parameters.go
new file mode 100644
index 0000000..3fa62cd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitTypesUpdateParams creates a new CircuitsCircuitTypesUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitTypesUpdateParams() *CircuitsCircuitTypesUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitTypesUpdateParamsWithTimeout creates a new CircuitsCircuitTypesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitTypesUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitTypesUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitTypesUpdateParamsWithContext creates a new CircuitsCircuitTypesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitTypesUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitTypesUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitTypesUpdateParamsWithHTTPClient creates a new CircuitsCircuitTypesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitTypesUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitTypesUpdateParams {
+ var ()
+ return &CircuitsCircuitTypesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitTypesUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuit types update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitTypesUpdateParams struct {
+
+ /*Data*/
+ Data *models.CircuitType
+ /*ID
+ A unique integer value identifying this circuit type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitTypesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitTypesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitTypesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) WithData(data *models.CircuitType) *CircuitsCircuitTypesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) SetData(data *models.CircuitType) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) WithID(id int64) *CircuitsCircuitTypesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuit types update params
+func (o *CircuitsCircuitTypesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitTypesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go
new file mode 100644
index 0000000..425e912
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitTypesUpdateReader is a Reader for the CircuitsCircuitTypesUpdate structure.
+type CircuitsCircuitTypesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitTypesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitTypesUpdateOK creates a CircuitsCircuitTypesUpdateOK with default headers values
+func NewCircuitsCircuitTypesUpdateOK() *CircuitsCircuitTypesUpdateOK {
+ return &CircuitsCircuitTypesUpdateOK{}
+}
+
+/*CircuitsCircuitTypesUpdateOK handles this case with default header values.
+
+CircuitsCircuitTypesUpdateOK circuits circuit types update o k
+*/
+type CircuitsCircuitTypesUpdateOK struct {
+ Payload *models.CircuitType
+}
+
+func (o *CircuitsCircuitTypesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /circuits/circuit-types/{id}/][%d] circuitsCircuitTypesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_parameters.go
new file mode 100644
index 0000000..8ef8373
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitsCreateParams creates a new CircuitsCircuitsCreateParams object
+// with the default values initialized.
+func NewCircuitsCircuitsCreateParams() *CircuitsCircuitsCreateParams {
+ var ()
+ return &CircuitsCircuitsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsCreateParamsWithTimeout creates a new CircuitsCircuitsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsCreateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsCreateParams {
+ var ()
+ return &CircuitsCircuitsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsCreateParamsWithContext creates a new CircuitsCircuitsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsCreateParamsWithContext(ctx context.Context) *CircuitsCircuitsCreateParams {
+ var ()
+ return &CircuitsCircuitsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsCreateParamsWithHTTPClient creates a new CircuitsCircuitsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsCreateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsCreateParams {
+ var ()
+ return &CircuitsCircuitsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsCreateParams contains all the parameters to send to the API endpoint
+for the circuits circuits create operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuit
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) WithContext(ctx context.Context) *CircuitsCircuitsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) WithData(data *models.WritableCircuit) *CircuitsCircuitsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuits create params
+func (o *CircuitsCircuitsCreateParams) SetData(data *models.WritableCircuit) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go
new file mode 100644
index 0000000..9f70763
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsCreateReader is a Reader for the CircuitsCircuitsCreate structure.
+type CircuitsCircuitsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewCircuitsCircuitsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsCreateCreated creates a CircuitsCircuitsCreateCreated with default headers values
+func NewCircuitsCircuitsCreateCreated() *CircuitsCircuitsCreateCreated {
+ return &CircuitsCircuitsCreateCreated{}
+}
+
+/*CircuitsCircuitsCreateCreated handles this case with default header values.
+
+CircuitsCircuitsCreateCreated circuits circuits create created
+*/
+type CircuitsCircuitsCreateCreated struct {
+ Payload *models.WritableCircuit
+}
+
+func (o *CircuitsCircuitsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /circuits/circuits/][%d] circuitsCircuitsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *CircuitsCircuitsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuit)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_parameters.go
new file mode 100644
index 0000000..bc227a0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitsDeleteParams creates a new CircuitsCircuitsDeleteParams object
+// with the default values initialized.
+func NewCircuitsCircuitsDeleteParams() *CircuitsCircuitsDeleteParams {
+ var ()
+ return &CircuitsCircuitsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsDeleteParamsWithTimeout creates a new CircuitsCircuitsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsDeleteParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsDeleteParams {
+ var ()
+ return &CircuitsCircuitsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsDeleteParamsWithContext creates a new CircuitsCircuitsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsDeleteParamsWithContext(ctx context.Context) *CircuitsCircuitsDeleteParams {
+ var ()
+ return &CircuitsCircuitsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsDeleteParamsWithHTTPClient creates a new CircuitsCircuitsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsDeleteParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsDeleteParams {
+ var ()
+ return &CircuitsCircuitsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsDeleteParams contains all the parameters to send to the API endpoint
+for the circuits circuits delete operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) WithContext(ctx context.Context) *CircuitsCircuitsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) WithID(id int64) *CircuitsCircuitsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuits delete params
+func (o *CircuitsCircuitsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go
new file mode 100644
index 0000000..2ddec44
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsCircuitsDeleteReader is a Reader for the CircuitsCircuitsDelete structure.
+type CircuitsCircuitsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewCircuitsCircuitsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsDeleteNoContent creates a CircuitsCircuitsDeleteNoContent with default headers values
+func NewCircuitsCircuitsDeleteNoContent() *CircuitsCircuitsDeleteNoContent {
+ return &CircuitsCircuitsDeleteNoContent{}
+}
+
+/*CircuitsCircuitsDeleteNoContent handles this case with default header values.
+
+CircuitsCircuitsDeleteNoContent circuits circuits delete no content
+*/
+type CircuitsCircuitsDeleteNoContent struct {
+}
+
+func (o *CircuitsCircuitsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /circuits/circuits/{id}/][%d] circuitsCircuitsDeleteNoContent ", 204)
+}
+
+func (o *CircuitsCircuitsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_parameters.go
new file mode 100644
index 0000000..01e99ad
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_parameters.go
@@ -0,0 +1,604 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitsListParams creates a new CircuitsCircuitsListParams object
+// with the default values initialized.
+func NewCircuitsCircuitsListParams() *CircuitsCircuitsListParams {
+ var ()
+ return &CircuitsCircuitsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsListParamsWithTimeout creates a new CircuitsCircuitsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsListParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsListParams {
+ var ()
+ return &CircuitsCircuitsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsListParamsWithContext creates a new CircuitsCircuitsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsListParamsWithContext(ctx context.Context) *CircuitsCircuitsListParams {
+ var ()
+ return &CircuitsCircuitsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsListParamsWithHTTPClient creates a new CircuitsCircuitsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsListParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsListParams {
+ var ()
+ return &CircuitsCircuitsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsListParams contains all the parameters to send to the API endpoint
+for the circuits circuits list operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsListParams struct {
+
+ /*Cid*/
+ Cid *string
+ /*CommitRate*/
+ CommitRate *float64
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*InstallDate*/
+ InstallDate *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Provider*/
+ Provider *string
+ /*ProviderID*/
+ ProviderID *string
+ /*Q*/
+ Q *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*Type*/
+ Type *string
+ /*TypeID*/
+ TypeID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithContext(ctx context.Context) *CircuitsCircuitsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithCid adds the cid to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithCid(cid *string) *CircuitsCircuitsListParams {
+ o.SetCid(cid)
+ return o
+}
+
+// SetCid adds the cid to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetCid(cid *string) {
+ o.Cid = cid
+}
+
+// WithCommitRate adds the commitRate to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithCommitRate(commitRate *float64) *CircuitsCircuitsListParams {
+ o.SetCommitRate(commitRate)
+ return o
+}
+
+// SetCommitRate adds the commitRate to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetCommitRate(commitRate *float64) {
+ o.CommitRate = commitRate
+}
+
+// WithIDIn adds the iDIn to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithIDIn(iDIn *string) *CircuitsCircuitsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithInstallDate adds the installDate to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithInstallDate(installDate *string) *CircuitsCircuitsListParams {
+ o.SetInstallDate(installDate)
+ return o
+}
+
+// SetInstallDate adds the installDate to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetInstallDate(installDate *string) {
+ o.InstallDate = installDate
+}
+
+// WithLimit adds the limit to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithLimit(limit *int64) *CircuitsCircuitsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithOffset(offset *int64) *CircuitsCircuitsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithProvider adds the provider to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithProvider(provider *string) *CircuitsCircuitsListParams {
+ o.SetProvider(provider)
+ return o
+}
+
+// SetProvider adds the provider to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetProvider(provider *string) {
+ o.Provider = provider
+}
+
+// WithProviderID adds the providerID to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithProviderID(providerID *string) *CircuitsCircuitsListParams {
+ o.SetProviderID(providerID)
+ return o
+}
+
+// SetProviderID adds the providerId to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetProviderID(providerID *string) {
+ o.ProviderID = providerID
+}
+
+// WithQ adds the q to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithQ(q *string) *CircuitsCircuitsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSite adds the site to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithSite(site *string) *CircuitsCircuitsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithSiteID(siteID *string) *CircuitsCircuitsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithStatus adds the status to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithStatus(status *string) *CircuitsCircuitsListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithTenant(tenant *string) *CircuitsCircuitsListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithTenantID(tenantID *string) *CircuitsCircuitsListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithType adds the typeVar to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithType(typeVar *string) *CircuitsCircuitsListParams {
+ o.SetType(typeVar)
+ return o
+}
+
+// SetType adds the type to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetType(typeVar *string) {
+ o.Type = typeVar
+}
+
+// WithTypeID adds the typeID to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) WithTypeID(typeID *string) *CircuitsCircuitsListParams {
+ o.SetTypeID(typeID)
+ return o
+}
+
+// SetTypeID adds the typeId to the circuits circuits list params
+func (o *CircuitsCircuitsListParams) SetTypeID(typeID *string) {
+ o.TypeID = typeID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Cid != nil {
+
+ // query param cid
+ var qrCid string
+ if o.Cid != nil {
+ qrCid = *o.Cid
+ }
+ qCid := qrCid
+ if qCid != "" {
+ if err := r.SetQueryParam("cid", qCid); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.CommitRate != nil {
+
+ // query param commit_rate
+ var qrCommitRate float64
+ if o.CommitRate != nil {
+ qrCommitRate = *o.CommitRate
+ }
+ qCommitRate := swag.FormatFloat64(qrCommitRate)
+ if qCommitRate != "" {
+ if err := r.SetQueryParam("commit_rate", qCommitRate); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.InstallDate != nil {
+
+ // query param install_date
+ var qrInstallDate string
+ if o.InstallDate != nil {
+ qrInstallDate = *o.InstallDate
+ }
+ qInstallDate := qrInstallDate
+ if qInstallDate != "" {
+ if err := r.SetQueryParam("install_date", qInstallDate); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Provider != nil {
+
+ // query param provider
+ var qrProvider string
+ if o.Provider != nil {
+ qrProvider = *o.Provider
+ }
+ qProvider := qrProvider
+ if qProvider != "" {
+ if err := r.SetQueryParam("provider", qProvider); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ProviderID != nil {
+
+ // query param provider_id
+ var qrProviderID string
+ if o.ProviderID != nil {
+ qrProviderID = *o.ProviderID
+ }
+ qProviderID := qrProviderID
+ if qProviderID != "" {
+ if err := r.SetQueryParam("provider_id", qProviderID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Type != nil {
+
+ // query param type
+ var qrType string
+ if o.Type != nil {
+ qrType = *o.Type
+ }
+ qType := qrType
+ if qType != "" {
+ if err := r.SetQueryParam("type", qType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TypeID != nil {
+
+ // query param type_id
+ var qrTypeID string
+ if o.TypeID != nil {
+ qrTypeID = *o.TypeID
+ }
+ qTypeID := qrTypeID
+ if qTypeID != "" {
+ if err := r.SetQueryParam("type_id", qTypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go
new file mode 100644
index 0000000..fdd3e77
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsListReader is a Reader for the CircuitsCircuitsList structure.
+type CircuitsCircuitsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsListOK creates a CircuitsCircuitsListOK with default headers values
+func NewCircuitsCircuitsListOK() *CircuitsCircuitsListOK {
+ return &CircuitsCircuitsListOK{}
+}
+
+/*CircuitsCircuitsListOK handles this case with default header values.
+
+CircuitsCircuitsListOK circuits circuits list o k
+*/
+type CircuitsCircuitsListOK struct {
+ Payload *models.CircuitsCircuitsListOKBody
+}
+
+func (o *CircuitsCircuitsListOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuits/][%d] circuitsCircuitsListOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitsCircuitsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_parameters.go
new file mode 100644
index 0000000..263ab7e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitsPartialUpdateParams creates a new CircuitsCircuitsPartialUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitsPartialUpdateParams() *CircuitsCircuitsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsPartialUpdateParamsWithTimeout creates a new CircuitsCircuitsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsPartialUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsPartialUpdateParamsWithContext creates a new CircuitsCircuitsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsPartialUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsPartialUpdateParamsWithHTTPClient creates a new CircuitsCircuitsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsPartialUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsPartialUpdateParams {
+ var ()
+ return &CircuitsCircuitsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuits partial update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuit
+ /*ID
+ A unique integer value identifying this circuit.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) WithData(data *models.WritableCircuit) *CircuitsCircuitsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) SetData(data *models.WritableCircuit) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) WithID(id int64) *CircuitsCircuitsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuits partial update params
+func (o *CircuitsCircuitsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go
new file mode 100644
index 0000000..0080e47
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsPartialUpdateReader is a Reader for the CircuitsCircuitsPartialUpdate structure.
+type CircuitsCircuitsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsPartialUpdateOK creates a CircuitsCircuitsPartialUpdateOK with default headers values
+func NewCircuitsCircuitsPartialUpdateOK() *CircuitsCircuitsPartialUpdateOK {
+ return &CircuitsCircuitsPartialUpdateOK{}
+}
+
+/*CircuitsCircuitsPartialUpdateOK handles this case with default header values.
+
+CircuitsCircuitsPartialUpdateOK circuits circuits partial update o k
+*/
+type CircuitsCircuitsPartialUpdateOK struct {
+ Payload *models.WritableCircuit
+}
+
+func (o *CircuitsCircuitsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /circuits/circuits/{id}/][%d] circuitsCircuitsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuit)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_parameters.go
new file mode 100644
index 0000000..855a9ba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsCircuitsReadParams creates a new CircuitsCircuitsReadParams object
+// with the default values initialized.
+func NewCircuitsCircuitsReadParams() *CircuitsCircuitsReadParams {
+ var ()
+ return &CircuitsCircuitsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsReadParamsWithTimeout creates a new CircuitsCircuitsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsReadParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsReadParams {
+ var ()
+ return &CircuitsCircuitsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsReadParamsWithContext creates a new CircuitsCircuitsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsReadParamsWithContext(ctx context.Context) *CircuitsCircuitsReadParams {
+ var ()
+ return &CircuitsCircuitsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsReadParamsWithHTTPClient creates a new CircuitsCircuitsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsReadParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsReadParams {
+ var ()
+ return &CircuitsCircuitsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsReadParams contains all the parameters to send to the API endpoint
+for the circuits circuits read operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this circuit.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) WithContext(ctx context.Context) *CircuitsCircuitsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) WithID(id int64) *CircuitsCircuitsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuits read params
+func (o *CircuitsCircuitsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go
new file mode 100644
index 0000000..d907a3d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsReadReader is a Reader for the CircuitsCircuitsRead structure.
+type CircuitsCircuitsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsReadOK creates a CircuitsCircuitsReadOK with default headers values
+func NewCircuitsCircuitsReadOK() *CircuitsCircuitsReadOK {
+ return &CircuitsCircuitsReadOK{}
+}
+
+/*CircuitsCircuitsReadOK handles this case with default header values.
+
+CircuitsCircuitsReadOK circuits circuits read o k
+*/
+type CircuitsCircuitsReadOK struct {
+ Payload *models.Circuit
+}
+
+func (o *CircuitsCircuitsReadOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/circuits/{id}/][%d] circuitsCircuitsReadOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Circuit)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_parameters.go
new file mode 100644
index 0000000..ac26c68
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsCircuitsUpdateParams creates a new CircuitsCircuitsUpdateParams object
+// with the default values initialized.
+func NewCircuitsCircuitsUpdateParams() *CircuitsCircuitsUpdateParams {
+ var ()
+ return &CircuitsCircuitsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsCircuitsUpdateParamsWithTimeout creates a new CircuitsCircuitsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsCircuitsUpdateParamsWithTimeout(timeout time.Duration) *CircuitsCircuitsUpdateParams {
+ var ()
+ return &CircuitsCircuitsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsCircuitsUpdateParamsWithContext creates a new CircuitsCircuitsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsCircuitsUpdateParamsWithContext(ctx context.Context) *CircuitsCircuitsUpdateParams {
+ var ()
+ return &CircuitsCircuitsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsCircuitsUpdateParamsWithHTTPClient creates a new CircuitsCircuitsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsCircuitsUpdateParamsWithHTTPClient(client *http.Client) *CircuitsCircuitsUpdateParams {
+ var ()
+ return &CircuitsCircuitsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsCircuitsUpdateParams contains all the parameters to send to the API endpoint
+for the circuits circuits update operation typically these are written to a http.Request
+*/
+type CircuitsCircuitsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCircuit
+ /*ID
+ A unique integer value identifying this circuit.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) WithTimeout(timeout time.Duration) *CircuitsCircuitsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) WithContext(ctx context.Context) *CircuitsCircuitsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) WithHTTPClient(client *http.Client) *CircuitsCircuitsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) WithData(data *models.WritableCircuit) *CircuitsCircuitsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) SetData(data *models.WritableCircuit) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) WithID(id int64) *CircuitsCircuitsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits circuits update params
+func (o *CircuitsCircuitsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsCircuitsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go
new file mode 100644
index 0000000..11a3ebf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsUpdateReader is a Reader for the CircuitsCircuitsUpdate structure.
+type CircuitsCircuitsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsCircuitsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsCircuitsUpdateOK creates a CircuitsCircuitsUpdateOK with default headers values
+func NewCircuitsCircuitsUpdateOK() *CircuitsCircuitsUpdateOK {
+ return &CircuitsCircuitsUpdateOK{}
+}
+
+/*CircuitsCircuitsUpdateOK handles this case with default header values.
+
+CircuitsCircuitsUpdateOK circuits circuits update o k
+*/
+type CircuitsCircuitsUpdateOK struct {
+ Payload *models.WritableCircuit
+}
+
+func (o *CircuitsCircuitsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /circuits/circuits/{id}/][%d] circuitsCircuitsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCircuit)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_client.go
new file mode 100644
index 0000000..9f1b959
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_client.go
@@ -0,0 +1,827 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new circuits API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for circuits API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+CircuitsChoicesList circuits choices list API
+*/
+func (a *Client) CircuitsChoicesList(params *CircuitsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits__choices_list",
+ Method: "GET",
+ PathPattern: "/circuits/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsChoicesListOK), nil
+
+}
+
+/*
+CircuitsChoicesRead circuits choices read API
+*/
+func (a *Client) CircuitsChoicesRead(params *CircuitsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits__choices_read",
+ Method: "GET",
+ PathPattern: "/circuits/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsChoicesReadOK), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsCreate circuits circuit terminations create API
+*/
+func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTerminationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_create",
+ Method: "POST",
+ PathPattern: "/circuits/circuit-terminations/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsCreateCreated), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsDelete circuits circuit terminations delete API
+*/
+func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTerminationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_delete",
+ Method: "DELETE",
+ PathPattern: "/circuits/circuit-terminations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsDeleteNoContent), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsList circuits circuit terminations list API
+*/
+func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_list",
+ Method: "GET",
+ PathPattern: "/circuits/circuit-terminations/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsListOK), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsPartialUpdate circuits circuit terminations partial update API
+*/
+func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircuitTerminationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_partial_update",
+ Method: "PATCH",
+ PathPattern: "/circuits/circuit-terminations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsPartialUpdateOK), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsRead circuits circuit terminations read API
+*/
+func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_read",
+ Method: "GET",
+ PathPattern: "/circuits/circuit-terminations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsReadOK), nil
+
+}
+
+/*
+CircuitsCircuitTerminationsUpdate circuits circuit terminations update API
+*/
+func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTerminationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTerminationsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-terminations_update",
+ Method: "PUT",
+ PathPattern: "/circuits/circuit-terminations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTerminationsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTerminationsUpdateOK), nil
+
+}
+
+/*
+CircuitsCircuitTypesCreate circuits circuit types create API
+*/
+func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_create",
+ Method: "POST",
+ PathPattern: "/circuits/circuit-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesCreateCreated), nil
+
+}
+
+/*
+CircuitsCircuitTypesDelete circuits circuit types delete API
+*/
+func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_delete",
+ Method: "DELETE",
+ PathPattern: "/circuits/circuit-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesDeleteNoContent), nil
+
+}
+
+/*
+CircuitsCircuitTypesList circuits circuit types list API
+*/
+func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_list",
+ Method: "GET",
+ PathPattern: "/circuits/circuit-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesListOK), nil
+
+}
+
+/*
+CircuitsCircuitTypesPartialUpdate circuits circuit types partial update API
+*/
+func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_partial_update",
+ Method: "PATCH",
+ PathPattern: "/circuits/circuit-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesPartialUpdateOK), nil
+
+}
+
+/*
+CircuitsCircuitTypesRead circuits circuit types read API
+*/
+func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_read",
+ Method: "GET",
+ PathPattern: "/circuits/circuit-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesReadOK), nil
+
+}
+
+/*
+CircuitsCircuitTypesUpdate circuits circuit types update API
+*/
+func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitTypesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuit-types_update",
+ Method: "PUT",
+ PathPattern: "/circuits/circuit-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitTypesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitTypesUpdateOK), nil
+
+}
+
+/*
+CircuitsCircuitsCreate circuits circuits create API
+*/
+func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_create",
+ Method: "POST",
+ PathPattern: "/circuits/circuits/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsCreateCreated), nil
+
+}
+
+/*
+CircuitsCircuitsDelete circuits circuits delete API
+*/
+func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_delete",
+ Method: "DELETE",
+ PathPattern: "/circuits/circuits/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsDeleteNoContent), nil
+
+}
+
+/*
+CircuitsCircuitsList circuits circuits list API
+*/
+func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_list",
+ Method: "GET",
+ PathPattern: "/circuits/circuits/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsListOK), nil
+
+}
+
+/*
+CircuitsCircuitsPartialUpdate circuits circuits partial update API
+*/
+func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_partial_update",
+ Method: "PATCH",
+ PathPattern: "/circuits/circuits/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsPartialUpdateOK), nil
+
+}
+
+/*
+CircuitsCircuitsRead circuits circuits read API
+*/
+func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_read",
+ Method: "GET",
+ PathPattern: "/circuits/circuits/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsReadOK), nil
+
+}
+
+/*
+CircuitsCircuitsUpdate circuits circuits update API
+*/
+func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsCircuitsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_circuits_update",
+ Method: "PUT",
+ PathPattern: "/circuits/circuits/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsCircuitsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsCircuitsUpdateOK), nil
+
+}
+
+/*
+CircuitsProvidersCreate circuits providers create API
+*/
+func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_create",
+ Method: "POST",
+ PathPattern: "/circuits/providers/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersCreateCreated), nil
+
+}
+
+/*
+CircuitsProvidersDelete circuits providers delete API
+*/
+func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_delete",
+ Method: "DELETE",
+ PathPattern: "/circuits/providers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersDeleteNoContent), nil
+
+}
+
+/*
+CircuitsProvidersGraphs A convenience method for rendering graphs for a particular provider.
+*/
+func (a *Client) CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersGraphsOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersGraphsParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_graphs",
+ Method: "GET",
+ PathPattern: "/circuits/providers/{id}/graphs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersGraphsReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersGraphsOK), nil
+
+}
+
+/*
+CircuitsProvidersList circuits providers list API
+*/
+func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_list",
+ Method: "GET",
+ PathPattern: "/circuits/providers/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersListOK), nil
+
+}
+
+/*
+CircuitsProvidersPartialUpdate circuits providers partial update API
+*/
+func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_partial_update",
+ Method: "PATCH",
+ PathPattern: "/circuits/providers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersPartialUpdateOK), nil
+
+}
+
+/*
+CircuitsProvidersRead circuits providers read API
+*/
+func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_read",
+ Method: "GET",
+ PathPattern: "/circuits/providers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersReadOK), nil
+
+}
+
+/*
+CircuitsProvidersUpdate circuits providers update API
+*/
+func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewCircuitsProvidersUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "circuits_providers_update",
+ Method: "PUT",
+ PathPattern: "/circuits/providers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &CircuitsProvidersUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*CircuitsProvidersUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_parameters.go
new file mode 100644
index 0000000..4faebe3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsProvidersCreateParams creates a new CircuitsProvidersCreateParams object
+// with the default values initialized.
+func NewCircuitsProvidersCreateParams() *CircuitsProvidersCreateParams {
+ var ()
+ return &CircuitsProvidersCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersCreateParamsWithTimeout creates a new CircuitsProvidersCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersCreateParamsWithTimeout(timeout time.Duration) *CircuitsProvidersCreateParams {
+ var ()
+ return &CircuitsProvidersCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersCreateParamsWithContext creates a new CircuitsProvidersCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersCreateParamsWithContext(ctx context.Context) *CircuitsProvidersCreateParams {
+ var ()
+ return &CircuitsProvidersCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersCreateParamsWithHTTPClient creates a new CircuitsProvidersCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersCreateParamsWithHTTPClient(client *http.Client) *CircuitsProvidersCreateParams {
+ var ()
+ return &CircuitsProvidersCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersCreateParams contains all the parameters to send to the API endpoint
+for the circuits providers create operation typically these are written to a http.Request
+*/
+type CircuitsProvidersCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableProvider
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) WithTimeout(timeout time.Duration) *CircuitsProvidersCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) WithContext(ctx context.Context) *CircuitsProvidersCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) WithHTTPClient(client *http.Client) *CircuitsProvidersCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) WithData(data *models.WritableProvider) *CircuitsProvidersCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits providers create params
+func (o *CircuitsProvidersCreateParams) SetData(data *models.WritableProvider) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go
new file mode 100644
index 0000000..e1bcea7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersCreateReader is a Reader for the CircuitsProvidersCreate structure.
+type CircuitsProvidersCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewCircuitsProvidersCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersCreateCreated creates a CircuitsProvidersCreateCreated with default headers values
+func NewCircuitsProvidersCreateCreated() *CircuitsProvidersCreateCreated {
+ return &CircuitsProvidersCreateCreated{}
+}
+
+/*CircuitsProvidersCreateCreated handles this case with default header values.
+
+CircuitsProvidersCreateCreated circuits providers create created
+*/
+type CircuitsProvidersCreateCreated struct {
+ Payload *models.WritableProvider
+}
+
+func (o *CircuitsProvidersCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /circuits/providers/][%d] circuitsProvidersCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *CircuitsProvidersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableProvider)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_parameters.go
new file mode 100644
index 0000000..f07ad0b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsProvidersDeleteParams creates a new CircuitsProvidersDeleteParams object
+// with the default values initialized.
+func NewCircuitsProvidersDeleteParams() *CircuitsProvidersDeleteParams {
+ var ()
+ return &CircuitsProvidersDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersDeleteParamsWithTimeout creates a new CircuitsProvidersDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersDeleteParamsWithTimeout(timeout time.Duration) *CircuitsProvidersDeleteParams {
+ var ()
+ return &CircuitsProvidersDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersDeleteParamsWithContext creates a new CircuitsProvidersDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersDeleteParamsWithContext(ctx context.Context) *CircuitsProvidersDeleteParams {
+ var ()
+ return &CircuitsProvidersDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersDeleteParamsWithHTTPClient creates a new CircuitsProvidersDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersDeleteParamsWithHTTPClient(client *http.Client) *CircuitsProvidersDeleteParams {
+ var ()
+ return &CircuitsProvidersDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersDeleteParams contains all the parameters to send to the API endpoint
+for the circuits providers delete operation typically these are written to a http.Request
+*/
+type CircuitsProvidersDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this provider.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) WithTimeout(timeout time.Duration) *CircuitsProvidersDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) WithContext(ctx context.Context) *CircuitsProvidersDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) WithHTTPClient(client *http.Client) *CircuitsProvidersDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) WithID(id int64) *CircuitsProvidersDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits providers delete params
+func (o *CircuitsProvidersDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go
new file mode 100644
index 0000000..f166405
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// CircuitsProvidersDeleteReader is a Reader for the CircuitsProvidersDelete structure.
+type CircuitsProvidersDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewCircuitsProvidersDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersDeleteNoContent creates a CircuitsProvidersDeleteNoContent with default headers values
+func NewCircuitsProvidersDeleteNoContent() *CircuitsProvidersDeleteNoContent {
+ return &CircuitsProvidersDeleteNoContent{}
+}
+
+/*CircuitsProvidersDeleteNoContent handles this case with default header values.
+
+CircuitsProvidersDeleteNoContent circuits providers delete no content
+*/
+type CircuitsProvidersDeleteNoContent struct {
+}
+
+func (o *CircuitsProvidersDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /circuits/providers/{id}/][%d] circuitsProvidersDeleteNoContent ", 204)
+}
+
+func (o *CircuitsProvidersDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_parameters.go
new file mode 100644
index 0000000..a3123fb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsProvidersGraphsParams creates a new CircuitsProvidersGraphsParams object
+// with the default values initialized.
+func NewCircuitsProvidersGraphsParams() *CircuitsProvidersGraphsParams {
+ var ()
+ return &CircuitsProvidersGraphsParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersGraphsParamsWithTimeout creates a new CircuitsProvidersGraphsParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersGraphsParamsWithTimeout(timeout time.Duration) *CircuitsProvidersGraphsParams {
+ var ()
+ return &CircuitsProvidersGraphsParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersGraphsParamsWithContext creates a new CircuitsProvidersGraphsParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersGraphsParamsWithContext(ctx context.Context) *CircuitsProvidersGraphsParams {
+ var ()
+ return &CircuitsProvidersGraphsParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersGraphsParamsWithHTTPClient creates a new CircuitsProvidersGraphsParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersGraphsParamsWithHTTPClient(client *http.Client) *CircuitsProvidersGraphsParams {
+ var ()
+ return &CircuitsProvidersGraphsParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersGraphsParams contains all the parameters to send to the API endpoint
+for the circuits providers graphs operation typically these are written to a http.Request
+*/
+type CircuitsProvidersGraphsParams struct {
+
+ /*ID
+ A unique integer value identifying this provider.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) WithTimeout(timeout time.Duration) *CircuitsProvidersGraphsParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) WithContext(ctx context.Context) *CircuitsProvidersGraphsParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) WithHTTPClient(client *http.Client) *CircuitsProvidersGraphsParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) WithID(id int64) *CircuitsProvidersGraphsParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits providers graphs params
+func (o *CircuitsProvidersGraphsParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersGraphsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go
new file mode 100644
index 0000000..e57279f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersGraphsReader is a Reader for the CircuitsProvidersGraphs structure.
+type CircuitsProvidersGraphsReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsProvidersGraphsOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersGraphsOK creates a CircuitsProvidersGraphsOK with default headers values
+func NewCircuitsProvidersGraphsOK() *CircuitsProvidersGraphsOK {
+ return &CircuitsProvidersGraphsOK{}
+}
+
+/*CircuitsProvidersGraphsOK handles this case with default header values.
+
+CircuitsProvidersGraphsOK circuits providers graphs o k
+*/
+type CircuitsProvidersGraphsOK struct {
+ Payload *models.Provider
+}
+
+func (o *CircuitsProvidersGraphsOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/providers/{id}/graphs/][%d] circuitsProvidersGraphsOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsProvidersGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Provider)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_parameters.go
new file mode 100644
index 0000000..e7a40c0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_parameters.go
@@ -0,0 +1,430 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsProvidersListParams creates a new CircuitsProvidersListParams object
+// with the default values initialized.
+func NewCircuitsProvidersListParams() *CircuitsProvidersListParams {
+ var ()
+ return &CircuitsProvidersListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersListParamsWithTimeout creates a new CircuitsProvidersListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersListParamsWithTimeout(timeout time.Duration) *CircuitsProvidersListParams {
+ var ()
+ return &CircuitsProvidersListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersListParamsWithContext creates a new CircuitsProvidersListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersListParamsWithContext(ctx context.Context) *CircuitsProvidersListParams {
+ var ()
+ return &CircuitsProvidersListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersListParamsWithHTTPClient creates a new CircuitsProvidersListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersListParamsWithHTTPClient(client *http.Client) *CircuitsProvidersListParams {
+ var ()
+ return &CircuitsProvidersListParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersListParams contains all the parameters to send to the API endpoint
+for the circuits providers list operation typically these are written to a http.Request
+*/
+type CircuitsProvidersListParams struct {
+
+ /*Account*/
+ Account *string
+ /*Asn*/
+ Asn *float64
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithTimeout(timeout time.Duration) *CircuitsProvidersListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithContext(ctx context.Context) *CircuitsProvidersListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithHTTPClient(client *http.Client) *CircuitsProvidersListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithAccount adds the account to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithAccount(account *string) *CircuitsProvidersListParams {
+ o.SetAccount(account)
+ return o
+}
+
+// SetAccount adds the account to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetAccount(account *string) {
+ o.Account = account
+}
+
+// WithAsn adds the asn to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithAsn(asn *float64) *CircuitsProvidersListParams {
+ o.SetAsn(asn)
+ return o
+}
+
+// SetAsn adds the asn to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetAsn(asn *float64) {
+ o.Asn = asn
+}
+
+// WithIDIn adds the iDIn to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithIDIn(iDIn *string) *CircuitsProvidersListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithLimit(limit *int64) *CircuitsProvidersListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithName(name *string) *CircuitsProvidersListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithOffset(offset *int64) *CircuitsProvidersListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithQ(q *string) *CircuitsProvidersListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSite adds the site to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithSite(site *string) *CircuitsProvidersListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithSiteID(siteID *string) *CircuitsProvidersListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithSlug adds the slug to the circuits providers list params
+func (o *CircuitsProvidersListParams) WithSlug(slug *string) *CircuitsProvidersListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the circuits providers list params
+func (o *CircuitsProvidersListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Account != nil {
+
+ // query param account
+ var qrAccount string
+ if o.Account != nil {
+ qrAccount = *o.Account
+ }
+ qAccount := qrAccount
+ if qAccount != "" {
+ if err := r.SetQueryParam("account", qAccount); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Asn != nil {
+
+ // query param asn
+ var qrAsn float64
+ if o.Asn != nil {
+ qrAsn = *o.Asn
+ }
+ qAsn := swag.FormatFloat64(qrAsn)
+ if qAsn != "" {
+ if err := r.SetQueryParam("asn", qAsn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go
new file mode 100644
index 0000000..838465f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersListReader is a Reader for the CircuitsProvidersList structure.
+type CircuitsProvidersListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsProvidersListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersListOK creates a CircuitsProvidersListOK with default headers values
+func NewCircuitsProvidersListOK() *CircuitsProvidersListOK {
+ return &CircuitsProvidersListOK{}
+}
+
+/*CircuitsProvidersListOK handles this case with default header values.
+
+CircuitsProvidersListOK circuits providers list o k
+*/
+type CircuitsProvidersListOK struct {
+ Payload *models.CircuitsProvidersListOKBody
+}
+
+func (o *CircuitsProvidersListOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/providers/][%d] circuitsProvidersListOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsProvidersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.CircuitsProvidersListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_parameters.go
new file mode 100644
index 0000000..c1d3d90
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsProvidersPartialUpdateParams creates a new CircuitsProvidersPartialUpdateParams object
+// with the default values initialized.
+func NewCircuitsProvidersPartialUpdateParams() *CircuitsProvidersPartialUpdateParams {
+ var ()
+ return &CircuitsProvidersPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersPartialUpdateParamsWithTimeout creates a new CircuitsProvidersPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersPartialUpdateParamsWithTimeout(timeout time.Duration) *CircuitsProvidersPartialUpdateParams {
+ var ()
+ return &CircuitsProvidersPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersPartialUpdateParamsWithContext creates a new CircuitsProvidersPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersPartialUpdateParamsWithContext(ctx context.Context) *CircuitsProvidersPartialUpdateParams {
+ var ()
+ return &CircuitsProvidersPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersPartialUpdateParamsWithHTTPClient creates a new CircuitsProvidersPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersPartialUpdateParamsWithHTTPClient(client *http.Client) *CircuitsProvidersPartialUpdateParams {
+ var ()
+ return &CircuitsProvidersPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersPartialUpdateParams contains all the parameters to send to the API endpoint
+for the circuits providers partial update operation typically these are written to a http.Request
+*/
+type CircuitsProvidersPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableProvider
+ /*ID
+ A unique integer value identifying this provider.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) WithTimeout(timeout time.Duration) *CircuitsProvidersPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) WithContext(ctx context.Context) *CircuitsProvidersPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) WithHTTPClient(client *http.Client) *CircuitsProvidersPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) SetData(data *models.WritableProvider) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) WithID(id int64) *CircuitsProvidersPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits providers partial update params
+func (o *CircuitsProvidersPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go
new file mode 100644
index 0000000..55ca289
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersPartialUpdateReader is a Reader for the CircuitsProvidersPartialUpdate structure.
+type CircuitsProvidersPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsProvidersPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersPartialUpdateOK creates a CircuitsProvidersPartialUpdateOK with default headers values
+func NewCircuitsProvidersPartialUpdateOK() *CircuitsProvidersPartialUpdateOK {
+ return &CircuitsProvidersPartialUpdateOK{}
+}
+
+/*CircuitsProvidersPartialUpdateOK handles this case with default header values.
+
+CircuitsProvidersPartialUpdateOK circuits providers partial update o k
+*/
+type CircuitsProvidersPartialUpdateOK struct {
+ Payload *models.WritableProvider
+}
+
+func (o *CircuitsProvidersPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /circuits/providers/{id}/][%d] circuitsProvidersPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsProvidersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableProvider)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_parameters.go
new file mode 100644
index 0000000..4fa0f3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewCircuitsProvidersReadParams creates a new CircuitsProvidersReadParams object
+// with the default values initialized.
+func NewCircuitsProvidersReadParams() *CircuitsProvidersReadParams {
+ var ()
+ return &CircuitsProvidersReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersReadParamsWithTimeout creates a new CircuitsProvidersReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersReadParamsWithTimeout(timeout time.Duration) *CircuitsProvidersReadParams {
+ var ()
+ return &CircuitsProvidersReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersReadParamsWithContext creates a new CircuitsProvidersReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersReadParamsWithContext(ctx context.Context) *CircuitsProvidersReadParams {
+ var ()
+ return &CircuitsProvidersReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersReadParamsWithHTTPClient creates a new CircuitsProvidersReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersReadParamsWithHTTPClient(client *http.Client) *CircuitsProvidersReadParams {
+ var ()
+ return &CircuitsProvidersReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersReadParams contains all the parameters to send to the API endpoint
+for the circuits providers read operation typically these are written to a http.Request
+*/
+type CircuitsProvidersReadParams struct {
+
+ /*ID
+ A unique integer value identifying this provider.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers read params
+func (o *CircuitsProvidersReadParams) WithTimeout(timeout time.Duration) *CircuitsProvidersReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers read params
+func (o *CircuitsProvidersReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers read params
+func (o *CircuitsProvidersReadParams) WithContext(ctx context.Context) *CircuitsProvidersReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers read params
+func (o *CircuitsProvidersReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers read params
+func (o *CircuitsProvidersReadParams) WithHTTPClient(client *http.Client) *CircuitsProvidersReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers read params
+func (o *CircuitsProvidersReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the circuits providers read params
+func (o *CircuitsProvidersReadParams) WithID(id int64) *CircuitsProvidersReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits providers read params
+func (o *CircuitsProvidersReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go
new file mode 100644
index 0000000..d62098f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersReadReader is a Reader for the CircuitsProvidersRead structure.
+type CircuitsProvidersReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsProvidersReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersReadOK creates a CircuitsProvidersReadOK with default headers values
+func NewCircuitsProvidersReadOK() *CircuitsProvidersReadOK {
+ return &CircuitsProvidersReadOK{}
+}
+
+/*CircuitsProvidersReadOK handles this case with default header values.
+
+CircuitsProvidersReadOK circuits providers read o k
+*/
+type CircuitsProvidersReadOK struct {
+ Payload *models.Provider
+}
+
+func (o *CircuitsProvidersReadOK) Error() string {
+ return fmt.Sprintf("[GET /circuits/providers/{id}/][%d] circuitsProvidersReadOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsProvidersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Provider)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_parameters.go
new file mode 100644
index 0000000..671c5fd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewCircuitsProvidersUpdateParams creates a new CircuitsProvidersUpdateParams object
+// with the default values initialized.
+func NewCircuitsProvidersUpdateParams() *CircuitsProvidersUpdateParams {
+ var ()
+ return &CircuitsProvidersUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewCircuitsProvidersUpdateParamsWithTimeout creates a new CircuitsProvidersUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewCircuitsProvidersUpdateParamsWithTimeout(timeout time.Duration) *CircuitsProvidersUpdateParams {
+ var ()
+ return &CircuitsProvidersUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewCircuitsProvidersUpdateParamsWithContext creates a new CircuitsProvidersUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewCircuitsProvidersUpdateParamsWithContext(ctx context.Context) *CircuitsProvidersUpdateParams {
+ var ()
+ return &CircuitsProvidersUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewCircuitsProvidersUpdateParamsWithHTTPClient creates a new CircuitsProvidersUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewCircuitsProvidersUpdateParamsWithHTTPClient(client *http.Client) *CircuitsProvidersUpdateParams {
+ var ()
+ return &CircuitsProvidersUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*CircuitsProvidersUpdateParams contains all the parameters to send to the API endpoint
+for the circuits providers update operation typically these are written to a http.Request
+*/
+type CircuitsProvidersUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableProvider
+ /*ID
+ A unique integer value identifying this provider.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) WithTimeout(timeout time.Duration) *CircuitsProvidersUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) WithContext(ctx context.Context) *CircuitsProvidersUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) WithHTTPClient(client *http.Client) *CircuitsProvidersUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) SetData(data *models.WritableProvider) {
+ o.Data = data
+}
+
+// WithID adds the id to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) WithID(id int64) *CircuitsProvidersUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the circuits providers update params
+func (o *CircuitsProvidersUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *CircuitsProvidersUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go
new file mode 100644
index 0000000..befd105
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsProvidersUpdateReader is a Reader for the CircuitsProvidersUpdate structure.
+type CircuitsProvidersUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsProvidersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewCircuitsProvidersUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewCircuitsProvidersUpdateOK creates a CircuitsProvidersUpdateOK with default headers values
+func NewCircuitsProvidersUpdateOK() *CircuitsProvidersUpdateOK {
+ return &CircuitsProvidersUpdateOK{}
+}
+
+/*CircuitsProvidersUpdateOK handles this case with default header values.
+
+CircuitsProvidersUpdateOK circuits providers update o k
+*/
+type CircuitsProvidersUpdateOK struct {
+ Payload *models.WritableProvider
+}
+
+func (o *CircuitsProvidersUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /circuits/providers/{id}/][%d] circuitsProvidersUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *CircuitsProvidersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableProvider)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go
new file mode 100644
index 0000000..675a843
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimChoicesListParams creates a new DcimChoicesListParams object
+// with the default values initialized.
+func NewDcimChoicesListParams() *DcimChoicesListParams {
+
+ return &DcimChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimChoicesListParamsWithTimeout creates a new DcimChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimChoicesListParamsWithTimeout(timeout time.Duration) *DcimChoicesListParams {
+
+ return &DcimChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimChoicesListParamsWithContext creates a new DcimChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimChoicesListParamsWithContext(ctx context.Context) *DcimChoicesListParams {
+
+ return &DcimChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimChoicesListParamsWithHTTPClient creates a new DcimChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimChoicesListParamsWithHTTPClient(client *http.Client) *DcimChoicesListParams {
+
+ return &DcimChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimChoicesListParams contains all the parameters to send to the API endpoint
+for the dcim choices list operation typically these are written to a http.Request
+*/
+type DcimChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim choices list params
+func (o *DcimChoicesListParams) WithTimeout(timeout time.Duration) *DcimChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim choices list params
+func (o *DcimChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim choices list params
+func (o *DcimChoicesListParams) WithContext(ctx context.Context) *DcimChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim choices list params
+func (o *DcimChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim choices list params
+func (o *DcimChoicesListParams) WithHTTPClient(client *http.Client) *DcimChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim choices list params
+func (o *DcimChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_responses.go
new file mode 100644
index 0000000..cf40dbc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimChoicesListReader is a Reader for the DcimChoicesList structure.
+type DcimChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimChoicesListOK creates a DcimChoicesListOK with default headers values
+func NewDcimChoicesListOK() *DcimChoicesListOK {
+ return &DcimChoicesListOK{}
+}
+
+/*DcimChoicesListOK handles this case with default header values.
+
+DcimChoicesListOK dcim choices list o k
+*/
+type DcimChoicesListOK struct {
+}
+
+func (o *DcimChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/_choices/][%d] dcimChoicesListOK ", 200)
+}
+
+func (o *DcimChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go
new file mode 100644
index 0000000..f0757bd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimChoicesReadParams creates a new DcimChoicesReadParams object
+// with the default values initialized.
+func NewDcimChoicesReadParams() *DcimChoicesReadParams {
+ var ()
+ return &DcimChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimChoicesReadParamsWithTimeout creates a new DcimChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimChoicesReadParamsWithTimeout(timeout time.Duration) *DcimChoicesReadParams {
+ var ()
+ return &DcimChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimChoicesReadParamsWithContext creates a new DcimChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimChoicesReadParamsWithContext(ctx context.Context) *DcimChoicesReadParams {
+ var ()
+ return &DcimChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimChoicesReadParamsWithHTTPClient creates a new DcimChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimChoicesReadParamsWithHTTPClient(client *http.Client) *DcimChoicesReadParams {
+ var ()
+ return &DcimChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimChoicesReadParams contains all the parameters to send to the API endpoint
+for the dcim choices read operation typically these are written to a http.Request
+*/
+type DcimChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim choices read params
+func (o *DcimChoicesReadParams) WithTimeout(timeout time.Duration) *DcimChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim choices read params
+func (o *DcimChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim choices read params
+func (o *DcimChoicesReadParams) WithContext(ctx context.Context) *DcimChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim choices read params
+func (o *DcimChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim choices read params
+func (o *DcimChoicesReadParams) WithHTTPClient(client *http.Client) *DcimChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim choices read params
+func (o *DcimChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim choices read params
+func (o *DcimChoicesReadParams) WithID(id string) *DcimChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim choices read params
+func (o *DcimChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go
new file mode 100644
index 0000000..ca9b7c0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimChoicesReadReader is a Reader for the DcimChoicesRead structure.
+type DcimChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimChoicesReadOK creates a DcimChoicesReadOK with default headers values
+func NewDcimChoicesReadOK() *DcimChoicesReadOK {
+ return &DcimChoicesReadOK{}
+}
+
+/*DcimChoicesReadOK handles this case with default header values.
+
+DcimChoicesReadOK dcim choices read o k
+*/
+type DcimChoicesReadOK struct {
+}
+
+func (o *DcimChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/_choices/{id}/][%d] dcimChoicesReadOK ", 200)
+}
+
+func (o *DcimChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_client.go
new file mode 100644
index 0000000..4f088b8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_client.go
@@ -0,0 +1,4834 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new dcim API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for dcim API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+DcimChoicesList dcim choices list API
+*/
+func (a *Client) DcimChoicesList(params *DcimChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim__choices_list",
+ Method: "GET",
+ PathPattern: "/dcim/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimChoicesListOK), nil
+
+}
+
+/*
+DcimChoicesRead dcim choices read API
+*/
+func (a *Client) DcimChoicesRead(params *DcimChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim__choices_read",
+ Method: "GET",
+ PathPattern: "/dcim/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimChoicesReadOK), nil
+
+}
+
+/*
+DcimConnectedDeviceList This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer
+interface. This is useful in a situation where a device boots with no configuration, but can detect its neighbors
+via a protocol such as LLDP. Two query parameters must be included in the request:
+
+* `peer-device`: The name of the peer device
+* `peer-interface`: The name of the peer interface
+*/
+func (a *Client) DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConnectedDeviceListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConnectedDeviceListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_connected-device_list",
+ Method: "GET",
+ PathPattern: "/dcim/connected-device/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConnectedDeviceListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConnectedDeviceListOK), nil
+
+}
+
+/*
+DcimConsoleConnectionsList dcim console connections list API
+*/
+func (a *Client) DcimConsoleConnectionsList(params *DcimConsoleConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleConnectionsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleConnectionsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-connections_list",
+ Method: "GET",
+ PathPattern: "/dcim/console-connections/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleConnectionsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleConnectionsListOK), nil
+
+}
+
+/*
+DcimConsolePortTemplatesCreate dcim console port templates create API
+*/
+func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/console-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimConsolePortTemplatesDelete dcim console port templates delete API
+*/
+func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/console-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimConsolePortTemplatesList dcim console port templates list API
+*/
+func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/console-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesListOK), nil
+
+}
+
+/*
+DcimConsolePortTemplatesPartialUpdate dcim console port templates partial update API
+*/
+func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/console-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimConsolePortTemplatesRead dcim console port templates read API
+*/
+func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/console-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesReadOK), nil
+
+}
+
+/*
+DcimConsolePortTemplatesUpdate dcim console port templates update API
+*/
+func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-port-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/console-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimConsolePortsCreate dcim console ports create API
+*/
+func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_create",
+ Method: "POST",
+ PathPattern: "/dcim/console-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsCreateCreated), nil
+
+}
+
+/*
+DcimConsolePortsDelete dcim console ports delete API
+*/
+func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/console-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsDeleteNoContent), nil
+
+}
+
+/*
+DcimConsolePortsList dcim console ports list API
+*/
+func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_list",
+ Method: "GET",
+ PathPattern: "/dcim/console-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsListOK), nil
+
+}
+
+/*
+DcimConsolePortsPartialUpdate dcim console ports partial update API
+*/
+func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/console-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsPartialUpdateOK), nil
+
+}
+
+/*
+DcimConsolePortsRead dcim console ports read API
+*/
+func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_read",
+ Method: "GET",
+ PathPattern: "/dcim/console-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsReadOK), nil
+
+}
+
+/*
+DcimConsolePortsUpdate dcim console ports update API
+*/
+func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsolePortsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-ports_update",
+ Method: "PUT",
+ PathPattern: "/dcim/console-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsolePortsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsolePortsUpdateOK), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesCreate dcim console server port templates create API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/console-server-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesDelete dcim console server port templates delete API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/console-server-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesList dcim console server port templates list API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/console-server-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesListOK), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesPartialUpdate dcim console server port templates partial update API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsoleServerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/console-server-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesRead dcim console server port templates read API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/console-server-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesReadOK), nil
+
+}
+
+/*
+DcimConsoleServerPortTemplatesUpdate dcim console server port templates update API
+*/
+func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-port-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/console-server-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimConsoleServerPortsCreate dcim console server ports create API
+*/
+func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_create",
+ Method: "POST",
+ PathPattern: "/dcim/console-server-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsCreateCreated), nil
+
+}
+
+/*
+DcimConsoleServerPortsDelete dcim console server ports delete API
+*/
+func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/console-server-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsDeleteNoContent), nil
+
+}
+
+/*
+DcimConsoleServerPortsList dcim console server ports list API
+*/
+func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_list",
+ Method: "GET",
+ PathPattern: "/dcim/console-server-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsListOK), nil
+
+}
+
+/*
+DcimConsoleServerPortsPartialUpdate dcim console server ports partial update API
+*/
+func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/console-server-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsPartialUpdateOK), nil
+
+}
+
+/*
+DcimConsoleServerPortsRead dcim console server ports read API
+*/
+func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_read",
+ Method: "GET",
+ PathPattern: "/dcim/console-server-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsReadOK), nil
+
+}
+
+/*
+DcimConsoleServerPortsUpdate dcim console server ports update API
+*/
+func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimConsoleServerPortsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_console-server-ports_update",
+ Method: "PUT",
+ PathPattern: "/dcim/console-server-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimConsoleServerPortsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimConsoleServerPortsUpdateOK), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesCreate dcim device bay templates create API
+*/
+func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/device-bay-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesDelete dcim device bay templates delete API
+*/
+func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/device-bay-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesList dcim device bay templates list API
+*/
+func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/device-bay-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesListOK), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesPartialUpdate dcim device bay templates partial update API
+*/
+func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/device-bay-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesRead dcim device bay templates read API
+*/
+func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/device-bay-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesReadOK), nil
+
+}
+
+/*
+DcimDeviceBayTemplatesUpdate dcim device bay templates update API
+*/
+func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBayTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bay-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/device-bay-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBayTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBayTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimDeviceBaysCreate dcim device bays create API
+*/
+func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_create",
+ Method: "POST",
+ PathPattern: "/dcim/device-bays/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysCreateCreated), nil
+
+}
+
+/*
+DcimDeviceBaysDelete dcim device bays delete API
+*/
+func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/device-bays/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysDeleteNoContent), nil
+
+}
+
+/*
+DcimDeviceBaysList dcim device bays list API
+*/
+func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_list",
+ Method: "GET",
+ PathPattern: "/dcim/device-bays/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysListOK), nil
+
+}
+
+/*
+DcimDeviceBaysPartialUpdate dcim device bays partial update API
+*/
+func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/device-bays/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysPartialUpdateOK), nil
+
+}
+
+/*
+DcimDeviceBaysRead dcim device bays read API
+*/
+func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_read",
+ Method: "GET",
+ PathPattern: "/dcim/device-bays/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysReadOK), nil
+
+}
+
+/*
+DcimDeviceBaysUpdate dcim device bays update API
+*/
+func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceBaysUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-bays_update",
+ Method: "PUT",
+ PathPattern: "/dcim/device-bays/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceBaysUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceBaysUpdateOK), nil
+
+}
+
+/*
+DcimDeviceRolesCreate dcim device roles create API
+*/
+func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_create",
+ Method: "POST",
+ PathPattern: "/dcim/device-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesCreateCreated), nil
+
+}
+
+/*
+DcimDeviceRolesDelete dcim device roles delete API
+*/
+func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/device-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesDeleteNoContent), nil
+
+}
+
+/*
+DcimDeviceRolesList dcim device roles list API
+*/
+func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_list",
+ Method: "GET",
+ PathPattern: "/dcim/device-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesListOK), nil
+
+}
+
+/*
+DcimDeviceRolesPartialUpdate dcim device roles partial update API
+*/
+func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/device-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesPartialUpdateOK), nil
+
+}
+
+/*
+DcimDeviceRolesRead dcim device roles read API
+*/
+func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_read",
+ Method: "GET",
+ PathPattern: "/dcim/device-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesReadOK), nil
+
+}
+
+/*
+DcimDeviceRolesUpdate dcim device roles update API
+*/
+func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceRolesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-roles_update",
+ Method: "PUT",
+ PathPattern: "/dcim/device-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceRolesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceRolesUpdateOK), nil
+
+}
+
+/*
+DcimDeviceTypesCreate dcim device types create API
+*/
+func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_create",
+ Method: "POST",
+ PathPattern: "/dcim/device-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesCreateCreated), nil
+
+}
+
+/*
+DcimDeviceTypesDelete dcim device types delete API
+*/
+func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/device-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesDeleteNoContent), nil
+
+}
+
+/*
+DcimDeviceTypesList dcim device types list API
+*/
+func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_list",
+ Method: "GET",
+ PathPattern: "/dcim/device-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesListOK), nil
+
+}
+
+/*
+DcimDeviceTypesPartialUpdate dcim device types partial update API
+*/
+func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/device-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesPartialUpdateOK), nil
+
+}
+
+/*
+DcimDeviceTypesRead dcim device types read API
+*/
+func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_read",
+ Method: "GET",
+ PathPattern: "/dcim/device-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesReadOK), nil
+
+}
+
+/*
+DcimDeviceTypesUpdate dcim device types update API
+*/
+func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDeviceTypesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_device-types_update",
+ Method: "PUT",
+ PathPattern: "/dcim/device-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDeviceTypesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDeviceTypesUpdateOK), nil
+
+}
+
+/*
+DcimDevicesCreate dcim devices create API
+*/
+func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_create",
+ Method: "POST",
+ PathPattern: "/dcim/devices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesCreateCreated), nil
+
+}
+
+/*
+DcimDevicesDelete dcim devices delete API
+*/
+func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/devices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesDeleteNoContent), nil
+
+}
+
+/*
+DcimDevicesList dcim devices list API
+*/
+func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_list",
+ Method: "GET",
+ PathPattern: "/dcim/devices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesListOK), nil
+
+}
+
+/*
+DcimDevicesNapalm Execute a NAPALM method on a Device
+*/
+func (a *Client) DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesNapalmOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesNapalmParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_napalm",
+ Method: "GET",
+ PathPattern: "/dcim/devices/{id}/napalm/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesNapalmReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesNapalmOK), nil
+
+}
+
+/*
+DcimDevicesPartialUpdate dcim devices partial update API
+*/
+func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/devices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesPartialUpdateOK), nil
+
+}
+
+/*
+DcimDevicesRead dcim devices read API
+*/
+func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_read",
+ Method: "GET",
+ PathPattern: "/dcim/devices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesReadOK), nil
+
+}
+
+/*
+DcimDevicesUpdate dcim devices update API
+*/
+func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimDevicesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_devices_update",
+ Method: "PUT",
+ PathPattern: "/dcim/devices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimDevicesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimDevicesUpdateOK), nil
+
+}
+
+/*
+DcimInterfaceConnectionsCreate dcim interface connections create API
+*/
+func (a *Client) DcimInterfaceConnectionsCreate(params *DcimInterfaceConnectionsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_create",
+ Method: "POST",
+ PathPattern: "/dcim/interface-connections/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsCreateCreated), nil
+
+}
+
+/*
+DcimInterfaceConnectionsDelete dcim interface connections delete API
+*/
+func (a *Client) DcimInterfaceConnectionsDelete(params *DcimInterfaceConnectionsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/interface-connections/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsDeleteNoContent), nil
+
+}
+
+/*
+DcimInterfaceConnectionsList dcim interface connections list API
+*/
+func (a *Client) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_list",
+ Method: "GET",
+ PathPattern: "/dcim/interface-connections/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsListOK), nil
+
+}
+
+/*
+DcimInterfaceConnectionsPartialUpdate dcim interface connections partial update API
+*/
+func (a *Client) DcimInterfaceConnectionsPartialUpdate(params *DcimInterfaceConnectionsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/interface-connections/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsPartialUpdateOK), nil
+
+}
+
+/*
+DcimInterfaceConnectionsRead dcim interface connections read API
+*/
+func (a *Client) DcimInterfaceConnectionsRead(params *DcimInterfaceConnectionsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_read",
+ Method: "GET",
+ PathPattern: "/dcim/interface-connections/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsReadOK), nil
+
+}
+
+/*
+DcimInterfaceConnectionsUpdate dcim interface connections update API
+*/
+func (a *Client) DcimInterfaceConnectionsUpdate(params *DcimInterfaceConnectionsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceConnectionsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-connections_update",
+ Method: "PUT",
+ PathPattern: "/dcim/interface-connections/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceConnectionsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceConnectionsUpdateOK), nil
+
+}
+
+/*
+DcimInterfaceTemplatesCreate dcim interface templates create API
+*/
+func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/interface-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimInterfaceTemplatesDelete dcim interface templates delete API
+*/
+func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/interface-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimInterfaceTemplatesList dcim interface templates list API
+*/
+func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/interface-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesListOK), nil
+
+}
+
+/*
+DcimInterfaceTemplatesPartialUpdate dcim interface templates partial update API
+*/
+func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/interface-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimInterfaceTemplatesRead dcim interface templates read API
+*/
+func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/interface-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesReadOK), nil
+
+}
+
+/*
+DcimInterfaceTemplatesUpdate dcim interface templates update API
+*/
+func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfaceTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interface-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/interface-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfaceTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfaceTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimInterfacesCreate dcim interfaces create API
+*/
+func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_create",
+ Method: "POST",
+ PathPattern: "/dcim/interfaces/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesCreateCreated), nil
+
+}
+
+/*
+DcimInterfacesDelete dcim interfaces delete API
+*/
+func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesDeleteNoContent), nil
+
+}
+
+/*
+DcimInterfacesGraphs A convenience method for rendering graphs for a particular interface.
+*/
+func (a *Client) DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesGraphsOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesGraphsParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_graphs",
+ Method: "GET",
+ PathPattern: "/dcim/interfaces/{id}/graphs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesGraphsReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesGraphsOK), nil
+
+}
+
+/*
+DcimInterfacesList dcim interfaces list API
+*/
+func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_list",
+ Method: "GET",
+ PathPattern: "/dcim/interfaces/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesListOK), nil
+
+}
+
+/*
+DcimInterfacesPartialUpdate dcim interfaces partial update API
+*/
+func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesPartialUpdateOK), nil
+
+}
+
+/*
+DcimInterfacesRead dcim interfaces read API
+*/
+func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_read",
+ Method: "GET",
+ PathPattern: "/dcim/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesReadOK), nil
+
+}
+
+/*
+DcimInterfacesUpdate dcim interfaces update API
+*/
+func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInterfacesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_interfaces_update",
+ Method: "PUT",
+ PathPattern: "/dcim/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInterfacesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInterfacesUpdateOK), nil
+
+}
+
+/*
+DcimInventoryItemsCreate dcim inventory items create API
+*/
+func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_create",
+ Method: "POST",
+ PathPattern: "/dcim/inventory-items/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsCreateCreated), nil
+
+}
+
+/*
+DcimInventoryItemsDelete dcim inventory items delete API
+*/
+func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/inventory-items/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsDeleteNoContent), nil
+
+}
+
+/*
+DcimInventoryItemsList dcim inventory items list API
+*/
+func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_list",
+ Method: "GET",
+ PathPattern: "/dcim/inventory-items/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsListOK), nil
+
+}
+
+/*
+DcimInventoryItemsPartialUpdate dcim inventory items partial update API
+*/
+func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/inventory-items/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsPartialUpdateOK), nil
+
+}
+
+/*
+DcimInventoryItemsRead dcim inventory items read API
+*/
+func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_read",
+ Method: "GET",
+ PathPattern: "/dcim/inventory-items/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsReadOK), nil
+
+}
+
+/*
+DcimInventoryItemsUpdate dcim inventory items update API
+*/
+func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimInventoryItemsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_inventory-items_update",
+ Method: "PUT",
+ PathPattern: "/dcim/inventory-items/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimInventoryItemsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimInventoryItemsUpdateOK), nil
+
+}
+
+/*
+DcimManufacturersCreate dcim manufacturers create API
+*/
+func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_create",
+ Method: "POST",
+ PathPattern: "/dcim/manufacturers/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersCreateCreated), nil
+
+}
+
+/*
+DcimManufacturersDelete dcim manufacturers delete API
+*/
+func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/manufacturers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersDeleteNoContent), nil
+
+}
+
+/*
+DcimManufacturersList dcim manufacturers list API
+*/
+func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_list",
+ Method: "GET",
+ PathPattern: "/dcim/manufacturers/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersListOK), nil
+
+}
+
+/*
+DcimManufacturersPartialUpdate dcim manufacturers partial update API
+*/
+func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/manufacturers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersPartialUpdateOK), nil
+
+}
+
+/*
+DcimManufacturersRead dcim manufacturers read API
+*/
+func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_read",
+ Method: "GET",
+ PathPattern: "/dcim/manufacturers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersReadOK), nil
+
+}
+
+/*
+DcimManufacturersUpdate dcim manufacturers update API
+*/
+func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimManufacturersUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_manufacturers_update",
+ Method: "PUT",
+ PathPattern: "/dcim/manufacturers/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimManufacturersUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimManufacturersUpdateOK), nil
+
+}
+
+/*
+DcimPlatformsCreate dcim platforms create API
+*/
+func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_create",
+ Method: "POST",
+ PathPattern: "/dcim/platforms/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsCreateCreated), nil
+
+}
+
+/*
+DcimPlatformsDelete dcim platforms delete API
+*/
+func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/platforms/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsDeleteNoContent), nil
+
+}
+
+/*
+DcimPlatformsList dcim platforms list API
+*/
+func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_list",
+ Method: "GET",
+ PathPattern: "/dcim/platforms/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsListOK), nil
+
+}
+
+/*
+DcimPlatformsPartialUpdate dcim platforms partial update API
+*/
+func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/platforms/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsPartialUpdateOK), nil
+
+}
+
+/*
+DcimPlatformsRead dcim platforms read API
+*/
+func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_read",
+ Method: "GET",
+ PathPattern: "/dcim/platforms/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsReadOK), nil
+
+}
+
+/*
+DcimPlatformsUpdate dcim platforms update API
+*/
+func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPlatformsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_platforms_update",
+ Method: "PUT",
+ PathPattern: "/dcim/platforms/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPlatformsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPlatformsUpdateOK), nil
+
+}
+
+/*
+DcimPowerConnectionsList dcim power connections list API
+*/
+func (a *Client) DcimPowerConnectionsList(params *DcimPowerConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerConnectionsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerConnectionsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-connections_list",
+ Method: "GET",
+ PathPattern: "/dcim/power-connections/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerConnectionsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerConnectionsListOK), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesCreate dcim power outlet templates create API
+*/
+func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/power-outlet-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesDelete dcim power outlet templates delete API
+*/
+func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/power-outlet-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesList dcim power outlet templates list API
+*/
+func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/power-outlet-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesListOK), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesPartialUpdate dcim power outlet templates partial update API
+*/
+func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/power-outlet-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesRead dcim power outlet templates read API
+*/
+func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/power-outlet-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesReadOK), nil
+
+}
+
+/*
+DcimPowerOutletTemplatesUpdate dcim power outlet templates update API
+*/
+func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlet-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/power-outlet-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimPowerOutletsCreate dcim power outlets create API
+*/
+func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_create",
+ Method: "POST",
+ PathPattern: "/dcim/power-outlets/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsCreateCreated), nil
+
+}
+
+/*
+DcimPowerOutletsDelete dcim power outlets delete API
+*/
+func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/power-outlets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsDeleteNoContent), nil
+
+}
+
+/*
+DcimPowerOutletsList dcim power outlets list API
+*/
+func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_list",
+ Method: "GET",
+ PathPattern: "/dcim/power-outlets/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsListOK), nil
+
+}
+
+/*
+DcimPowerOutletsPartialUpdate dcim power outlets partial update API
+*/
+func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/power-outlets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsPartialUpdateOK), nil
+
+}
+
+/*
+DcimPowerOutletsRead dcim power outlets read API
+*/
+func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_read",
+ Method: "GET",
+ PathPattern: "/dcim/power-outlets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsReadOK), nil
+
+}
+
+/*
+DcimPowerOutletsUpdate dcim power outlets update API
+*/
+func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerOutletsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-outlets_update",
+ Method: "PUT",
+ PathPattern: "/dcim/power-outlets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerOutletsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerOutletsUpdateOK), nil
+
+}
+
+/*
+DcimPowerPortTemplatesCreate dcim power port templates create API
+*/
+func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_create",
+ Method: "POST",
+ PathPattern: "/dcim/power-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesCreateCreated), nil
+
+}
+
+/*
+DcimPowerPortTemplatesDelete dcim power port templates delete API
+*/
+func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/power-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesDeleteNoContent), nil
+
+}
+
+/*
+DcimPowerPortTemplatesList dcim power port templates list API
+*/
+func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_list",
+ Method: "GET",
+ PathPattern: "/dcim/power-port-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesListOK), nil
+
+}
+
+/*
+DcimPowerPortTemplatesPartialUpdate dcim power port templates partial update API
+*/
+func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/power-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+DcimPowerPortTemplatesRead dcim power port templates read API
+*/
+func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_read",
+ Method: "GET",
+ PathPattern: "/dcim/power-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesReadOK), nil
+
+}
+
+/*
+DcimPowerPortTemplatesUpdate dcim power port templates update API
+*/
+func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-port-templates_update",
+ Method: "PUT",
+ PathPattern: "/dcim/power-port-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortTemplatesUpdateOK), nil
+
+}
+
+/*
+DcimPowerPortsCreate dcim power ports create API
+*/
+func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_create",
+ Method: "POST",
+ PathPattern: "/dcim/power-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsCreateCreated), nil
+
+}
+
+/*
+DcimPowerPortsDelete dcim power ports delete API
+*/
+func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/power-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsDeleteNoContent), nil
+
+}
+
+/*
+DcimPowerPortsList dcim power ports list API
+*/
+func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_list",
+ Method: "GET",
+ PathPattern: "/dcim/power-ports/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsListOK), nil
+
+}
+
+/*
+DcimPowerPortsPartialUpdate dcim power ports partial update API
+*/
+func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/power-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsPartialUpdateOK), nil
+
+}
+
+/*
+DcimPowerPortsRead dcim power ports read API
+*/
+func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_read",
+ Method: "GET",
+ PathPattern: "/dcim/power-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsReadOK), nil
+
+}
+
+/*
+DcimPowerPortsUpdate dcim power ports update API
+*/
+func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimPowerPortsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_power-ports_update",
+ Method: "PUT",
+ PathPattern: "/dcim/power-ports/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimPowerPortsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimPowerPortsUpdateOK), nil
+
+}
+
+/*
+DcimRackGroupsCreate dcim rack groups create API
+*/
+func (a *Client) DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_create",
+ Method: "POST",
+ PathPattern: "/dcim/rack-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsCreateCreated), nil
+
+}
+
+/*
+DcimRackGroupsDelete dcim rack groups delete API
+*/
+func (a *Client) DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/rack-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsDeleteNoContent), nil
+
+}
+
+/*
+DcimRackGroupsList dcim rack groups list API
+*/
+func (a *Client) DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_list",
+ Method: "GET",
+ PathPattern: "/dcim/rack-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsListOK), nil
+
+}
+
+/*
+DcimRackGroupsPartialUpdate dcim rack groups partial update API
+*/
+func (a *Client) DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/rack-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsPartialUpdateOK), nil
+
+}
+
+/*
+DcimRackGroupsRead dcim rack groups read API
+*/
+func (a *Client) DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_read",
+ Method: "GET",
+ PathPattern: "/dcim/rack-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsReadOK), nil
+
+}
+
+/*
+DcimRackGroupsUpdate dcim rack groups update API
+*/
+func (a *Client) DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackGroupsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-groups_update",
+ Method: "PUT",
+ PathPattern: "/dcim/rack-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackGroupsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackGroupsUpdateOK), nil
+
+}
+
+/*
+DcimRackReservationsCreate dcim rack reservations create API
+*/
+func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_create",
+ Method: "POST",
+ PathPattern: "/dcim/rack-reservations/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsCreateCreated), nil
+
+}
+
+/*
+DcimRackReservationsDelete dcim rack reservations delete API
+*/
+func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/rack-reservations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsDeleteNoContent), nil
+
+}
+
+/*
+DcimRackReservationsList dcim rack reservations list API
+*/
+func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_list",
+ Method: "GET",
+ PathPattern: "/dcim/rack-reservations/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsListOK), nil
+
+}
+
+/*
+DcimRackReservationsPartialUpdate dcim rack reservations partial update API
+*/
+func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/rack-reservations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsPartialUpdateOK), nil
+
+}
+
+/*
+DcimRackReservationsRead dcim rack reservations read API
+*/
+func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_read",
+ Method: "GET",
+ PathPattern: "/dcim/rack-reservations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsReadOK), nil
+
+}
+
+/*
+DcimRackReservationsUpdate dcim rack reservations update API
+*/
+func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackReservationsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-reservations_update",
+ Method: "PUT",
+ PathPattern: "/dcim/rack-reservations/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackReservationsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackReservationsUpdateOK), nil
+
+}
+
+/*
+DcimRackRolesCreate dcim rack roles create API
+*/
+func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_create",
+ Method: "POST",
+ PathPattern: "/dcim/rack-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesCreateCreated), nil
+
+}
+
+/*
+DcimRackRolesDelete dcim rack roles delete API
+*/
+func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/rack-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesDeleteNoContent), nil
+
+}
+
+/*
+DcimRackRolesList dcim rack roles list API
+*/
+func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_list",
+ Method: "GET",
+ PathPattern: "/dcim/rack-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesListOK), nil
+
+}
+
+/*
+DcimRackRolesPartialUpdate dcim rack roles partial update API
+*/
+func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/rack-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesPartialUpdateOK), nil
+
+}
+
+/*
+DcimRackRolesRead dcim rack roles read API
+*/
+func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_read",
+ Method: "GET",
+ PathPattern: "/dcim/rack-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesReadOK), nil
+
+}
+
+/*
+DcimRackRolesUpdate dcim rack roles update API
+*/
+func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRackRolesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_rack-roles_update",
+ Method: "PUT",
+ PathPattern: "/dcim/rack-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRackRolesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRackRolesUpdateOK), nil
+
+}
+
+/*
+DcimRacksCreate dcim racks create API
+*/
+func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_create",
+ Method: "POST",
+ PathPattern: "/dcim/racks/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksCreateCreated), nil
+
+}
+
+/*
+DcimRacksDelete dcim racks delete API
+*/
+func (a *Client) DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/racks/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksDeleteNoContent), nil
+
+}
+
+/*
+DcimRacksList dcim racks list API
+*/
+func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_list",
+ Method: "GET",
+ PathPattern: "/dcim/racks/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksListOK), nil
+
+}
+
+/*
+DcimRacksPartialUpdate dcim racks partial update API
+*/
+func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/racks/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksPartialUpdateOK), nil
+
+}
+
+/*
+DcimRacksRead dcim racks read API
+*/
+func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_read",
+ Method: "GET",
+ PathPattern: "/dcim/racks/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksReadOK), nil
+
+}
+
+/*
+DcimRacksUnits List rack units (by rack)
+*/
+func (a *Client) DcimRacksUnits(params *DcimRacksUnitsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUnitsOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksUnitsParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_units",
+ Method: "GET",
+ PathPattern: "/dcim/racks/{id}/units/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksUnitsReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksUnitsOK), nil
+
+}
+
+/*
+DcimRacksUpdate dcim racks update API
+*/
+func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRacksUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_racks_update",
+ Method: "PUT",
+ PathPattern: "/dcim/racks/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRacksUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRacksUpdateOK), nil
+
+}
+
+/*
+DcimRegionsCreate dcim regions create API
+*/
+func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_create",
+ Method: "POST",
+ PathPattern: "/dcim/regions/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsCreateCreated), nil
+
+}
+
+/*
+DcimRegionsDelete dcim regions delete API
+*/
+func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/regions/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsDeleteNoContent), nil
+
+}
+
+/*
+DcimRegionsList dcim regions list API
+*/
+func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_list",
+ Method: "GET",
+ PathPattern: "/dcim/regions/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsListOK), nil
+
+}
+
+/*
+DcimRegionsPartialUpdate dcim regions partial update API
+*/
+func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/regions/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsPartialUpdateOK), nil
+
+}
+
+/*
+DcimRegionsRead dcim regions read API
+*/
+func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_read",
+ Method: "GET",
+ PathPattern: "/dcim/regions/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsReadOK), nil
+
+}
+
+/*
+DcimRegionsUpdate dcim regions update API
+*/
+func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimRegionsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_regions_update",
+ Method: "PUT",
+ PathPattern: "/dcim/regions/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimRegionsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimRegionsUpdateOK), nil
+
+}
+
+/*
+DcimSitesCreate dcim sites create API
+*/
+func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_create",
+ Method: "POST",
+ PathPattern: "/dcim/sites/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesCreateCreated), nil
+
+}
+
+/*
+DcimSitesDelete dcim sites delete API
+*/
+func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/sites/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesDeleteNoContent), nil
+
+}
+
+/*
+DcimSitesGraphs A convenience method for rendering graphs for a particular site.
+*/
+func (a *Client) DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesGraphsOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesGraphsParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_graphs",
+ Method: "GET",
+ PathPattern: "/dcim/sites/{id}/graphs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesGraphsReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesGraphsOK), nil
+
+}
+
+/*
+DcimSitesList dcim sites list API
+*/
+func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_list",
+ Method: "GET",
+ PathPattern: "/dcim/sites/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesListOK), nil
+
+}
+
+/*
+DcimSitesPartialUpdate dcim sites partial update API
+*/
+func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/sites/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesPartialUpdateOK), nil
+
+}
+
+/*
+DcimSitesRead dcim sites read API
+*/
+func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_read",
+ Method: "GET",
+ PathPattern: "/dcim/sites/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesReadOK), nil
+
+}
+
+/*
+DcimSitesUpdate dcim sites update API
+*/
+func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimSitesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_sites_update",
+ Method: "PUT",
+ PathPattern: "/dcim/sites/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimSitesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimSitesUpdateOK), nil
+
+}
+
+/*
+DcimVirtualChassisCreate dcim virtual chassis create API
+*/
+func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_create",
+ Method: "POST",
+ PathPattern: "/dcim/virtual-chassis/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisCreateCreated), nil
+
+}
+
+/*
+DcimVirtualChassisDelete dcim virtual chassis delete API
+*/
+func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_delete",
+ Method: "DELETE",
+ PathPattern: "/dcim/virtual-chassis/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisDeleteNoContent), nil
+
+}
+
+/*
+DcimVirtualChassisList dcim virtual chassis list API
+*/
+func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_list",
+ Method: "GET",
+ PathPattern: "/dcim/virtual-chassis/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisListOK), nil
+
+}
+
+/*
+DcimVirtualChassisPartialUpdate dcim virtual chassis partial update API
+*/
+func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_partial_update",
+ Method: "PATCH",
+ PathPattern: "/dcim/virtual-chassis/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisPartialUpdateOK), nil
+
+}
+
+/*
+DcimVirtualChassisRead dcim virtual chassis read API
+*/
+func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_read",
+ Method: "GET",
+ PathPattern: "/dcim/virtual-chassis/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisReadOK), nil
+
+}
+
+/*
+DcimVirtualChassisUpdate dcim virtual chassis update API
+*/
+func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewDcimVirtualChassisUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "dcim_virtual-chassis_update",
+ Method: "PUT",
+ PathPattern: "/dcim/virtual-chassis/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &DcimVirtualChassisUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*DcimVirtualChassisUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_parameters.go
new file mode 100644
index 0000000..2524a3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_parameters.go
@@ -0,0 +1,180 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConnectedDeviceListParams creates a new DcimConnectedDeviceListParams object
+// with the default values initialized.
+func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams {
+ var ()
+ return &DcimConnectedDeviceListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConnectedDeviceListParamsWithTimeout creates a new DcimConnectedDeviceListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams {
+ var ()
+ return &DcimConnectedDeviceListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConnectedDeviceListParamsWithContext creates a new DcimConnectedDeviceListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConnectedDeviceListParams {
+ var ()
+ return &DcimConnectedDeviceListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConnectedDeviceListParamsWithHTTPClient creates a new DcimConnectedDeviceListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams {
+ var ()
+ return &DcimConnectedDeviceListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConnectedDeviceListParams contains all the parameters to send to the API endpoint
+for the dcim connected device list operation typically these are written to a http.Request
+*/
+type DcimConnectedDeviceListParams struct {
+
+ /*PeerDevice
+ The name of the peer device
+
+ */
+ PeerDevice string
+ /*PeerInterface
+ The name of the peer interface
+
+ */
+ PeerInterface string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) WithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) WithContext(ctx context.Context) *DcimConnectedDeviceListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) WithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithPeerDevice adds the peerDevice to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) WithPeerDevice(peerDevice string) *DcimConnectedDeviceListParams {
+ o.SetPeerDevice(peerDevice)
+ return o
+}
+
+// SetPeerDevice adds the peerDevice to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) SetPeerDevice(peerDevice string) {
+ o.PeerDevice = peerDevice
+}
+
+// WithPeerInterface adds the peerInterface to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) WithPeerInterface(peerInterface string) *DcimConnectedDeviceListParams {
+ o.SetPeerInterface(peerInterface)
+ return o
+}
+
+// SetPeerInterface adds the peerInterface to the dcim connected device list params
+func (o *DcimConnectedDeviceListParams) SetPeerInterface(peerInterface string) {
+ o.PeerInterface = peerInterface
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConnectedDeviceListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // query param peer-device
+ qrPeerDevice := o.PeerDevice
+ qPeerDevice := qrPeerDevice
+ if qPeerDevice != "" {
+ if err := r.SetQueryParam("peer-device", qPeerDevice); err != nil {
+ return err
+ }
+ }
+
+ // query param peer-interface
+ qrPeerInterface := o.PeerInterface
+ qPeerInterface := qrPeerInterface
+ if qPeerInterface != "" {
+ if err := r.SetQueryParam("peer-interface", qPeerInterface); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go
new file mode 100644
index 0000000..2aada3c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConnectedDeviceListReader is a Reader for the DcimConnectedDeviceList structure.
+type DcimConnectedDeviceListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConnectedDeviceListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConnectedDeviceListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConnectedDeviceListOK creates a DcimConnectedDeviceListOK with default headers values
+func NewDcimConnectedDeviceListOK() *DcimConnectedDeviceListOK {
+ return &DcimConnectedDeviceListOK{}
+}
+
+/*DcimConnectedDeviceListOK handles this case with default header values.
+
+DcimConnectedDeviceListOK dcim connected device list o k
+*/
+type DcimConnectedDeviceListOK struct {
+ Payload *models.Device
+}
+
+func (o *DcimConnectedDeviceListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConnectedDeviceListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Device)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_parameters.go
new file mode 100644
index 0000000..63185cf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleConnectionsListParams creates a new DcimConsoleConnectionsListParams object
+// with the default values initialized.
+func NewDcimConsoleConnectionsListParams() *DcimConsoleConnectionsListParams {
+ var ()
+ return &DcimConsoleConnectionsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleConnectionsListParamsWithTimeout creates a new DcimConsoleConnectionsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleConnectionsListParamsWithTimeout(timeout time.Duration) *DcimConsoleConnectionsListParams {
+ var ()
+ return &DcimConsoleConnectionsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleConnectionsListParamsWithContext creates a new DcimConsoleConnectionsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleConnectionsListParamsWithContext(ctx context.Context) *DcimConsoleConnectionsListParams {
+ var ()
+ return &DcimConsoleConnectionsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleConnectionsListParamsWithHTTPClient creates a new DcimConsoleConnectionsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleConnectionsListParamsWithHTTPClient(client *http.Client) *DcimConsoleConnectionsListParams {
+ var ()
+ return &DcimConsoleConnectionsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleConnectionsListParams contains all the parameters to send to the API endpoint
+for the dcim console connections list operation typically these are written to a http.Request
+*/
+type DcimConsoleConnectionsListParams struct {
+
+ /*ConnectionStatus*/
+ ConnectionStatus *string
+ /*Device*/
+ Device *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithTimeout(timeout time.Duration) *DcimConsoleConnectionsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithContext(ctx context.Context) *DcimConsoleConnectionsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithHTTPClient(client *http.Client) *DcimConsoleConnectionsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithConnectionStatus adds the connectionStatus to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithConnectionStatus(connectionStatus *string) *DcimConsoleConnectionsListParams {
+ o.SetConnectionStatus(connectionStatus)
+ return o
+}
+
+// SetConnectionStatus adds the connectionStatus to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetConnectionStatus(connectionStatus *string) {
+ o.ConnectionStatus = connectionStatus
+}
+
+// WithDevice adds the device to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithDevice(device *string) *DcimConsoleConnectionsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithLimit adds the limit to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithLimit(limit *int64) *DcimConsoleConnectionsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithName(name *string) *DcimConsoleConnectionsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithOffset(offset *int64) *DcimConsoleConnectionsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) WithSite(site *string) *DcimConsoleConnectionsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim console connections list params
+func (o *DcimConsoleConnectionsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.ConnectionStatus != nil {
+
+ // query param connection_status
+ var qrConnectionStatus string
+ if o.ConnectionStatus != nil {
+ qrConnectionStatus = *o.ConnectionStatus
+ }
+ qConnectionStatus := qrConnectionStatus
+ if qConnectionStatus != "" {
+ if err := r.SetQueryParam("connection_status", qConnectionStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go
new file mode 100644
index 0000000..e909386
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleConnectionsListReader is a Reader for the DcimConsoleConnectionsList structure.
+type DcimConsoleConnectionsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleConnectionsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleConnectionsListOK creates a DcimConsoleConnectionsListOK with default headers values
+func NewDcimConsoleConnectionsListOK() *DcimConsoleConnectionsListOK {
+ return &DcimConsoleConnectionsListOK{}
+}
+
+/*DcimConsoleConnectionsListOK handles this case with default header values.
+
+DcimConsoleConnectionsListOK dcim console connections list o k
+*/
+type DcimConsoleConnectionsListOK struct {
+ Payload *models.DcimConsoleConnectionsListOKBody
+}
+
+func (o *DcimConsoleConnectionsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-connections/][%d] dcimConsoleConnectionsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimConsoleConnectionsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_parameters.go
new file mode 100644
index 0000000..e6fd658
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortTemplatesCreateParams creates a new DcimConsolePortTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesCreateParams() *DcimConsolePortTemplatesCreateParams {
+ var ()
+ return &DcimConsolePortTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesCreateParamsWithTimeout creates a new DcimConsolePortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesCreateParams {
+ var ()
+ return &DcimConsolePortTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesCreateParamsWithContext creates a new DcimConsolePortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesCreateParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesCreateParams {
+ var ()
+ return &DcimConsolePortTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesCreateParamsWithHTTPClient creates a new DcimConsolePortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesCreateParams {
+ var ()
+ return &DcimConsolePortTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim console port templates create operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePortTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) WithData(data *models.WritableConsolePortTemplate) *DcimConsolePortTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console port templates create params
+func (o *DcimConsolePortTemplatesCreateParams) SetData(data *models.WritableConsolePortTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go
new file mode 100644
index 0000000..79d2eca
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortTemplatesCreateReader is a Reader for the DcimConsolePortTemplatesCreate structure.
+type DcimConsolePortTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimConsolePortTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesCreateCreated creates a DcimConsolePortTemplatesCreateCreated with default headers values
+func NewDcimConsolePortTemplatesCreateCreated() *DcimConsolePortTemplatesCreateCreated {
+ return &DcimConsolePortTemplatesCreateCreated{}
+}
+
+/*DcimConsolePortTemplatesCreateCreated handles this case with default header values.
+
+DcimConsolePortTemplatesCreateCreated dcim console port templates create created
+*/
+type DcimConsolePortTemplatesCreateCreated struct {
+ Payload *models.WritableConsolePortTemplate
+}
+
+func (o *DcimConsolePortTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/console-port-templates/][%d] dcimConsolePortTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimConsolePortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go
new file mode 100644
index 0000000..1b1b898
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortTemplatesDeleteParams creates a new DcimConsolePortTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesDeleteParams() *DcimConsolePortTemplatesDeleteParams {
+ var ()
+ return &DcimConsolePortTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesDeleteParamsWithTimeout creates a new DcimConsolePortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesDeleteParams {
+ var ()
+ return &DcimConsolePortTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesDeleteParamsWithContext creates a new DcimConsolePortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesDeleteParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesDeleteParams {
+ var ()
+ return &DcimConsolePortTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesDeleteParamsWithHTTPClient creates a new DcimConsolePortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesDeleteParams {
+ var ()
+ return &DcimConsolePortTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim console port templates delete operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this console port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) WithID(id int64) *DcimConsolePortTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console port templates delete params
+func (o *DcimConsolePortTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go
new file mode 100644
index 0000000..60f7f0a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimConsolePortTemplatesDeleteReader is a Reader for the DcimConsolePortTemplatesDelete structure.
+type DcimConsolePortTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimConsolePortTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesDeleteNoContent creates a DcimConsolePortTemplatesDeleteNoContent with default headers values
+func NewDcimConsolePortTemplatesDeleteNoContent() *DcimConsolePortTemplatesDeleteNoContent {
+ return &DcimConsolePortTemplatesDeleteNoContent{}
+}
+
+/*DcimConsolePortTemplatesDeleteNoContent handles this case with default header values.
+
+DcimConsolePortTemplatesDeleteNoContent dcim console port templates delete no content
+*/
+type DcimConsolePortTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimConsolePortTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimConsolePortTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_parameters.go
new file mode 100644
index 0000000..3ed60c0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortTemplatesListParams creates a new DcimConsolePortTemplatesListParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesListParams() *DcimConsolePortTemplatesListParams {
+ var ()
+ return &DcimConsolePortTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesListParamsWithTimeout creates a new DcimConsolePortTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesListParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesListParams {
+ var ()
+ return &DcimConsolePortTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesListParamsWithContext creates a new DcimConsolePortTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesListParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesListParams {
+ var ()
+ return &DcimConsolePortTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesListParamsWithHTTPClient creates a new DcimConsolePortTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesListParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesListParams {
+ var ()
+ return &DcimConsolePortTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim console port templates list operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimConsolePortTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithLimit adds the limit to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithLimit(limit *int64) *DcimConsolePortTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithName(name *string) *DcimConsolePortTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) WithOffset(offset *int64) *DcimConsolePortTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim console port templates list params
+func (o *DcimConsolePortTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go
new file mode 100644
index 0000000..84e206b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortTemplatesListReader is a Reader for the DcimConsolePortTemplatesList structure.
+type DcimConsolePortTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesListOK creates a DcimConsolePortTemplatesListOK with default headers values
+func NewDcimConsolePortTemplatesListOK() *DcimConsolePortTemplatesListOK {
+ return &DcimConsolePortTemplatesListOK{}
+}
+
+/*DcimConsolePortTemplatesListOK handles this case with default header values.
+
+DcimConsolePortTemplatesListOK dcim console port templates list o k
+*/
+type DcimConsolePortTemplatesListOK struct {
+ Payload *models.DcimConsolePortTemplatesListOKBody
+}
+
+func (o *DcimConsolePortTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-port-templates/][%d] dcimConsolePortTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimConsolePortTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go
new file mode 100644
index 0000000..652250e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortTemplatesPartialUpdateParams creates a new DcimConsolePortTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesPartialUpdateParams() *DcimConsolePortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesPartialUpdateParamsWithTimeout creates a new DcimConsolePortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesPartialUpdateParamsWithContext creates a new DcimConsolePortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimConsolePortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console port templates partial update operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePortTemplate
+ /*ID
+ A unique integer value identifying this console port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WithData(data *models.WritableConsolePortTemplate) *DcimConsolePortTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) SetData(data *models.WritableConsolePortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WithID(id int64) *DcimConsolePortTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console port templates partial update params
+func (o *DcimConsolePortTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go
new file mode 100644
index 0000000..1f49cc3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortTemplatesPartialUpdateReader is a Reader for the DcimConsolePortTemplatesPartialUpdate structure.
+type DcimConsolePortTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesPartialUpdateOK creates a DcimConsolePortTemplatesPartialUpdateOK with default headers values
+func NewDcimConsolePortTemplatesPartialUpdateOK() *DcimConsolePortTemplatesPartialUpdateOK {
+ return &DcimConsolePortTemplatesPartialUpdateOK{}
+}
+
+/*DcimConsolePortTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimConsolePortTemplatesPartialUpdateOK dcim console port templates partial update o k
+*/
+type DcimConsolePortTemplatesPartialUpdateOK struct {
+ Payload *models.WritableConsolePortTemplate
+}
+
+func (o *DcimConsolePortTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_parameters.go
new file mode 100644
index 0000000..491c4b3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortTemplatesReadParams creates a new DcimConsolePortTemplatesReadParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesReadParams() *DcimConsolePortTemplatesReadParams {
+ var ()
+ return &DcimConsolePortTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesReadParamsWithTimeout creates a new DcimConsolePortTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesReadParams {
+ var ()
+ return &DcimConsolePortTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesReadParamsWithContext creates a new DcimConsolePortTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesReadParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesReadParams {
+ var ()
+ return &DcimConsolePortTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesReadParamsWithHTTPClient creates a new DcimConsolePortTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesReadParams {
+ var ()
+ return &DcimConsolePortTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim console port templates read operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this console port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) WithID(id int64) *DcimConsolePortTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console port templates read params
+func (o *DcimConsolePortTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go
new file mode 100644
index 0000000..1ccc3d0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortTemplatesReadReader is a Reader for the DcimConsolePortTemplatesRead structure.
+type DcimConsolePortTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesReadOK creates a DcimConsolePortTemplatesReadOK with default headers values
+func NewDcimConsolePortTemplatesReadOK() *DcimConsolePortTemplatesReadOK {
+ return &DcimConsolePortTemplatesReadOK{}
+}
+
+/*DcimConsolePortTemplatesReadOK handles this case with default header values.
+
+DcimConsolePortTemplatesReadOK dcim console port templates read o k
+*/
+type DcimConsolePortTemplatesReadOK struct {
+ Payload *models.ConsolePortTemplate
+}
+
+func (o *DcimConsolePortTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ConsolePortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_parameters.go
new file mode 100644
index 0000000..db9a5bd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortTemplatesUpdateParams creates a new DcimConsolePortTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimConsolePortTemplatesUpdateParams() *DcimConsolePortTemplatesUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesUpdateParamsWithTimeout creates a new DcimConsolePortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimConsolePortTemplatesUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortTemplatesUpdateParamsWithContext creates a new DcimConsolePortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortTemplatesUpdateParamsWithContext(ctx context.Context) *DcimConsolePortTemplatesUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortTemplatesUpdateParamsWithHTTPClient creates a new DcimConsolePortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimConsolePortTemplatesUpdateParams {
+ var ()
+ return &DcimConsolePortTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console port templates update operation typically these are written to a http.Request
+*/
+type DcimConsolePortTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePortTemplate
+ /*ID
+ A unique integer value identifying this console port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimConsolePortTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) WithContext(ctx context.Context) *DcimConsolePortTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimConsolePortTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) WithData(data *models.WritableConsolePortTemplate) *DcimConsolePortTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) SetData(data *models.WritableConsolePortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) WithID(id int64) *DcimConsolePortTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console port templates update params
+func (o *DcimConsolePortTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go
new file mode 100644
index 0000000..ffc6eee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortTemplatesUpdateReader is a Reader for the DcimConsolePortTemplatesUpdate structure.
+type DcimConsolePortTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortTemplatesUpdateOK creates a DcimConsolePortTemplatesUpdateOK with default headers values
+func NewDcimConsolePortTemplatesUpdateOK() *DcimConsolePortTemplatesUpdateOK {
+ return &DcimConsolePortTemplatesUpdateOK{}
+}
+
+/*DcimConsolePortTemplatesUpdateOK handles this case with default header values.
+
+DcimConsolePortTemplatesUpdateOK dcim console port templates update o k
+*/
+type DcimConsolePortTemplatesUpdateOK struct {
+ Payload *models.WritableConsolePortTemplate
+}
+
+func (o *DcimConsolePortTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/console-port-templates/{id}/][%d] dcimConsolePortTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_parameters.go
new file mode 100644
index 0000000..bc29311
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortsCreateParams creates a new DcimConsolePortsCreateParams object
+// with the default values initialized.
+func NewDcimConsolePortsCreateParams() *DcimConsolePortsCreateParams {
+ var ()
+ return &DcimConsolePortsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsCreateParamsWithTimeout creates a new DcimConsolePortsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsCreateParamsWithTimeout(timeout time.Duration) *DcimConsolePortsCreateParams {
+ var ()
+ return &DcimConsolePortsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsCreateParamsWithContext creates a new DcimConsolePortsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsCreateParamsWithContext(ctx context.Context) *DcimConsolePortsCreateParams {
+ var ()
+ return &DcimConsolePortsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsCreateParamsWithHTTPClient creates a new DcimConsolePortsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsCreateParamsWithHTTPClient(client *http.Client) *DcimConsolePortsCreateParams {
+ var ()
+ return &DcimConsolePortsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsCreateParams contains all the parameters to send to the API endpoint
+for the dcim console ports create operation typically these are written to a http.Request
+*/
+type DcimConsolePortsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePort
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) WithTimeout(timeout time.Duration) *DcimConsolePortsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) WithContext(ctx context.Context) *DcimConsolePortsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) WithHTTPClient(client *http.Client) *DcimConsolePortsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) WithData(data *models.WritableConsolePort) *DcimConsolePortsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console ports create params
+func (o *DcimConsolePortsCreateParams) SetData(data *models.WritableConsolePort) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go
new file mode 100644
index 0000000..f90a275
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortsCreateReader is a Reader for the DcimConsolePortsCreate structure.
+type DcimConsolePortsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimConsolePortsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsCreateCreated creates a DcimConsolePortsCreateCreated with default headers values
+func NewDcimConsolePortsCreateCreated() *DcimConsolePortsCreateCreated {
+ return &DcimConsolePortsCreateCreated{}
+}
+
+/*DcimConsolePortsCreateCreated handles this case with default header values.
+
+DcimConsolePortsCreateCreated dcim console ports create created
+*/
+type DcimConsolePortsCreateCreated struct {
+ Payload *models.WritableConsolePort
+}
+
+func (o *DcimConsolePortsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/console-ports/][%d] dcimConsolePortsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimConsolePortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_parameters.go
new file mode 100644
index 0000000..333fded
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortsDeleteParams creates a new DcimConsolePortsDeleteParams object
+// with the default values initialized.
+func NewDcimConsolePortsDeleteParams() *DcimConsolePortsDeleteParams {
+ var ()
+ return &DcimConsolePortsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsDeleteParamsWithTimeout creates a new DcimConsolePortsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsDeleteParamsWithTimeout(timeout time.Duration) *DcimConsolePortsDeleteParams {
+ var ()
+ return &DcimConsolePortsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsDeleteParamsWithContext creates a new DcimConsolePortsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsDeleteParamsWithContext(ctx context.Context) *DcimConsolePortsDeleteParams {
+ var ()
+ return &DcimConsolePortsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsDeleteParamsWithHTTPClient creates a new DcimConsolePortsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsDeleteParamsWithHTTPClient(client *http.Client) *DcimConsolePortsDeleteParams {
+ var ()
+ return &DcimConsolePortsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim console ports delete operation typically these are written to a http.Request
+*/
+type DcimConsolePortsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this console port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) WithTimeout(timeout time.Duration) *DcimConsolePortsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) WithContext(ctx context.Context) *DcimConsolePortsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) WithHTTPClient(client *http.Client) *DcimConsolePortsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) WithID(id int64) *DcimConsolePortsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console ports delete params
+func (o *DcimConsolePortsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go
new file mode 100644
index 0000000..1d41ab5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimConsolePortsDeleteReader is a Reader for the DcimConsolePortsDelete structure.
+type DcimConsolePortsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimConsolePortsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsDeleteNoContent creates a DcimConsolePortsDeleteNoContent with default headers values
+func NewDcimConsolePortsDeleteNoContent() *DcimConsolePortsDeleteNoContent {
+ return &DcimConsolePortsDeleteNoContent{}
+}
+
+/*DcimConsolePortsDeleteNoContent handles this case with default header values.
+
+DcimConsolePortsDeleteNoContent dcim console ports delete no content
+*/
+type DcimConsolePortsDeleteNoContent struct {
+}
+
+func (o *DcimConsolePortsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/console-ports/{id}/][%d] dcimConsolePortsDeleteNoContent ", 204)
+}
+
+func (o *DcimConsolePortsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_parameters.go
new file mode 100644
index 0000000..cfe1841
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortsListParams creates a new DcimConsolePortsListParams object
+// with the default values initialized.
+func NewDcimConsolePortsListParams() *DcimConsolePortsListParams {
+ var ()
+ return &DcimConsolePortsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsListParamsWithTimeout creates a new DcimConsolePortsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsListParamsWithTimeout(timeout time.Duration) *DcimConsolePortsListParams {
+ var ()
+ return &DcimConsolePortsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsListParamsWithContext creates a new DcimConsolePortsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsListParamsWithContext(ctx context.Context) *DcimConsolePortsListParams {
+ var ()
+ return &DcimConsolePortsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsListParamsWithHTTPClient creates a new DcimConsolePortsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsListParamsWithHTTPClient(client *http.Client) *DcimConsolePortsListParams {
+ var ()
+ return &DcimConsolePortsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsListParams contains all the parameters to send to the API endpoint
+for the dcim console ports list operation typically these are written to a http.Request
+*/
+type DcimConsolePortsListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithTimeout(timeout time.Duration) *DcimConsolePortsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithContext(ctx context.Context) *DcimConsolePortsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithHTTPClient(client *http.Client) *DcimConsolePortsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithDevice(device *string) *DcimConsolePortsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithDeviceID(deviceID *string) *DcimConsolePortsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithLimit(limit *int64) *DcimConsolePortsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithName(name *string) *DcimConsolePortsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim console ports list params
+func (o *DcimConsolePortsListParams) WithOffset(offset *int64) *DcimConsolePortsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim console ports list params
+func (o *DcimConsolePortsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go
new file mode 100644
index 0000000..0143560
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortsListReader is a Reader for the DcimConsolePortsList structure.
+type DcimConsolePortsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsListOK creates a DcimConsolePortsListOK with default headers values
+func NewDcimConsolePortsListOK() *DcimConsolePortsListOK {
+ return &DcimConsolePortsListOK{}
+}
+
+/*DcimConsolePortsListOK handles this case with default header values.
+
+DcimConsolePortsListOK dcim console ports list o k
+*/
+type DcimConsolePortsListOK struct {
+ Payload *models.DcimConsolePortsListOKBody
+}
+
+func (o *DcimConsolePortsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-ports/][%d] dcimConsolePortsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimConsolePortsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go
new file mode 100644
index 0000000..87084f6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortsPartialUpdateParams creates a new DcimConsolePortsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimConsolePortsPartialUpdateParams() *DcimConsolePortsPartialUpdateParams {
+ var ()
+ return &DcimConsolePortsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsPartialUpdateParamsWithTimeout creates a new DcimConsolePortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimConsolePortsPartialUpdateParams {
+ var ()
+ return &DcimConsolePortsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsPartialUpdateParamsWithContext creates a new DcimConsolePortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsPartialUpdateParamsWithContext(ctx context.Context) *DcimConsolePortsPartialUpdateParams {
+ var ()
+ return &DcimConsolePortsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsPartialUpdateParamsWithHTTPClient creates a new DcimConsolePortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimConsolePortsPartialUpdateParams {
+ var ()
+ return &DcimConsolePortsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console ports partial update operation typically these are written to a http.Request
+*/
+type DcimConsolePortsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePort
+ /*ID
+ A unique integer value identifying this console port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimConsolePortsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) WithContext(ctx context.Context) *DcimConsolePortsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimConsolePortsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) WithData(data *models.WritableConsolePort) *DcimConsolePortsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) SetData(data *models.WritableConsolePort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) WithID(id int64) *DcimConsolePortsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console ports partial update params
+func (o *DcimConsolePortsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go
new file mode 100644
index 0000000..9fb4bfc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortsPartialUpdateReader is a Reader for the DcimConsolePortsPartialUpdate structure.
+type DcimConsolePortsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsPartialUpdateOK creates a DcimConsolePortsPartialUpdateOK with default headers values
+func NewDcimConsolePortsPartialUpdateOK() *DcimConsolePortsPartialUpdateOK {
+ return &DcimConsolePortsPartialUpdateOK{}
+}
+
+/*DcimConsolePortsPartialUpdateOK handles this case with default header values.
+
+DcimConsolePortsPartialUpdateOK dcim console ports partial update o k
+*/
+type DcimConsolePortsPartialUpdateOK struct {
+ Payload *models.WritableConsolePort
+}
+
+func (o *DcimConsolePortsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/console-ports/{id}/][%d] dcimConsolePortsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_parameters.go
new file mode 100644
index 0000000..0687617
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsolePortsReadParams creates a new DcimConsolePortsReadParams object
+// with the default values initialized.
+func NewDcimConsolePortsReadParams() *DcimConsolePortsReadParams {
+ var ()
+ return &DcimConsolePortsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsReadParamsWithTimeout creates a new DcimConsolePortsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsReadParamsWithTimeout(timeout time.Duration) *DcimConsolePortsReadParams {
+ var ()
+ return &DcimConsolePortsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsReadParamsWithContext creates a new DcimConsolePortsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsReadParamsWithContext(ctx context.Context) *DcimConsolePortsReadParams {
+ var ()
+ return &DcimConsolePortsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsReadParamsWithHTTPClient creates a new DcimConsolePortsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsReadParamsWithHTTPClient(client *http.Client) *DcimConsolePortsReadParams {
+ var ()
+ return &DcimConsolePortsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsReadParams contains all the parameters to send to the API endpoint
+for the dcim console ports read operation typically these are written to a http.Request
+*/
+type DcimConsolePortsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this console port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) WithTimeout(timeout time.Duration) *DcimConsolePortsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) WithContext(ctx context.Context) *DcimConsolePortsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) WithHTTPClient(client *http.Client) *DcimConsolePortsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) WithID(id int64) *DcimConsolePortsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console ports read params
+func (o *DcimConsolePortsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go
new file mode 100644
index 0000000..e25a09f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortsReadReader is a Reader for the DcimConsolePortsRead structure.
+type DcimConsolePortsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsReadOK creates a DcimConsolePortsReadOK with default headers values
+func NewDcimConsolePortsReadOK() *DcimConsolePortsReadOK {
+ return &DcimConsolePortsReadOK{}
+}
+
+/*DcimConsolePortsReadOK handles this case with default header values.
+
+DcimConsolePortsReadOK dcim console ports read o k
+*/
+type DcimConsolePortsReadOK struct {
+ Payload *models.ConsolePort
+}
+
+func (o *DcimConsolePortsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-ports/{id}/][%d] dcimConsolePortsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ConsolePort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_parameters.go
new file mode 100644
index 0000000..fd01fdd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsolePortsUpdateParams creates a new DcimConsolePortsUpdateParams object
+// with the default values initialized.
+func NewDcimConsolePortsUpdateParams() *DcimConsolePortsUpdateParams {
+ var ()
+ return &DcimConsolePortsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsolePortsUpdateParamsWithTimeout creates a new DcimConsolePortsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsolePortsUpdateParamsWithTimeout(timeout time.Duration) *DcimConsolePortsUpdateParams {
+ var ()
+ return &DcimConsolePortsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsolePortsUpdateParamsWithContext creates a new DcimConsolePortsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsolePortsUpdateParamsWithContext(ctx context.Context) *DcimConsolePortsUpdateParams {
+ var ()
+ return &DcimConsolePortsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsolePortsUpdateParamsWithHTTPClient creates a new DcimConsolePortsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsolePortsUpdateParamsWithHTTPClient(client *http.Client) *DcimConsolePortsUpdateParams {
+ var ()
+ return &DcimConsolePortsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsolePortsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console ports update operation typically these are written to a http.Request
+*/
+type DcimConsolePortsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsolePort
+ /*ID
+ A unique integer value identifying this console port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) WithTimeout(timeout time.Duration) *DcimConsolePortsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) WithContext(ctx context.Context) *DcimConsolePortsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) WithHTTPClient(client *http.Client) *DcimConsolePortsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) WithData(data *models.WritableConsolePort) *DcimConsolePortsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) SetData(data *models.WritableConsolePort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) WithID(id int64) *DcimConsolePortsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console ports update params
+func (o *DcimConsolePortsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsolePortsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go
new file mode 100644
index 0000000..4c6332b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsolePortsUpdateReader is a Reader for the DcimConsolePortsUpdate structure.
+type DcimConsolePortsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsolePortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsolePortsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsolePortsUpdateOK creates a DcimConsolePortsUpdateOK with default headers values
+func NewDcimConsolePortsUpdateOK() *DcimConsolePortsUpdateOK {
+ return &DcimConsolePortsUpdateOK{}
+}
+
+/*DcimConsolePortsUpdateOK handles this case with default header values.
+
+DcimConsolePortsUpdateOK dcim console ports update o k
+*/
+type DcimConsolePortsUpdateOK struct {
+ Payload *models.WritableConsolePort
+}
+
+func (o *DcimConsolePortsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/console-ports/{id}/][%d] dcimConsolePortsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsolePortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsolePort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go
new file mode 100644
index 0000000..9547dd3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortTemplatesCreateParams creates a new DcimConsoleServerPortTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesCreateParams() *DcimConsoleServerPortTemplatesCreateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesCreateParamsWithTimeout creates a new DcimConsoleServerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesCreateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesCreateParamsWithContext creates a new DcimConsoleServerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesCreateParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesCreateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesCreateParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesCreateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates create operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPortTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) WithData(data *models.WritableConsoleServerPortTemplate) *DcimConsoleServerPortTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server port templates create params
+func (o *DcimConsoleServerPortTemplatesCreateParams) SetData(data *models.WritableConsoleServerPortTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go
new file mode 100644
index 0000000..55bb25d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortTemplatesCreateReader is a Reader for the DcimConsoleServerPortTemplatesCreate structure.
+type DcimConsoleServerPortTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimConsoleServerPortTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesCreateCreated creates a DcimConsoleServerPortTemplatesCreateCreated with default headers values
+func NewDcimConsoleServerPortTemplatesCreateCreated() *DcimConsoleServerPortTemplatesCreateCreated {
+ return &DcimConsoleServerPortTemplatesCreateCreated{}
+}
+
+/*DcimConsoleServerPortTemplatesCreateCreated handles this case with default header values.
+
+DcimConsoleServerPortTemplatesCreateCreated dcim console server port templates create created
+*/
+type DcimConsoleServerPortTemplatesCreateCreated struct {
+ Payload *models.WritableConsoleServerPortTemplate
+}
+
+func (o *DcimConsoleServerPortTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/console-server-port-templates/][%d] dcimConsoleServerPortTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimConsoleServerPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go
new file mode 100644
index 0000000..2d7623c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortTemplatesDeleteParams creates a new DcimConsoleServerPortTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesDeleteParams() *DcimConsoleServerPortTemplatesDeleteParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesDeleteParamsWithTimeout creates a new DcimConsoleServerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesDeleteParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesDeleteParamsWithContext creates a new DcimConsoleServerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesDeleteParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesDeleteParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesDeleteParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesDeleteParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates delete operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this console server port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) WithID(id int64) *DcimConsoleServerPortTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server port templates delete params
+func (o *DcimConsoleServerPortTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go
new file mode 100644
index 0000000..42c7d41
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimConsoleServerPortTemplatesDeleteReader is a Reader for the DcimConsoleServerPortTemplatesDelete structure.
+type DcimConsoleServerPortTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimConsoleServerPortTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesDeleteNoContent creates a DcimConsoleServerPortTemplatesDeleteNoContent with default headers values
+func NewDcimConsoleServerPortTemplatesDeleteNoContent() *DcimConsoleServerPortTemplatesDeleteNoContent {
+ return &DcimConsoleServerPortTemplatesDeleteNoContent{}
+}
+
+/*DcimConsoleServerPortTemplatesDeleteNoContent handles this case with default header values.
+
+DcimConsoleServerPortTemplatesDeleteNoContent dcim console server port templates delete no content
+*/
+type DcimConsoleServerPortTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimConsoleServerPortTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimConsoleServerPortTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go
new file mode 100644
index 0000000..90779d9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortTemplatesListParams creates a new DcimConsoleServerPortTemplatesListParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesListParams() *DcimConsoleServerPortTemplatesListParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesListParamsWithTimeout creates a new DcimConsoleServerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesListParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesListParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesListParamsWithContext creates a new DcimConsoleServerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesListParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesListParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesListParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesListParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesListParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates list operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimConsoleServerPortTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithLimit adds the limit to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithLimit(limit *int64) *DcimConsoleServerPortTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithName(name *string) *DcimConsoleServerPortTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) WithOffset(offset *int64) *DcimConsoleServerPortTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim console server port templates list params
+func (o *DcimConsoleServerPortTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go
new file mode 100644
index 0000000..a0e1a97
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortTemplatesListReader is a Reader for the DcimConsoleServerPortTemplatesList structure.
+type DcimConsoleServerPortTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesListOK creates a DcimConsoleServerPortTemplatesListOK with default headers values
+func NewDcimConsoleServerPortTemplatesListOK() *DcimConsoleServerPortTemplatesListOK {
+ return &DcimConsoleServerPortTemplatesListOK{}
+}
+
+/*DcimConsoleServerPortTemplatesListOK handles this case with default header values.
+
+DcimConsoleServerPortTemplatesListOK dcim console server port templates list o k
+*/
+type DcimConsoleServerPortTemplatesListOK struct {
+ Payload *models.DcimConsoleServerPortTemplatesListOKBody
+}
+
+func (o *DcimConsoleServerPortTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-server-port-templates/][%d] dcimConsoleServerPortTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimConsoleServerPortTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go
new file mode 100644
index 0000000..5a6f3e0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortTemplatesPartialUpdateParams creates a new DcimConsoleServerPortTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesPartialUpdateParams() *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithTimeout creates a new DcimConsoleServerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithContext creates a new DcimConsoleServerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates partial update operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPortTemplate
+ /*ID
+ A unique integer value identifying this console server port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WithData(data *models.WritableConsoleServerPortTemplate) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) SetData(data *models.WritableConsoleServerPortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WithID(id int64) *DcimConsoleServerPortTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server port templates partial update params
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go
new file mode 100644
index 0000000..48d940d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortTemplatesPartialUpdateReader is a Reader for the DcimConsoleServerPortTemplatesPartialUpdate structure.
+type DcimConsoleServerPortTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesPartialUpdateOK creates a DcimConsoleServerPortTemplatesPartialUpdateOK with default headers values
+func NewDcimConsoleServerPortTemplatesPartialUpdateOK() *DcimConsoleServerPortTemplatesPartialUpdateOK {
+ return &DcimConsoleServerPortTemplatesPartialUpdateOK{}
+}
+
+/*DcimConsoleServerPortTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimConsoleServerPortTemplatesPartialUpdateOK dcim console server port templates partial update o k
+*/
+type DcimConsoleServerPortTemplatesPartialUpdateOK struct {
+ Payload *models.WritableConsoleServerPortTemplate
+}
+
+func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go
new file mode 100644
index 0000000..498d73c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortTemplatesReadParams creates a new DcimConsoleServerPortTemplatesReadParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesReadParams() *DcimConsoleServerPortTemplatesReadParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesReadParamsWithTimeout creates a new DcimConsoleServerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesReadParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesReadParamsWithContext creates a new DcimConsoleServerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesReadParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesReadParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesReadParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesReadParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates read operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this console server port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) WithID(id int64) *DcimConsoleServerPortTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server port templates read params
+func (o *DcimConsoleServerPortTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go
new file mode 100644
index 0000000..9d2b9f6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortTemplatesReadReader is a Reader for the DcimConsoleServerPortTemplatesRead structure.
+type DcimConsoleServerPortTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesReadOK creates a DcimConsoleServerPortTemplatesReadOK with default headers values
+func NewDcimConsoleServerPortTemplatesReadOK() *DcimConsoleServerPortTemplatesReadOK {
+ return &DcimConsoleServerPortTemplatesReadOK{}
+}
+
+/*DcimConsoleServerPortTemplatesReadOK handles this case with default header values.
+
+DcimConsoleServerPortTemplatesReadOK dcim console server port templates read o k
+*/
+type DcimConsoleServerPortTemplatesReadOK struct {
+ Payload *models.ConsoleServerPortTemplate
+}
+
+func (o *DcimConsoleServerPortTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ConsoleServerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go
new file mode 100644
index 0000000..26bfe38
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortTemplatesUpdateParams creates a new DcimConsoleServerPortTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortTemplatesUpdateParams() *DcimConsoleServerPortTemplatesUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesUpdateParamsWithTimeout creates a new DcimConsoleServerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesUpdateParamsWithContext creates a new DcimConsoleServerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortTemplatesUpdateParamsWithContext(ctx context.Context) *DcimConsoleServerPortTemplatesUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesUpdateParamsWithHTTPClient creates a new DcimConsoleServerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesUpdateParams {
+ var ()
+ return &DcimConsoleServerPortTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console server port templates update operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPortTemplate
+ /*ID
+ A unique integer value identifying this console server port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WithContext(ctx context.Context) *DcimConsoleServerPortTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WithData(data *models.WritableConsoleServerPortTemplate) *DcimConsoleServerPortTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) SetData(data *models.WritableConsoleServerPortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WithID(id int64) *DcimConsoleServerPortTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server port templates update params
+func (o *DcimConsoleServerPortTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go
new file mode 100644
index 0000000..633057d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortTemplatesUpdateReader is a Reader for the DcimConsoleServerPortTemplatesUpdate structure.
+type DcimConsoleServerPortTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortTemplatesUpdateOK creates a DcimConsoleServerPortTemplatesUpdateOK with default headers values
+func NewDcimConsoleServerPortTemplatesUpdateOK() *DcimConsoleServerPortTemplatesUpdateOK {
+ return &DcimConsoleServerPortTemplatesUpdateOK{}
+}
+
+/*DcimConsoleServerPortTemplatesUpdateOK handles this case with default header values.
+
+DcimConsoleServerPortTemplatesUpdateOK dcim console server port templates update o k
+*/
+type DcimConsoleServerPortTemplatesUpdateOK struct {
+ Payload *models.WritableConsoleServerPortTemplate
+}
+
+func (o *DcimConsoleServerPortTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/console-server-port-templates/{id}/][%d] dcimConsoleServerPortTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_parameters.go
new file mode 100644
index 0000000..7b6cbba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortsCreateParams creates a new DcimConsoleServerPortsCreateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsCreateParams() *DcimConsoleServerPortsCreateParams {
+ var ()
+ return &DcimConsoleServerPortsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsCreateParamsWithTimeout creates a new DcimConsoleServerPortsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsCreateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsCreateParams {
+ var ()
+ return &DcimConsoleServerPortsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsCreateParamsWithContext creates a new DcimConsoleServerPortsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsCreateParamsWithContext(ctx context.Context) *DcimConsoleServerPortsCreateParams {
+ var ()
+ return &DcimConsoleServerPortsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsCreateParamsWithHTTPClient creates a new DcimConsoleServerPortsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsCreateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsCreateParams {
+ var ()
+ return &DcimConsoleServerPortsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsCreateParams contains all the parameters to send to the API endpoint
+for the dcim console server ports create operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPort
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) WithContext(ctx context.Context) *DcimConsoleServerPortsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) WithData(data *models.WritableConsoleServerPort) *DcimConsoleServerPortsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server ports create params
+func (o *DcimConsoleServerPortsCreateParams) SetData(data *models.WritableConsoleServerPort) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go
new file mode 100644
index 0000000..ea311ac
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortsCreateReader is a Reader for the DcimConsoleServerPortsCreate structure.
+type DcimConsoleServerPortsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimConsoleServerPortsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsCreateCreated creates a DcimConsoleServerPortsCreateCreated with default headers values
+func NewDcimConsoleServerPortsCreateCreated() *DcimConsoleServerPortsCreateCreated {
+ return &DcimConsoleServerPortsCreateCreated{}
+}
+
+/*DcimConsoleServerPortsCreateCreated handles this case with default header values.
+
+DcimConsoleServerPortsCreateCreated dcim console server ports create created
+*/
+type DcimConsoleServerPortsCreateCreated struct {
+ Payload *models.WritableConsoleServerPort
+}
+
+func (o *DcimConsoleServerPortsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/console-server-ports/][%d] dcimConsoleServerPortsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimConsoleServerPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go
new file mode 100644
index 0000000..78592be
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortsDeleteParams creates a new DcimConsoleServerPortsDeleteParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsDeleteParams() *DcimConsoleServerPortsDeleteParams {
+ var ()
+ return &DcimConsoleServerPortsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsDeleteParamsWithTimeout creates a new DcimConsoleServerPortsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsDeleteParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsDeleteParams {
+ var ()
+ return &DcimConsoleServerPortsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsDeleteParamsWithContext creates a new DcimConsoleServerPortsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsDeleteParamsWithContext(ctx context.Context) *DcimConsoleServerPortsDeleteParams {
+ var ()
+ return &DcimConsoleServerPortsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsDeleteParamsWithHTTPClient creates a new DcimConsoleServerPortsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsDeleteParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsDeleteParams {
+ var ()
+ return &DcimConsoleServerPortsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim console server ports delete operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this console server port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) WithContext(ctx context.Context) *DcimConsoleServerPortsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) WithID(id int64) *DcimConsoleServerPortsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server ports delete params
+func (o *DcimConsoleServerPortsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go
new file mode 100644
index 0000000..6332fe0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimConsoleServerPortsDeleteReader is a Reader for the DcimConsoleServerPortsDelete structure.
+type DcimConsoleServerPortsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimConsoleServerPortsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsDeleteNoContent creates a DcimConsoleServerPortsDeleteNoContent with default headers values
+func NewDcimConsoleServerPortsDeleteNoContent() *DcimConsoleServerPortsDeleteNoContent {
+ return &DcimConsoleServerPortsDeleteNoContent{}
+}
+
+/*DcimConsoleServerPortsDeleteNoContent handles this case with default header values.
+
+DcimConsoleServerPortsDeleteNoContent dcim console server ports delete no content
+*/
+type DcimConsoleServerPortsDeleteNoContent struct {
+}
+
+func (o *DcimConsoleServerPortsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsDeleteNoContent ", 204)
+}
+
+func (o *DcimConsoleServerPortsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_parameters.go
new file mode 100644
index 0000000..df14161
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortsListParams creates a new DcimConsoleServerPortsListParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsListParams() *DcimConsoleServerPortsListParams {
+ var ()
+ return &DcimConsoleServerPortsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsListParamsWithTimeout creates a new DcimConsoleServerPortsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsListParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsListParams {
+ var ()
+ return &DcimConsoleServerPortsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsListParamsWithContext creates a new DcimConsoleServerPortsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsListParamsWithContext(ctx context.Context) *DcimConsoleServerPortsListParams {
+ var ()
+ return &DcimConsoleServerPortsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsListParamsWithHTTPClient creates a new DcimConsoleServerPortsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsListParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsListParams {
+ var ()
+ return &DcimConsoleServerPortsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsListParams contains all the parameters to send to the API endpoint
+for the dcim console server ports list operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithContext(ctx context.Context) *DcimConsoleServerPortsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithDevice(device *string) *DcimConsoleServerPortsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithDeviceID(deviceID *string) *DcimConsoleServerPortsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithLimit(limit *int64) *DcimConsoleServerPortsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithName(name *string) *DcimConsoleServerPortsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) WithOffset(offset *int64) *DcimConsoleServerPortsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim console server ports list params
+func (o *DcimConsoleServerPortsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go
new file mode 100644
index 0000000..fd9ac09
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortsListReader is a Reader for the DcimConsoleServerPortsList structure.
+type DcimConsoleServerPortsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsListOK creates a DcimConsoleServerPortsListOK with default headers values
+func NewDcimConsoleServerPortsListOK() *DcimConsoleServerPortsListOK {
+ return &DcimConsoleServerPortsListOK{}
+}
+
+/*DcimConsoleServerPortsListOK handles this case with default header values.
+
+DcimConsoleServerPortsListOK dcim console server ports list o k
+*/
+type DcimConsoleServerPortsListOK struct {
+ Payload *models.DcimConsoleServerPortsListOKBody
+}
+
+func (o *DcimConsoleServerPortsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-server-ports/][%d] dcimConsoleServerPortsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimConsoleServerPortsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go
new file mode 100644
index 0000000..90d0dea
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortsPartialUpdateParams creates a new DcimConsoleServerPortsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsPartialUpdateParams() *DcimConsoleServerPortsPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsPartialUpdateParamsWithTimeout creates a new DcimConsoleServerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsPartialUpdateParamsWithContext creates a new DcimConsoleServerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsPartialUpdateParamsWithContext(ctx context.Context) *DcimConsoleServerPortsPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsPartialUpdateParamsWithHTTPClient creates a new DcimConsoleServerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsPartialUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console server ports partial update operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPort
+ /*ID
+ A unique integer value identifying this console server port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) WithContext(ctx context.Context) *DcimConsoleServerPortsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) WithData(data *models.WritableConsoleServerPort) *DcimConsoleServerPortsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) SetData(data *models.WritableConsoleServerPort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) WithID(id int64) *DcimConsoleServerPortsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server ports partial update params
+func (o *DcimConsoleServerPortsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go
new file mode 100644
index 0000000..bcbac0a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortsPartialUpdateReader is a Reader for the DcimConsoleServerPortsPartialUpdate structure.
+type DcimConsoleServerPortsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsPartialUpdateOK creates a DcimConsoleServerPortsPartialUpdateOK with default headers values
+func NewDcimConsoleServerPortsPartialUpdateOK() *DcimConsoleServerPortsPartialUpdateOK {
+ return &DcimConsoleServerPortsPartialUpdateOK{}
+}
+
+/*DcimConsoleServerPortsPartialUpdateOK handles this case with default header values.
+
+DcimConsoleServerPortsPartialUpdateOK dcim console server ports partial update o k
+*/
+type DcimConsoleServerPortsPartialUpdateOK struct {
+ Payload *models.WritableConsoleServerPort
+}
+
+func (o *DcimConsoleServerPortsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_parameters.go
new file mode 100644
index 0000000..5dd2d73
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimConsoleServerPortsReadParams creates a new DcimConsoleServerPortsReadParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsReadParams() *DcimConsoleServerPortsReadParams {
+ var ()
+ return &DcimConsoleServerPortsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsReadParamsWithTimeout creates a new DcimConsoleServerPortsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsReadParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsReadParams {
+ var ()
+ return &DcimConsoleServerPortsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsReadParamsWithContext creates a new DcimConsoleServerPortsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsReadParamsWithContext(ctx context.Context) *DcimConsoleServerPortsReadParams {
+ var ()
+ return &DcimConsoleServerPortsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsReadParamsWithHTTPClient creates a new DcimConsoleServerPortsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsReadParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsReadParams {
+ var ()
+ return &DcimConsoleServerPortsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsReadParams contains all the parameters to send to the API endpoint
+for the dcim console server ports read operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this console server port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) WithContext(ctx context.Context) *DcimConsoleServerPortsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) WithID(id int64) *DcimConsoleServerPortsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server ports read params
+func (o *DcimConsoleServerPortsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go
new file mode 100644
index 0000000..a1790ee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortsReadReader is a Reader for the DcimConsoleServerPortsRead structure.
+type DcimConsoleServerPortsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsReadOK creates a DcimConsoleServerPortsReadOK with default headers values
+func NewDcimConsoleServerPortsReadOK() *DcimConsoleServerPortsReadOK {
+ return &DcimConsoleServerPortsReadOK{}
+}
+
+/*DcimConsoleServerPortsReadOK handles this case with default header values.
+
+DcimConsoleServerPortsReadOK dcim console server ports read o k
+*/
+type DcimConsoleServerPortsReadOK struct {
+ Payload *models.ConsoleServerPort
+}
+
+func (o *DcimConsoleServerPortsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ConsoleServerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_parameters.go
new file mode 100644
index 0000000..06832cd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimConsoleServerPortsUpdateParams creates a new DcimConsoleServerPortsUpdateParams object
+// with the default values initialized.
+func NewDcimConsoleServerPortsUpdateParams() *DcimConsoleServerPortsUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimConsoleServerPortsUpdateParamsWithTimeout creates a new DcimConsoleServerPortsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimConsoleServerPortsUpdateParamsWithTimeout(timeout time.Duration) *DcimConsoleServerPortsUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimConsoleServerPortsUpdateParamsWithContext creates a new DcimConsoleServerPortsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimConsoleServerPortsUpdateParamsWithContext(ctx context.Context) *DcimConsoleServerPortsUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimConsoleServerPortsUpdateParamsWithHTTPClient creates a new DcimConsoleServerPortsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimConsoleServerPortsUpdateParamsWithHTTPClient(client *http.Client) *DcimConsoleServerPortsUpdateParams {
+ var ()
+ return &DcimConsoleServerPortsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimConsoleServerPortsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim console server ports update operation typically these are written to a http.Request
+*/
+type DcimConsoleServerPortsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableConsoleServerPort
+ /*ID
+ A unique integer value identifying this console server port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) WithTimeout(timeout time.Duration) *DcimConsoleServerPortsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) WithContext(ctx context.Context) *DcimConsoleServerPortsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) WithHTTPClient(client *http.Client) *DcimConsoleServerPortsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) WithData(data *models.WritableConsoleServerPort) *DcimConsoleServerPortsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) SetData(data *models.WritableConsoleServerPort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) WithID(id int64) *DcimConsoleServerPortsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim console server ports update params
+func (o *DcimConsoleServerPortsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimConsoleServerPortsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go
new file mode 100644
index 0000000..f90c9c5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimConsoleServerPortsUpdateReader is a Reader for the DcimConsoleServerPortsUpdate structure.
+type DcimConsoleServerPortsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimConsoleServerPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimConsoleServerPortsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimConsoleServerPortsUpdateOK creates a DcimConsoleServerPortsUpdateOK with default headers values
+func NewDcimConsoleServerPortsUpdateOK() *DcimConsoleServerPortsUpdateOK {
+ return &DcimConsoleServerPortsUpdateOK{}
+}
+
+/*DcimConsoleServerPortsUpdateOK handles this case with default header values.
+
+DcimConsoleServerPortsUpdateOK dcim console server ports update o k
+*/
+type DcimConsoleServerPortsUpdateOK struct {
+ Payload *models.WritableConsoleServerPort
+}
+
+func (o *DcimConsoleServerPortsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/console-server-ports/{id}/][%d] dcimConsoleServerPortsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimConsoleServerPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableConsoleServerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go
new file mode 100644
index 0000000..b0fdaf2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBayTemplatesCreateParams creates a new DcimDeviceBayTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesCreateParams() *DcimDeviceBayTemplatesCreateParams {
+ var ()
+ return &DcimDeviceBayTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesCreateParamsWithTimeout creates a new DcimDeviceBayTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesCreateParams {
+ var ()
+ return &DcimDeviceBayTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesCreateParamsWithContext creates a new DcimDeviceBayTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesCreateParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesCreateParams {
+ var ()
+ return &DcimDeviceBayTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesCreateParamsWithHTTPClient creates a new DcimDeviceBayTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesCreateParams {
+ var ()
+ return &DcimDeviceBayTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates create operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBayTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) WithData(data *models.WritableDeviceBayTemplate) *DcimDeviceBayTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bay templates create params
+func (o *DcimDeviceBayTemplatesCreateParams) SetData(data *models.WritableDeviceBayTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go
new file mode 100644
index 0000000..e947354
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBayTemplatesCreateReader is a Reader for the DcimDeviceBayTemplatesCreate structure.
+type DcimDeviceBayTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimDeviceBayTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesCreateCreated creates a DcimDeviceBayTemplatesCreateCreated with default headers values
+func NewDcimDeviceBayTemplatesCreateCreated() *DcimDeviceBayTemplatesCreateCreated {
+ return &DcimDeviceBayTemplatesCreateCreated{}
+}
+
+/*DcimDeviceBayTemplatesCreateCreated handles this case with default header values.
+
+DcimDeviceBayTemplatesCreateCreated dcim device bay templates create created
+*/
+type DcimDeviceBayTemplatesCreateCreated struct {
+ Payload *models.WritableDeviceBayTemplate
+}
+
+func (o *DcimDeviceBayTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/device-bay-templates/][%d] dcimDeviceBayTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimDeviceBayTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBayTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go
new file mode 100644
index 0000000..43928cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBayTemplatesDeleteParams creates a new DcimDeviceBayTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesDeleteParams() *DcimDeviceBayTemplatesDeleteParams {
+ var ()
+ return &DcimDeviceBayTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesDeleteParamsWithTimeout creates a new DcimDeviceBayTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesDeleteParams {
+ var ()
+ return &DcimDeviceBayTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesDeleteParamsWithContext creates a new DcimDeviceBayTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesDeleteParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesDeleteParams {
+ var ()
+ return &DcimDeviceBayTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesDeleteParamsWithHTTPClient creates a new DcimDeviceBayTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesDeleteParams {
+ var ()
+ return &DcimDeviceBayTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates delete operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this device bay template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) WithID(id int64) *DcimDeviceBayTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bay templates delete params
+func (o *DcimDeviceBayTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go
new file mode 100644
index 0000000..a3800d0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimDeviceBayTemplatesDeleteReader is a Reader for the DcimDeviceBayTemplatesDelete structure.
+type DcimDeviceBayTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimDeviceBayTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesDeleteNoContent creates a DcimDeviceBayTemplatesDeleteNoContent with default headers values
+func NewDcimDeviceBayTemplatesDeleteNoContent() *DcimDeviceBayTemplatesDeleteNoContent {
+ return &DcimDeviceBayTemplatesDeleteNoContent{}
+}
+
+/*DcimDeviceBayTemplatesDeleteNoContent handles this case with default header values.
+
+DcimDeviceBayTemplatesDeleteNoContent dcim device bay templates delete no content
+*/
+type DcimDeviceBayTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimDeviceBayTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimDeviceBayTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go
new file mode 100644
index 0000000..b967bcf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBayTemplatesListParams creates a new DcimDeviceBayTemplatesListParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesListParams() *DcimDeviceBayTemplatesListParams {
+ var ()
+ return &DcimDeviceBayTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesListParamsWithTimeout creates a new DcimDeviceBayTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesListParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesListParams {
+ var ()
+ return &DcimDeviceBayTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesListParamsWithContext creates a new DcimDeviceBayTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesListParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesListParams {
+ var ()
+ return &DcimDeviceBayTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesListParamsWithHTTPClient creates a new DcimDeviceBayTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesListParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesListParams {
+ var ()
+ return &DcimDeviceBayTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates list operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimDeviceBayTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithLimit adds the limit to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithLimit(limit *int64) *DcimDeviceBayTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithName(name *string) *DcimDeviceBayTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) WithOffset(offset *int64) *DcimDeviceBayTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim device bay templates list params
+func (o *DcimDeviceBayTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go
new file mode 100644
index 0000000..1e83bc7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBayTemplatesListReader is a Reader for the DcimDeviceBayTemplatesList structure.
+type DcimDeviceBayTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBayTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesListOK creates a DcimDeviceBayTemplatesListOK with default headers values
+func NewDcimDeviceBayTemplatesListOK() *DcimDeviceBayTemplatesListOK {
+ return &DcimDeviceBayTemplatesListOK{}
+}
+
+/*DcimDeviceBayTemplatesListOK handles this case with default header values.
+
+DcimDeviceBayTemplatesListOK dcim device bay templates list o k
+*/
+type DcimDeviceBayTemplatesListOK struct {
+ Payload *models.DcimDeviceBayTemplatesListOKBody
+}
+
+func (o *DcimDeviceBayTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-bay-templates/][%d] dcimDeviceBayTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBayTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimDeviceBayTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go
new file mode 100644
index 0000000..7fd8556
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBayTemplatesPartialUpdateParams creates a new DcimDeviceBayTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesPartialUpdateParams() *DcimDeviceBayTemplatesPartialUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesPartialUpdateParamsWithTimeout creates a new DcimDeviceBayTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesPartialUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesPartialUpdateParamsWithContext creates a new DcimDeviceBayTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesPartialUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimDeviceBayTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesPartialUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates partial update operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBayTemplate
+ /*ID
+ A unique integer value identifying this device bay template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WithData(data *models.WritableDeviceBayTemplate) *DcimDeviceBayTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) SetData(data *models.WritableDeviceBayTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WithID(id int64) *DcimDeviceBayTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bay templates partial update params
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go
new file mode 100644
index 0000000..be2b1e0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBayTemplatesPartialUpdateReader is a Reader for the DcimDeviceBayTemplatesPartialUpdate structure.
+type DcimDeviceBayTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBayTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesPartialUpdateOK creates a DcimDeviceBayTemplatesPartialUpdateOK with default headers values
+func NewDcimDeviceBayTemplatesPartialUpdateOK() *DcimDeviceBayTemplatesPartialUpdateOK {
+ return &DcimDeviceBayTemplatesPartialUpdateOK{}
+}
+
+/*DcimDeviceBayTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimDeviceBayTemplatesPartialUpdateOK dcim device bay templates partial update o k
+*/
+type DcimDeviceBayTemplatesPartialUpdateOK struct {
+ Payload *models.WritableDeviceBayTemplate
+}
+
+func (o *DcimDeviceBayTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBayTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBayTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go
new file mode 100644
index 0000000..3e450ea
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBayTemplatesReadParams creates a new DcimDeviceBayTemplatesReadParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesReadParams() *DcimDeviceBayTemplatesReadParams {
+ var ()
+ return &DcimDeviceBayTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesReadParamsWithTimeout creates a new DcimDeviceBayTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesReadParams {
+ var ()
+ return &DcimDeviceBayTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesReadParamsWithContext creates a new DcimDeviceBayTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesReadParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesReadParams {
+ var ()
+ return &DcimDeviceBayTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesReadParamsWithHTTPClient creates a new DcimDeviceBayTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesReadParams {
+ var ()
+ return &DcimDeviceBayTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates read operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this device bay template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) WithID(id int64) *DcimDeviceBayTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bay templates read params
+func (o *DcimDeviceBayTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go
new file mode 100644
index 0000000..81e2dea
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBayTemplatesReadReader is a Reader for the DcimDeviceBayTemplatesRead structure.
+type DcimDeviceBayTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBayTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesReadOK creates a DcimDeviceBayTemplatesReadOK with default headers values
+func NewDcimDeviceBayTemplatesReadOK() *DcimDeviceBayTemplatesReadOK {
+ return &DcimDeviceBayTemplatesReadOK{}
+}
+
+/*DcimDeviceBayTemplatesReadOK handles this case with default header values.
+
+DcimDeviceBayTemplatesReadOK dcim device bay templates read o k
+*/
+type DcimDeviceBayTemplatesReadOK struct {
+ Payload *models.DeviceBayTemplate
+}
+
+func (o *DcimDeviceBayTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBayTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceBayTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go
new file mode 100644
index 0000000..1a8c926
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBayTemplatesUpdateParams creates a new DcimDeviceBayTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceBayTemplatesUpdateParams() *DcimDeviceBayTemplatesUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesUpdateParamsWithTimeout creates a new DcimDeviceBayTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBayTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBayTemplatesUpdateParamsWithContext creates a new DcimDeviceBayTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBayTemplatesUpdateParamsWithContext(ctx context.Context) *DcimDeviceBayTemplatesUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBayTemplatesUpdateParamsWithHTTPClient creates a new DcimDeviceBayTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBayTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesUpdateParams {
+ var ()
+ return &DcimDeviceBayTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBayTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device bay templates update operation typically these are written to a http.Request
+*/
+type DcimDeviceBayTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBayTemplate
+ /*ID
+ A unique integer value identifying this device bay template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceBayTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) WithContext(ctx context.Context) *DcimDeviceBayTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceBayTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) WithData(data *models.WritableDeviceBayTemplate) *DcimDeviceBayTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) SetData(data *models.WritableDeviceBayTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) WithID(id int64) *DcimDeviceBayTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bay templates update params
+func (o *DcimDeviceBayTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBayTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go
new file mode 100644
index 0000000..8f67bd9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBayTemplatesUpdateReader is a Reader for the DcimDeviceBayTemplatesUpdate structure.
+type DcimDeviceBayTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBayTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBayTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBayTemplatesUpdateOK creates a DcimDeviceBayTemplatesUpdateOK with default headers values
+func NewDcimDeviceBayTemplatesUpdateOK() *DcimDeviceBayTemplatesUpdateOK {
+ return &DcimDeviceBayTemplatesUpdateOK{}
+}
+
+/*DcimDeviceBayTemplatesUpdateOK handles this case with default header values.
+
+DcimDeviceBayTemplatesUpdateOK dcim device bay templates update o k
+*/
+type DcimDeviceBayTemplatesUpdateOK struct {
+ Payload *models.WritableDeviceBayTemplate
+}
+
+func (o *DcimDeviceBayTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/device-bay-templates/{id}/][%d] dcimDeviceBayTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBayTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBayTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_parameters.go
new file mode 100644
index 0000000..d4f8b0d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBaysCreateParams creates a new DcimDeviceBaysCreateParams object
+// with the default values initialized.
+func NewDcimDeviceBaysCreateParams() *DcimDeviceBaysCreateParams {
+ var ()
+ return &DcimDeviceBaysCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysCreateParamsWithTimeout creates a new DcimDeviceBaysCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysCreateParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysCreateParams {
+ var ()
+ return &DcimDeviceBaysCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysCreateParamsWithContext creates a new DcimDeviceBaysCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysCreateParamsWithContext(ctx context.Context) *DcimDeviceBaysCreateParams {
+ var ()
+ return &DcimDeviceBaysCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysCreateParamsWithHTTPClient creates a new DcimDeviceBaysCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysCreateParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysCreateParams {
+ var ()
+ return &DcimDeviceBaysCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysCreateParams contains all the parameters to send to the API endpoint
+for the dcim device bays create operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBay
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) WithContext(ctx context.Context) *DcimDeviceBaysCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) WithData(data *models.WritableDeviceBay) *DcimDeviceBaysCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bays create params
+func (o *DcimDeviceBaysCreateParams) SetData(data *models.WritableDeviceBay) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go
new file mode 100644
index 0000000..17a31cd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBaysCreateReader is a Reader for the DcimDeviceBaysCreate structure.
+type DcimDeviceBaysCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimDeviceBaysCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysCreateCreated creates a DcimDeviceBaysCreateCreated with default headers values
+func NewDcimDeviceBaysCreateCreated() *DcimDeviceBaysCreateCreated {
+ return &DcimDeviceBaysCreateCreated{}
+}
+
+/*DcimDeviceBaysCreateCreated handles this case with default header values.
+
+DcimDeviceBaysCreateCreated dcim device bays create created
+*/
+type DcimDeviceBaysCreateCreated struct {
+ Payload *models.WritableDeviceBay
+}
+
+func (o *DcimDeviceBaysCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/device-bays/][%d] dcimDeviceBaysCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimDeviceBaysCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBay)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_parameters.go
new file mode 100644
index 0000000..834eab8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBaysDeleteParams creates a new DcimDeviceBaysDeleteParams object
+// with the default values initialized.
+func NewDcimDeviceBaysDeleteParams() *DcimDeviceBaysDeleteParams {
+ var ()
+ return &DcimDeviceBaysDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysDeleteParamsWithTimeout creates a new DcimDeviceBaysDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysDeleteParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysDeleteParams {
+ var ()
+ return &DcimDeviceBaysDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysDeleteParamsWithContext creates a new DcimDeviceBaysDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysDeleteParamsWithContext(ctx context.Context) *DcimDeviceBaysDeleteParams {
+ var ()
+ return &DcimDeviceBaysDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysDeleteParamsWithHTTPClient creates a new DcimDeviceBaysDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysDeleteParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysDeleteParams {
+ var ()
+ return &DcimDeviceBaysDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysDeleteParams contains all the parameters to send to the API endpoint
+for the dcim device bays delete operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this device bay.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) WithContext(ctx context.Context) *DcimDeviceBaysDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) WithID(id int64) *DcimDeviceBaysDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bays delete params
+func (o *DcimDeviceBaysDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go
new file mode 100644
index 0000000..cdfb3c7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimDeviceBaysDeleteReader is a Reader for the DcimDeviceBaysDelete structure.
+type DcimDeviceBaysDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimDeviceBaysDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysDeleteNoContent creates a DcimDeviceBaysDeleteNoContent with default headers values
+func NewDcimDeviceBaysDeleteNoContent() *DcimDeviceBaysDeleteNoContent {
+ return &DcimDeviceBaysDeleteNoContent{}
+}
+
+/*DcimDeviceBaysDeleteNoContent handles this case with default header values.
+
+DcimDeviceBaysDeleteNoContent dcim device bays delete no content
+*/
+type DcimDeviceBaysDeleteNoContent struct {
+}
+
+func (o *DcimDeviceBaysDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/device-bays/{id}/][%d] dcimDeviceBaysDeleteNoContent ", 204)
+}
+
+func (o *DcimDeviceBaysDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_parameters.go
new file mode 100644
index 0000000..1c8fe53
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBaysListParams creates a new DcimDeviceBaysListParams object
+// with the default values initialized.
+func NewDcimDeviceBaysListParams() *DcimDeviceBaysListParams {
+ var ()
+ return &DcimDeviceBaysListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysListParamsWithTimeout creates a new DcimDeviceBaysListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysListParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysListParams {
+ var ()
+ return &DcimDeviceBaysListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysListParamsWithContext creates a new DcimDeviceBaysListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysListParamsWithContext(ctx context.Context) *DcimDeviceBaysListParams {
+ var ()
+ return &DcimDeviceBaysListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysListParamsWithHTTPClient creates a new DcimDeviceBaysListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysListParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysListParams {
+ var ()
+ return &DcimDeviceBaysListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysListParams contains all the parameters to send to the API endpoint
+for the dcim device bays list operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithContext(ctx context.Context) *DcimDeviceBaysListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithDevice(device *string) *DcimDeviceBaysListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithDeviceID(deviceID *string) *DcimDeviceBaysListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithLimit(limit *int64) *DcimDeviceBaysListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithName(name *string) *DcimDeviceBaysListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) WithOffset(offset *int64) *DcimDeviceBaysListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim device bays list params
+func (o *DcimDeviceBaysListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go
new file mode 100644
index 0000000..5ed482c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBaysListReader is a Reader for the DcimDeviceBaysList structure.
+type DcimDeviceBaysListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBaysListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysListOK creates a DcimDeviceBaysListOK with default headers values
+func NewDcimDeviceBaysListOK() *DcimDeviceBaysListOK {
+ return &DcimDeviceBaysListOK{}
+}
+
+/*DcimDeviceBaysListOK handles this case with default header values.
+
+DcimDeviceBaysListOK dcim device bays list o k
+*/
+type DcimDeviceBaysListOK struct {
+ Payload *models.DcimDeviceBaysListOKBody
+}
+
+func (o *DcimDeviceBaysListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-bays/][%d] dcimDeviceBaysListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBaysListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimDeviceBaysListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go
new file mode 100644
index 0000000..5271419
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBaysPartialUpdateParams creates a new DcimDeviceBaysPartialUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceBaysPartialUpdateParams() *DcimDeviceBaysPartialUpdateParams {
+ var ()
+ return &DcimDeviceBaysPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysPartialUpdateParamsWithTimeout creates a new DcimDeviceBaysPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysPartialUpdateParams {
+ var ()
+ return &DcimDeviceBaysPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysPartialUpdateParamsWithContext creates a new DcimDeviceBaysPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysPartialUpdateParamsWithContext(ctx context.Context) *DcimDeviceBaysPartialUpdateParams {
+ var ()
+ return &DcimDeviceBaysPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysPartialUpdateParamsWithHTTPClient creates a new DcimDeviceBaysPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysPartialUpdateParams {
+ var ()
+ return &DcimDeviceBaysPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device bays partial update operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBay
+ /*ID
+ A unique integer value identifying this device bay.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) WithContext(ctx context.Context) *DcimDeviceBaysPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) WithData(data *models.WritableDeviceBay) *DcimDeviceBaysPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) SetData(data *models.WritableDeviceBay) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) WithID(id int64) *DcimDeviceBaysPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bays partial update params
+func (o *DcimDeviceBaysPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go
new file mode 100644
index 0000000..cc824fe
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBaysPartialUpdateReader is a Reader for the DcimDeviceBaysPartialUpdate structure.
+type DcimDeviceBaysPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBaysPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysPartialUpdateOK creates a DcimDeviceBaysPartialUpdateOK with default headers values
+func NewDcimDeviceBaysPartialUpdateOK() *DcimDeviceBaysPartialUpdateOK {
+ return &DcimDeviceBaysPartialUpdateOK{}
+}
+
+/*DcimDeviceBaysPartialUpdateOK handles this case with default header values.
+
+DcimDeviceBaysPartialUpdateOK dcim device bays partial update o k
+*/
+type DcimDeviceBaysPartialUpdateOK struct {
+ Payload *models.WritableDeviceBay
+}
+
+func (o *DcimDeviceBaysPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/device-bays/{id}/][%d] dcimDeviceBaysPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBaysPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBay)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_parameters.go
new file mode 100644
index 0000000..f2812f5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceBaysReadParams creates a new DcimDeviceBaysReadParams object
+// with the default values initialized.
+func NewDcimDeviceBaysReadParams() *DcimDeviceBaysReadParams {
+ var ()
+ return &DcimDeviceBaysReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysReadParamsWithTimeout creates a new DcimDeviceBaysReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysReadParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysReadParams {
+ var ()
+ return &DcimDeviceBaysReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysReadParamsWithContext creates a new DcimDeviceBaysReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysReadParamsWithContext(ctx context.Context) *DcimDeviceBaysReadParams {
+ var ()
+ return &DcimDeviceBaysReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysReadParamsWithHTTPClient creates a new DcimDeviceBaysReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysReadParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysReadParams {
+ var ()
+ return &DcimDeviceBaysReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysReadParams contains all the parameters to send to the API endpoint
+for the dcim device bays read operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysReadParams struct {
+
+ /*ID
+ A unique integer value identifying this device bay.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) WithContext(ctx context.Context) *DcimDeviceBaysReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) WithID(id int64) *DcimDeviceBaysReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bays read params
+func (o *DcimDeviceBaysReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go
new file mode 100644
index 0000000..31ed1cf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBaysReadReader is a Reader for the DcimDeviceBaysRead structure.
+type DcimDeviceBaysReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBaysReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysReadOK creates a DcimDeviceBaysReadOK with default headers values
+func NewDcimDeviceBaysReadOK() *DcimDeviceBaysReadOK {
+ return &DcimDeviceBaysReadOK{}
+}
+
+/*DcimDeviceBaysReadOK handles this case with default header values.
+
+DcimDeviceBaysReadOK dcim device bays read o k
+*/
+type DcimDeviceBaysReadOK struct {
+ Payload *models.DeviceBay
+}
+
+func (o *DcimDeviceBaysReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-bays/{id}/][%d] dcimDeviceBaysReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBaysReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceBay)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_parameters.go
new file mode 100644
index 0000000..57ddad0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceBaysUpdateParams creates a new DcimDeviceBaysUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceBaysUpdateParams() *DcimDeviceBaysUpdateParams {
+ var ()
+ return &DcimDeviceBaysUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceBaysUpdateParamsWithTimeout creates a new DcimDeviceBaysUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceBaysUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceBaysUpdateParams {
+ var ()
+ return &DcimDeviceBaysUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceBaysUpdateParamsWithContext creates a new DcimDeviceBaysUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceBaysUpdateParamsWithContext(ctx context.Context) *DcimDeviceBaysUpdateParams {
+ var ()
+ return &DcimDeviceBaysUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceBaysUpdateParamsWithHTTPClient creates a new DcimDeviceBaysUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceBaysUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceBaysUpdateParams {
+ var ()
+ return &DcimDeviceBaysUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceBaysUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device bays update operation typically these are written to a http.Request
+*/
+type DcimDeviceBaysUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceBay
+ /*ID
+ A unique integer value identifying this device bay.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceBaysUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) WithContext(ctx context.Context) *DcimDeviceBaysUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceBaysUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) WithData(data *models.WritableDeviceBay) *DcimDeviceBaysUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) SetData(data *models.WritableDeviceBay) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) WithID(id int64) *DcimDeviceBaysUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device bays update params
+func (o *DcimDeviceBaysUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceBaysUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go
new file mode 100644
index 0000000..13b1951
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceBaysUpdateReader is a Reader for the DcimDeviceBaysUpdate structure.
+type DcimDeviceBaysUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceBaysUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceBaysUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceBaysUpdateOK creates a DcimDeviceBaysUpdateOK with default headers values
+func NewDcimDeviceBaysUpdateOK() *DcimDeviceBaysUpdateOK {
+ return &DcimDeviceBaysUpdateOK{}
+}
+
+/*DcimDeviceBaysUpdateOK handles this case with default header values.
+
+DcimDeviceBaysUpdateOK dcim device bays update o k
+*/
+type DcimDeviceBaysUpdateOK struct {
+ Payload *models.WritableDeviceBay
+}
+
+func (o *DcimDeviceBaysUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/device-bays/{id}/][%d] dcimDeviceBaysUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceBaysUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceBay)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_parameters.go
new file mode 100644
index 0000000..2fe6af2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceRolesCreateParams creates a new DcimDeviceRolesCreateParams object
+// with the default values initialized.
+func NewDcimDeviceRolesCreateParams() *DcimDeviceRolesCreateParams {
+ var ()
+ return &DcimDeviceRolesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesCreateParamsWithTimeout creates a new DcimDeviceRolesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesCreateParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesCreateParams {
+ var ()
+ return &DcimDeviceRolesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesCreateParamsWithContext creates a new DcimDeviceRolesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesCreateParamsWithContext(ctx context.Context) *DcimDeviceRolesCreateParams {
+ var ()
+ return &DcimDeviceRolesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesCreateParamsWithHTTPClient creates a new DcimDeviceRolesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesCreateParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesCreateParams {
+ var ()
+ return &DcimDeviceRolesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesCreateParams contains all the parameters to send to the API endpoint
+for the dcim device roles create operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesCreateParams struct {
+
+ /*Data*/
+ Data *models.DeviceRole
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) WithContext(ctx context.Context) *DcimDeviceRolesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) WithData(data *models.DeviceRole) *DcimDeviceRolesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device roles create params
+func (o *DcimDeviceRolesCreateParams) SetData(data *models.DeviceRole) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go
new file mode 100644
index 0000000..193ac10
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceRolesCreateReader is a Reader for the DcimDeviceRolesCreate structure.
+type DcimDeviceRolesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimDeviceRolesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesCreateCreated creates a DcimDeviceRolesCreateCreated with default headers values
+func NewDcimDeviceRolesCreateCreated() *DcimDeviceRolesCreateCreated {
+ return &DcimDeviceRolesCreateCreated{}
+}
+
+/*DcimDeviceRolesCreateCreated handles this case with default header values.
+
+DcimDeviceRolesCreateCreated dcim device roles create created
+*/
+type DcimDeviceRolesCreateCreated struct {
+ Payload *models.DeviceRole
+}
+
+func (o *DcimDeviceRolesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/device-roles/][%d] dcimDeviceRolesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimDeviceRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_parameters.go
new file mode 100644
index 0000000..689c2da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceRolesDeleteParams creates a new DcimDeviceRolesDeleteParams object
+// with the default values initialized.
+func NewDcimDeviceRolesDeleteParams() *DcimDeviceRolesDeleteParams {
+ var ()
+ return &DcimDeviceRolesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesDeleteParamsWithTimeout creates a new DcimDeviceRolesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesDeleteParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesDeleteParams {
+ var ()
+ return &DcimDeviceRolesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesDeleteParamsWithContext creates a new DcimDeviceRolesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesDeleteParamsWithContext(ctx context.Context) *DcimDeviceRolesDeleteParams {
+ var ()
+ return &DcimDeviceRolesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesDeleteParamsWithHTTPClient creates a new DcimDeviceRolesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesDeleteParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesDeleteParams {
+ var ()
+ return &DcimDeviceRolesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim device roles delete operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this device role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) WithContext(ctx context.Context) *DcimDeviceRolesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) WithID(id int64) *DcimDeviceRolesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device roles delete params
+func (o *DcimDeviceRolesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go
new file mode 100644
index 0000000..39a6838
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimDeviceRolesDeleteReader is a Reader for the DcimDeviceRolesDelete structure.
+type DcimDeviceRolesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimDeviceRolesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesDeleteNoContent creates a DcimDeviceRolesDeleteNoContent with default headers values
+func NewDcimDeviceRolesDeleteNoContent() *DcimDeviceRolesDeleteNoContent {
+ return &DcimDeviceRolesDeleteNoContent{}
+}
+
+/*DcimDeviceRolesDeleteNoContent handles this case with default header values.
+
+DcimDeviceRolesDeleteNoContent dcim device roles delete no content
+*/
+type DcimDeviceRolesDeleteNoContent struct {
+}
+
+func (o *DcimDeviceRolesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/device-roles/{id}/][%d] dcimDeviceRolesDeleteNoContent ", 204)
+}
+
+func (o *DcimDeviceRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_parameters.go
new file mode 100644
index 0000000..116a9f2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceRolesListParams creates a new DcimDeviceRolesListParams object
+// with the default values initialized.
+func NewDcimDeviceRolesListParams() *DcimDeviceRolesListParams {
+ var ()
+ return &DcimDeviceRolesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesListParamsWithTimeout creates a new DcimDeviceRolesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesListParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesListParams {
+ var ()
+ return &DcimDeviceRolesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesListParamsWithContext creates a new DcimDeviceRolesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesListParamsWithContext(ctx context.Context) *DcimDeviceRolesListParams {
+ var ()
+ return &DcimDeviceRolesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesListParamsWithHTTPClient creates a new DcimDeviceRolesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesListParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesListParams {
+ var ()
+ return &DcimDeviceRolesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesListParams contains all the parameters to send to the API endpoint
+for the dcim device roles list operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesListParams struct {
+
+ /*Color*/
+ Color *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+ /*VMRole*/
+ VMRole *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithContext(ctx context.Context) *DcimDeviceRolesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithColor adds the color to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithColor(color *string) *DcimDeviceRolesListParams {
+ o.SetColor(color)
+ return o
+}
+
+// SetColor adds the color to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetColor(color *string) {
+ o.Color = color
+}
+
+// WithLimit adds the limit to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithLimit(limit *int64) *DcimDeviceRolesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithName(name *string) *DcimDeviceRolesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithOffset(offset *int64) *DcimDeviceRolesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithSlug(slug *string) *DcimDeviceRolesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WithVMRole adds the vMRole to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) WithVMRole(vMRole *string) *DcimDeviceRolesListParams {
+ o.SetVMRole(vMRole)
+ return o
+}
+
+// SetVMRole adds the vmRole to the dcim device roles list params
+func (o *DcimDeviceRolesListParams) SetVMRole(vMRole *string) {
+ o.VMRole = vMRole
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Color != nil {
+
+ // query param color
+ var qrColor string
+ if o.Color != nil {
+ qrColor = *o.Color
+ }
+ qColor := qrColor
+ if qColor != "" {
+ if err := r.SetQueryParam("color", qColor); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VMRole != nil {
+
+ // query param vm_role
+ var qrVMRole string
+ if o.VMRole != nil {
+ qrVMRole = *o.VMRole
+ }
+ qVMRole := qrVMRole
+ if qVMRole != "" {
+ if err := r.SetQueryParam("vm_role", qVMRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go
new file mode 100644
index 0000000..d2708a0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceRolesListReader is a Reader for the DcimDeviceRolesList structure.
+type DcimDeviceRolesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceRolesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesListOK creates a DcimDeviceRolesListOK with default headers values
+func NewDcimDeviceRolesListOK() *DcimDeviceRolesListOK {
+ return &DcimDeviceRolesListOK{}
+}
+
+/*DcimDeviceRolesListOK handles this case with default header values.
+
+DcimDeviceRolesListOK dcim device roles list o k
+*/
+type DcimDeviceRolesListOK struct {
+ Payload *models.DcimDeviceRolesListOKBody
+}
+
+func (o *DcimDeviceRolesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-roles/][%d] dcimDeviceRolesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimDeviceRolesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go
new file mode 100644
index 0000000..10a3593
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceRolesPartialUpdateParams creates a new DcimDeviceRolesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceRolesPartialUpdateParams() *DcimDeviceRolesPartialUpdateParams {
+ var ()
+ return &DcimDeviceRolesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesPartialUpdateParamsWithTimeout creates a new DcimDeviceRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesPartialUpdateParams {
+ var ()
+ return &DcimDeviceRolesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesPartialUpdateParamsWithContext creates a new DcimDeviceRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesPartialUpdateParamsWithContext(ctx context.Context) *DcimDeviceRolesPartialUpdateParams {
+ var ()
+ return &DcimDeviceRolesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesPartialUpdateParamsWithHTTPClient creates a new DcimDeviceRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesPartialUpdateParams {
+ var ()
+ return &DcimDeviceRolesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device roles partial update operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.DeviceRole
+ /*ID
+ A unique integer value identifying this device role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) WithContext(ctx context.Context) *DcimDeviceRolesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) WithData(data *models.DeviceRole) *DcimDeviceRolesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) SetData(data *models.DeviceRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) WithID(id int64) *DcimDeviceRolesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device roles partial update params
+func (o *DcimDeviceRolesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go
new file mode 100644
index 0000000..87bcf68
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceRolesPartialUpdateReader is a Reader for the DcimDeviceRolesPartialUpdate structure.
+type DcimDeviceRolesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceRolesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesPartialUpdateOK creates a DcimDeviceRolesPartialUpdateOK with default headers values
+func NewDcimDeviceRolesPartialUpdateOK() *DcimDeviceRolesPartialUpdateOK {
+ return &DcimDeviceRolesPartialUpdateOK{}
+}
+
+/*DcimDeviceRolesPartialUpdateOK handles this case with default header values.
+
+DcimDeviceRolesPartialUpdateOK dcim device roles partial update o k
+*/
+type DcimDeviceRolesPartialUpdateOK struct {
+ Payload *models.DeviceRole
+}
+
+func (o *DcimDeviceRolesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/device-roles/{id}/][%d] dcimDeviceRolesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_parameters.go
new file mode 100644
index 0000000..979b3d6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceRolesReadParams creates a new DcimDeviceRolesReadParams object
+// with the default values initialized.
+func NewDcimDeviceRolesReadParams() *DcimDeviceRolesReadParams {
+ var ()
+ return &DcimDeviceRolesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesReadParamsWithTimeout creates a new DcimDeviceRolesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesReadParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesReadParams {
+ var ()
+ return &DcimDeviceRolesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesReadParamsWithContext creates a new DcimDeviceRolesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesReadParamsWithContext(ctx context.Context) *DcimDeviceRolesReadParams {
+ var ()
+ return &DcimDeviceRolesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesReadParamsWithHTTPClient creates a new DcimDeviceRolesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesReadParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesReadParams {
+ var ()
+ return &DcimDeviceRolesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesReadParams contains all the parameters to send to the API endpoint
+for the dcim device roles read operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this device role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) WithContext(ctx context.Context) *DcimDeviceRolesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) WithID(id int64) *DcimDeviceRolesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device roles read params
+func (o *DcimDeviceRolesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go
new file mode 100644
index 0000000..93b241f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceRolesReadReader is a Reader for the DcimDeviceRolesRead structure.
+type DcimDeviceRolesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceRolesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesReadOK creates a DcimDeviceRolesReadOK with default headers values
+func NewDcimDeviceRolesReadOK() *DcimDeviceRolesReadOK {
+ return &DcimDeviceRolesReadOK{}
+}
+
+/*DcimDeviceRolesReadOK handles this case with default header values.
+
+DcimDeviceRolesReadOK dcim device roles read o k
+*/
+type DcimDeviceRolesReadOK struct {
+ Payload *models.DeviceRole
+}
+
+func (o *DcimDeviceRolesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-roles/{id}/][%d] dcimDeviceRolesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_parameters.go
new file mode 100644
index 0000000..5f04604
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceRolesUpdateParams creates a new DcimDeviceRolesUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceRolesUpdateParams() *DcimDeviceRolesUpdateParams {
+ var ()
+ return &DcimDeviceRolesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceRolesUpdateParamsWithTimeout creates a new DcimDeviceRolesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceRolesUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceRolesUpdateParams {
+ var ()
+ return &DcimDeviceRolesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceRolesUpdateParamsWithContext creates a new DcimDeviceRolesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceRolesUpdateParamsWithContext(ctx context.Context) *DcimDeviceRolesUpdateParams {
+ var ()
+ return &DcimDeviceRolesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceRolesUpdateParamsWithHTTPClient creates a new DcimDeviceRolesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceRolesUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceRolesUpdateParams {
+ var ()
+ return &DcimDeviceRolesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceRolesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device roles update operation typically these are written to a http.Request
+*/
+type DcimDeviceRolesUpdateParams struct {
+
+ /*Data*/
+ Data *models.DeviceRole
+ /*ID
+ A unique integer value identifying this device role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceRolesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) WithContext(ctx context.Context) *DcimDeviceRolesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceRolesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) WithData(data *models.DeviceRole) *DcimDeviceRolesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) SetData(data *models.DeviceRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) WithID(id int64) *DcimDeviceRolesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device roles update params
+func (o *DcimDeviceRolesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go
new file mode 100644
index 0000000..5b1940f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceRolesUpdateReader is a Reader for the DcimDeviceRolesUpdate structure.
+type DcimDeviceRolesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceRolesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceRolesUpdateOK creates a DcimDeviceRolesUpdateOK with default headers values
+func NewDcimDeviceRolesUpdateOK() *DcimDeviceRolesUpdateOK {
+ return &DcimDeviceRolesUpdateOK{}
+}
+
+/*DcimDeviceRolesUpdateOK handles this case with default header values.
+
+DcimDeviceRolesUpdateOK dcim device roles update o k
+*/
+type DcimDeviceRolesUpdateOK struct {
+ Payload *models.DeviceRole
+}
+
+func (o *DcimDeviceRolesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/device-roles/{id}/][%d] dcimDeviceRolesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_parameters.go
new file mode 100644
index 0000000..731ca3f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceTypesCreateParams creates a new DcimDeviceTypesCreateParams object
+// with the default values initialized.
+func NewDcimDeviceTypesCreateParams() *DcimDeviceTypesCreateParams {
+ var ()
+ return &DcimDeviceTypesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesCreateParamsWithTimeout creates a new DcimDeviceTypesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesCreateParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesCreateParams {
+ var ()
+ return &DcimDeviceTypesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesCreateParamsWithContext creates a new DcimDeviceTypesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesCreateParamsWithContext(ctx context.Context) *DcimDeviceTypesCreateParams {
+ var ()
+ return &DcimDeviceTypesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesCreateParamsWithHTTPClient creates a new DcimDeviceTypesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesCreateParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesCreateParams {
+ var ()
+ return &DcimDeviceTypesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesCreateParams contains all the parameters to send to the API endpoint
+for the dcim device types create operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceType
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) WithContext(ctx context.Context) *DcimDeviceTypesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) WithData(data *models.WritableDeviceType) *DcimDeviceTypesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device types create params
+func (o *DcimDeviceTypesCreateParams) SetData(data *models.WritableDeviceType) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go
new file mode 100644
index 0000000..6d99a6e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceTypesCreateReader is a Reader for the DcimDeviceTypesCreate structure.
+type DcimDeviceTypesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimDeviceTypesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesCreateCreated creates a DcimDeviceTypesCreateCreated with default headers values
+func NewDcimDeviceTypesCreateCreated() *DcimDeviceTypesCreateCreated {
+ return &DcimDeviceTypesCreateCreated{}
+}
+
+/*DcimDeviceTypesCreateCreated handles this case with default header values.
+
+DcimDeviceTypesCreateCreated dcim device types create created
+*/
+type DcimDeviceTypesCreateCreated struct {
+ Payload *models.WritableDeviceType
+}
+
+func (o *DcimDeviceTypesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/device-types/][%d] dcimDeviceTypesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimDeviceTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_parameters.go
new file mode 100644
index 0000000..94e1e7e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceTypesDeleteParams creates a new DcimDeviceTypesDeleteParams object
+// with the default values initialized.
+func NewDcimDeviceTypesDeleteParams() *DcimDeviceTypesDeleteParams {
+ var ()
+ return &DcimDeviceTypesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesDeleteParamsWithTimeout creates a new DcimDeviceTypesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesDeleteParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesDeleteParams {
+ var ()
+ return &DcimDeviceTypesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesDeleteParamsWithContext creates a new DcimDeviceTypesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesDeleteParamsWithContext(ctx context.Context) *DcimDeviceTypesDeleteParams {
+ var ()
+ return &DcimDeviceTypesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesDeleteParamsWithHTTPClient creates a new DcimDeviceTypesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesDeleteParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesDeleteParams {
+ var ()
+ return &DcimDeviceTypesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim device types delete operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this device type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) WithContext(ctx context.Context) *DcimDeviceTypesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) WithID(id int64) *DcimDeviceTypesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device types delete params
+func (o *DcimDeviceTypesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go
new file mode 100644
index 0000000..f102108
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimDeviceTypesDeleteReader is a Reader for the DcimDeviceTypesDelete structure.
+type DcimDeviceTypesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimDeviceTypesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesDeleteNoContent creates a DcimDeviceTypesDeleteNoContent with default headers values
+func NewDcimDeviceTypesDeleteNoContent() *DcimDeviceTypesDeleteNoContent {
+ return &DcimDeviceTypesDeleteNoContent{}
+}
+
+/*DcimDeviceTypesDeleteNoContent handles this case with default header values.
+
+DcimDeviceTypesDeleteNoContent dcim device types delete no content
+*/
+type DcimDeviceTypesDeleteNoContent struct {
+}
+
+func (o *DcimDeviceTypesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/device-types/{id}/][%d] dcimDeviceTypesDeleteNoContent ", 204)
+}
+
+func (o *DcimDeviceTypesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_parameters.go
new file mode 100644
index 0000000..fe8a877
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_parameters.go
@@ -0,0 +1,575 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceTypesListParams creates a new DcimDeviceTypesListParams object
+// with the default values initialized.
+func NewDcimDeviceTypesListParams() *DcimDeviceTypesListParams {
+ var ()
+ return &DcimDeviceTypesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesListParamsWithTimeout creates a new DcimDeviceTypesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesListParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesListParams {
+ var ()
+ return &DcimDeviceTypesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesListParamsWithContext creates a new DcimDeviceTypesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesListParamsWithContext(ctx context.Context) *DcimDeviceTypesListParams {
+ var ()
+ return &DcimDeviceTypesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesListParamsWithHTTPClient creates a new DcimDeviceTypesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesListParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesListParams {
+ var ()
+ return &DcimDeviceTypesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesListParams contains all the parameters to send to the API endpoint
+for the dcim device types list operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesListParams struct {
+
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*IsConsoleServer*/
+ IsConsoleServer *string
+ /*IsFullDepth*/
+ IsFullDepth *string
+ /*IsNetworkDevice*/
+ IsNetworkDevice *string
+ /*IsPdu*/
+ IsPdu *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Manufacturer*/
+ Manufacturer *string
+ /*ManufacturerID*/
+ ManufacturerID *string
+ /*Model*/
+ Model *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*PartNumber*/
+ PartNumber *string
+ /*Q*/
+ Q *string
+ /*Slug*/
+ Slug *string
+ /*SubdeviceRole*/
+ SubdeviceRole *string
+ /*UHeight*/
+ UHeight *float64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithContext(ctx context.Context) *DcimDeviceTypesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithIDIn adds the iDIn to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithIDIn(iDIn *string) *DcimDeviceTypesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithIsConsoleServer adds the isConsoleServer to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithIsConsoleServer(isConsoleServer *string) *DcimDeviceTypesListParams {
+ o.SetIsConsoleServer(isConsoleServer)
+ return o
+}
+
+// SetIsConsoleServer adds the isConsoleServer to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetIsConsoleServer(isConsoleServer *string) {
+ o.IsConsoleServer = isConsoleServer
+}
+
+// WithIsFullDepth adds the isFullDepth to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithIsFullDepth(isFullDepth *string) *DcimDeviceTypesListParams {
+ o.SetIsFullDepth(isFullDepth)
+ return o
+}
+
+// SetIsFullDepth adds the isFullDepth to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetIsFullDepth(isFullDepth *string) {
+ o.IsFullDepth = isFullDepth
+}
+
+// WithIsNetworkDevice adds the isNetworkDevice to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithIsNetworkDevice(isNetworkDevice *string) *DcimDeviceTypesListParams {
+ o.SetIsNetworkDevice(isNetworkDevice)
+ return o
+}
+
+// SetIsNetworkDevice adds the isNetworkDevice to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetIsNetworkDevice(isNetworkDevice *string) {
+ o.IsNetworkDevice = isNetworkDevice
+}
+
+// WithIsPdu adds the isPdu to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithIsPdu(isPdu *string) *DcimDeviceTypesListParams {
+ o.SetIsPdu(isPdu)
+ return o
+}
+
+// SetIsPdu adds the isPdu to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetIsPdu(isPdu *string) {
+ o.IsPdu = isPdu
+}
+
+// WithLimit adds the limit to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithLimit(limit *int64) *DcimDeviceTypesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithManufacturer adds the manufacturer to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithManufacturer(manufacturer *string) *DcimDeviceTypesListParams {
+ o.SetManufacturer(manufacturer)
+ return o
+}
+
+// SetManufacturer adds the manufacturer to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetManufacturer(manufacturer *string) {
+ o.Manufacturer = manufacturer
+}
+
+// WithManufacturerID adds the manufacturerID to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithManufacturerID(manufacturerID *string) *DcimDeviceTypesListParams {
+ o.SetManufacturerID(manufacturerID)
+ return o
+}
+
+// SetManufacturerID adds the manufacturerId to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetManufacturerID(manufacturerID *string) {
+ o.ManufacturerID = manufacturerID
+}
+
+// WithModel adds the model to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithModel(model *string) *DcimDeviceTypesListParams {
+ o.SetModel(model)
+ return o
+}
+
+// SetModel adds the model to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetModel(model *string) {
+ o.Model = model
+}
+
+// WithOffset adds the offset to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithOffset(offset *int64) *DcimDeviceTypesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithPartNumber adds the partNumber to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithPartNumber(partNumber *string) *DcimDeviceTypesListParams {
+ o.SetPartNumber(partNumber)
+ return o
+}
+
+// SetPartNumber adds the partNumber to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetPartNumber(partNumber *string) {
+ o.PartNumber = partNumber
+}
+
+// WithQ adds the q to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithQ(q *string) *DcimDeviceTypesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSlug adds the slug to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithSlug(slug *string) *DcimDeviceTypesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WithSubdeviceRole adds the subdeviceRole to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithSubdeviceRole(subdeviceRole *string) *DcimDeviceTypesListParams {
+ o.SetSubdeviceRole(subdeviceRole)
+ return o
+}
+
+// SetSubdeviceRole adds the subdeviceRole to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetSubdeviceRole(subdeviceRole *string) {
+ o.SubdeviceRole = subdeviceRole
+}
+
+// WithUHeight adds the uHeight to the dcim device types list params
+func (o *DcimDeviceTypesListParams) WithUHeight(uHeight *float64) *DcimDeviceTypesListParams {
+ o.SetUHeight(uHeight)
+ return o
+}
+
+// SetUHeight adds the uHeight to the dcim device types list params
+func (o *DcimDeviceTypesListParams) SetUHeight(uHeight *float64) {
+ o.UHeight = uHeight
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsConsoleServer != nil {
+
+ // query param is_console_server
+ var qrIsConsoleServer string
+ if o.IsConsoleServer != nil {
+ qrIsConsoleServer = *o.IsConsoleServer
+ }
+ qIsConsoleServer := qrIsConsoleServer
+ if qIsConsoleServer != "" {
+ if err := r.SetQueryParam("is_console_server", qIsConsoleServer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsFullDepth != nil {
+
+ // query param is_full_depth
+ var qrIsFullDepth string
+ if o.IsFullDepth != nil {
+ qrIsFullDepth = *o.IsFullDepth
+ }
+ qIsFullDepth := qrIsFullDepth
+ if qIsFullDepth != "" {
+ if err := r.SetQueryParam("is_full_depth", qIsFullDepth); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsNetworkDevice != nil {
+
+ // query param is_network_device
+ var qrIsNetworkDevice string
+ if o.IsNetworkDevice != nil {
+ qrIsNetworkDevice = *o.IsNetworkDevice
+ }
+ qIsNetworkDevice := qrIsNetworkDevice
+ if qIsNetworkDevice != "" {
+ if err := r.SetQueryParam("is_network_device", qIsNetworkDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsPdu != nil {
+
+ // query param is_pdu
+ var qrIsPdu string
+ if o.IsPdu != nil {
+ qrIsPdu = *o.IsPdu
+ }
+ qIsPdu := qrIsPdu
+ if qIsPdu != "" {
+ if err := r.SetQueryParam("is_pdu", qIsPdu); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Manufacturer != nil {
+
+ // query param manufacturer
+ var qrManufacturer string
+ if o.Manufacturer != nil {
+ qrManufacturer = *o.Manufacturer
+ }
+ qManufacturer := qrManufacturer
+ if qManufacturer != "" {
+ if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ManufacturerID != nil {
+
+ // query param manufacturer_id
+ var qrManufacturerID string
+ if o.ManufacturerID != nil {
+ qrManufacturerID = *o.ManufacturerID
+ }
+ qManufacturerID := qrManufacturerID
+ if qManufacturerID != "" {
+ if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Model != nil {
+
+ // query param model
+ var qrModel string
+ if o.Model != nil {
+ qrModel = *o.Model
+ }
+ qModel := qrModel
+ if qModel != "" {
+ if err := r.SetQueryParam("model", qModel); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.PartNumber != nil {
+
+ // query param part_number
+ var qrPartNumber string
+ if o.PartNumber != nil {
+ qrPartNumber = *o.PartNumber
+ }
+ qPartNumber := qrPartNumber
+ if qPartNumber != "" {
+ if err := r.SetQueryParam("part_number", qPartNumber); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SubdeviceRole != nil {
+
+ // query param subdevice_role
+ var qrSubdeviceRole string
+ if o.SubdeviceRole != nil {
+ qrSubdeviceRole = *o.SubdeviceRole
+ }
+ qSubdeviceRole := qrSubdeviceRole
+ if qSubdeviceRole != "" {
+ if err := r.SetQueryParam("subdevice_role", qSubdeviceRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.UHeight != nil {
+
+ // query param u_height
+ var qrUHeight float64
+ if o.UHeight != nil {
+ qrUHeight = *o.UHeight
+ }
+ qUHeight := swag.FormatFloat64(qrUHeight)
+ if qUHeight != "" {
+ if err := r.SetQueryParam("u_height", qUHeight); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go
new file mode 100644
index 0000000..29254ff
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceTypesListReader is a Reader for the DcimDeviceTypesList structure.
+type DcimDeviceTypesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceTypesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesListOK creates a DcimDeviceTypesListOK with default headers values
+func NewDcimDeviceTypesListOK() *DcimDeviceTypesListOK {
+ return &DcimDeviceTypesListOK{}
+}
+
+/*DcimDeviceTypesListOK handles this case with default header values.
+
+DcimDeviceTypesListOK dcim device types list o k
+*/
+type DcimDeviceTypesListOK struct {
+ Payload *models.DcimDeviceTypesListOKBody
+}
+
+func (o *DcimDeviceTypesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-types/][%d] dcimDeviceTypesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimDeviceTypesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_parameters.go
new file mode 100644
index 0000000..bec757c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceTypesPartialUpdateParams creates a new DcimDeviceTypesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceTypesPartialUpdateParams() *DcimDeviceTypesPartialUpdateParams {
+ var ()
+ return &DcimDeviceTypesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesPartialUpdateParamsWithTimeout creates a new DcimDeviceTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesPartialUpdateParams {
+ var ()
+ return &DcimDeviceTypesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesPartialUpdateParamsWithContext creates a new DcimDeviceTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesPartialUpdateParamsWithContext(ctx context.Context) *DcimDeviceTypesPartialUpdateParams {
+ var ()
+ return &DcimDeviceTypesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesPartialUpdateParamsWithHTTPClient creates a new DcimDeviceTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesPartialUpdateParams {
+ var ()
+ return &DcimDeviceTypesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device types partial update operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceType
+ /*ID
+ A unique integer value identifying this device type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) WithContext(ctx context.Context) *DcimDeviceTypesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) WithData(data *models.WritableDeviceType) *DcimDeviceTypesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) SetData(data *models.WritableDeviceType) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) WithID(id int64) *DcimDeviceTypesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device types partial update params
+func (o *DcimDeviceTypesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go
new file mode 100644
index 0000000..ac54b2a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceTypesPartialUpdateReader is a Reader for the DcimDeviceTypesPartialUpdate structure.
+type DcimDeviceTypesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceTypesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesPartialUpdateOK creates a DcimDeviceTypesPartialUpdateOK with default headers values
+func NewDcimDeviceTypesPartialUpdateOK() *DcimDeviceTypesPartialUpdateOK {
+ return &DcimDeviceTypesPartialUpdateOK{}
+}
+
+/*DcimDeviceTypesPartialUpdateOK handles this case with default header values.
+
+DcimDeviceTypesPartialUpdateOK dcim device types partial update o k
+*/
+type DcimDeviceTypesPartialUpdateOK struct {
+ Payload *models.WritableDeviceType
+}
+
+func (o *DcimDeviceTypesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/device-types/{id}/][%d] dcimDeviceTypesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_parameters.go
new file mode 100644
index 0000000..e96e83f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDeviceTypesReadParams creates a new DcimDeviceTypesReadParams object
+// with the default values initialized.
+func NewDcimDeviceTypesReadParams() *DcimDeviceTypesReadParams {
+ var ()
+ return &DcimDeviceTypesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesReadParamsWithTimeout creates a new DcimDeviceTypesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesReadParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesReadParams {
+ var ()
+ return &DcimDeviceTypesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesReadParamsWithContext creates a new DcimDeviceTypesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesReadParamsWithContext(ctx context.Context) *DcimDeviceTypesReadParams {
+ var ()
+ return &DcimDeviceTypesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesReadParamsWithHTTPClient creates a new DcimDeviceTypesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesReadParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesReadParams {
+ var ()
+ return &DcimDeviceTypesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesReadParams contains all the parameters to send to the API endpoint
+for the dcim device types read operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this device type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) WithContext(ctx context.Context) *DcimDeviceTypesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) WithID(id int64) *DcimDeviceTypesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device types read params
+func (o *DcimDeviceTypesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go
new file mode 100644
index 0000000..0269f0b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceTypesReadReader is a Reader for the DcimDeviceTypesRead structure.
+type DcimDeviceTypesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceTypesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesReadOK creates a DcimDeviceTypesReadOK with default headers values
+func NewDcimDeviceTypesReadOK() *DcimDeviceTypesReadOK {
+ return &DcimDeviceTypesReadOK{}
+}
+
+/*DcimDeviceTypesReadOK handles this case with default header values.
+
+DcimDeviceTypesReadOK dcim device types read o k
+*/
+type DcimDeviceTypesReadOK struct {
+ Payload *models.DeviceType
+}
+
+func (o *DcimDeviceTypesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/device-types/{id}/][%d] dcimDeviceTypesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DeviceType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_parameters.go
new file mode 100644
index 0000000..f6d8d64
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDeviceTypesUpdateParams creates a new DcimDeviceTypesUpdateParams object
+// with the default values initialized.
+func NewDcimDeviceTypesUpdateParams() *DcimDeviceTypesUpdateParams {
+ var ()
+ return &DcimDeviceTypesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDeviceTypesUpdateParamsWithTimeout creates a new DcimDeviceTypesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDeviceTypesUpdateParamsWithTimeout(timeout time.Duration) *DcimDeviceTypesUpdateParams {
+ var ()
+ return &DcimDeviceTypesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDeviceTypesUpdateParamsWithContext creates a new DcimDeviceTypesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDeviceTypesUpdateParamsWithContext(ctx context.Context) *DcimDeviceTypesUpdateParams {
+ var ()
+ return &DcimDeviceTypesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDeviceTypesUpdateParamsWithHTTPClient creates a new DcimDeviceTypesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDeviceTypesUpdateParamsWithHTTPClient(client *http.Client) *DcimDeviceTypesUpdateParams {
+ var ()
+ return &DcimDeviceTypesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDeviceTypesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim device types update operation typically these are written to a http.Request
+*/
+type DcimDeviceTypesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDeviceType
+ /*ID
+ A unique integer value identifying this device type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) WithTimeout(timeout time.Duration) *DcimDeviceTypesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) WithContext(ctx context.Context) *DcimDeviceTypesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) WithHTTPClient(client *http.Client) *DcimDeviceTypesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) WithData(data *models.WritableDeviceType) *DcimDeviceTypesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) SetData(data *models.WritableDeviceType) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) WithID(id int64) *DcimDeviceTypesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim device types update params
+func (o *DcimDeviceTypesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDeviceTypesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go
new file mode 100644
index 0000000..00df505
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDeviceTypesUpdateReader is a Reader for the DcimDeviceTypesUpdate structure.
+type DcimDeviceTypesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDeviceTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDeviceTypesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDeviceTypesUpdateOK creates a DcimDeviceTypesUpdateOK with default headers values
+func NewDcimDeviceTypesUpdateOK() *DcimDeviceTypesUpdateOK {
+ return &DcimDeviceTypesUpdateOK{}
+}
+
+/*DcimDeviceTypesUpdateOK handles this case with default header values.
+
+DcimDeviceTypesUpdateOK dcim device types update o k
+*/
+type DcimDeviceTypesUpdateOK struct {
+ Payload *models.WritableDeviceType
+}
+
+func (o *DcimDeviceTypesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/device-types/{id}/][%d] dcimDeviceTypesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDeviceTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDeviceType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_parameters.go
new file mode 100644
index 0000000..6385b3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDevicesCreateParams creates a new DcimDevicesCreateParams object
+// with the default values initialized.
+func NewDcimDevicesCreateParams() *DcimDevicesCreateParams {
+ var ()
+ return &DcimDevicesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesCreateParamsWithTimeout creates a new DcimDevicesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesCreateParamsWithTimeout(timeout time.Duration) *DcimDevicesCreateParams {
+ var ()
+ return &DcimDevicesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesCreateParamsWithContext creates a new DcimDevicesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesCreateParamsWithContext(ctx context.Context) *DcimDevicesCreateParams {
+ var ()
+ return &DcimDevicesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesCreateParamsWithHTTPClient creates a new DcimDevicesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesCreateParamsWithHTTPClient(client *http.Client) *DcimDevicesCreateParams {
+ var ()
+ return &DcimDevicesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesCreateParams contains all the parameters to send to the API endpoint
+for the dcim devices create operation typically these are written to a http.Request
+*/
+type DcimDevicesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableDevice
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices create params
+func (o *DcimDevicesCreateParams) WithTimeout(timeout time.Duration) *DcimDevicesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices create params
+func (o *DcimDevicesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices create params
+func (o *DcimDevicesCreateParams) WithContext(ctx context.Context) *DcimDevicesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices create params
+func (o *DcimDevicesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices create params
+func (o *DcimDevicesCreateParams) WithHTTPClient(client *http.Client) *DcimDevicesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices create params
+func (o *DcimDevicesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim devices create params
+func (o *DcimDevicesCreateParams) WithData(data *models.WritableDevice) *DcimDevicesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim devices create params
+func (o *DcimDevicesCreateParams) SetData(data *models.WritableDevice) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go
new file mode 100644
index 0000000..5af4938
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesCreateReader is a Reader for the DcimDevicesCreate structure.
+type DcimDevicesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimDevicesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesCreateCreated creates a DcimDevicesCreateCreated with default headers values
+func NewDcimDevicesCreateCreated() *DcimDevicesCreateCreated {
+ return &DcimDevicesCreateCreated{}
+}
+
+/*DcimDevicesCreateCreated handles this case with default header values.
+
+DcimDevicesCreateCreated dcim devices create created
+*/
+type DcimDevicesCreateCreated struct {
+ Payload *models.WritableDevice
+}
+
+func (o *DcimDevicesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/devices/][%d] dcimDevicesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimDevicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDevice)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_parameters.go
new file mode 100644
index 0000000..0ad70d7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDevicesDeleteParams creates a new DcimDevicesDeleteParams object
+// with the default values initialized.
+func NewDcimDevicesDeleteParams() *DcimDevicesDeleteParams {
+ var ()
+ return &DcimDevicesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesDeleteParamsWithTimeout creates a new DcimDevicesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesDeleteParamsWithTimeout(timeout time.Duration) *DcimDevicesDeleteParams {
+ var ()
+ return &DcimDevicesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesDeleteParamsWithContext creates a new DcimDevicesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesDeleteParamsWithContext(ctx context.Context) *DcimDevicesDeleteParams {
+ var ()
+ return &DcimDevicesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesDeleteParamsWithHTTPClient creates a new DcimDevicesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesDeleteParamsWithHTTPClient(client *http.Client) *DcimDevicesDeleteParams {
+ var ()
+ return &DcimDevicesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim devices delete operation typically these are written to a http.Request
+*/
+type DcimDevicesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this device.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) WithTimeout(timeout time.Duration) *DcimDevicesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) WithContext(ctx context.Context) *DcimDevicesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) WithHTTPClient(client *http.Client) *DcimDevicesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) WithID(id int64) *DcimDevicesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim devices delete params
+func (o *DcimDevicesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go
new file mode 100644
index 0000000..1f2727f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimDevicesDeleteReader is a Reader for the DcimDevicesDelete structure.
+type DcimDevicesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimDevicesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesDeleteNoContent creates a DcimDevicesDeleteNoContent with default headers values
+func NewDcimDevicesDeleteNoContent() *DcimDevicesDeleteNoContent {
+ return &DcimDevicesDeleteNoContent{}
+}
+
+/*DcimDevicesDeleteNoContent handles this case with default header values.
+
+DcimDevicesDeleteNoContent dcim devices delete no content
+*/
+type DcimDevicesDeleteNoContent struct {
+}
+
+func (o *DcimDevicesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/devices/{id}/][%d] dcimDevicesDeleteNoContent ", 204)
+}
+
+func (o *DcimDevicesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_parameters.go
new file mode 100644
index 0000000..7e18af8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_parameters.go
@@ -0,0 +1,1039 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDevicesListParams creates a new DcimDevicesListParams object
+// with the default values initialized.
+func NewDcimDevicesListParams() *DcimDevicesListParams {
+ var ()
+ return &DcimDevicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesListParamsWithTimeout creates a new DcimDevicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesListParamsWithTimeout(timeout time.Duration) *DcimDevicesListParams {
+ var ()
+ return &DcimDevicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesListParamsWithContext creates a new DcimDevicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesListParamsWithContext(ctx context.Context) *DcimDevicesListParams {
+ var ()
+ return &DcimDevicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesListParamsWithHTTPClient creates a new DcimDevicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesListParamsWithHTTPClient(client *http.Client) *DcimDevicesListParams {
+ var ()
+ return &DcimDevicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesListParams contains all the parameters to send to the API endpoint
+for the dcim devices list operation typically these are written to a http.Request
+*/
+type DcimDevicesListParams struct {
+
+ /*AssetTag*/
+ AssetTag *string
+ /*ClusterID*/
+ ClusterID *string
+ /*DeviceTypeID*/
+ DeviceTypeID *string
+ /*HasPrimaryIP*/
+ HasPrimaryIP *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*IsConsoleServer*/
+ IsConsoleServer *string
+ /*IsFullDepth*/
+ IsFullDepth *string
+ /*IsNetworkDevice*/
+ IsNetworkDevice *string
+ /*IsPdu*/
+ IsPdu *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MacAddress*/
+ MacAddress *string
+ /*Manufacturer*/
+ Manufacturer *string
+ /*ManufacturerID*/
+ ManufacturerID *string
+ /*Model*/
+ Model *string
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Platform*/
+ Platform *string
+ /*PlatformID*/
+ PlatformID *string
+ /*Position*/
+ Position *float64
+ /*Q*/
+ Q *string
+ /*RackGroupID*/
+ RackGroupID *string
+ /*RackID*/
+ RackID *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+ /*Serial*/
+ Serial *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*VirtualChassisID*/
+ VirtualChassisID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices list params
+func (o *DcimDevicesListParams) WithTimeout(timeout time.Duration) *DcimDevicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices list params
+func (o *DcimDevicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices list params
+func (o *DcimDevicesListParams) WithContext(ctx context.Context) *DcimDevicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices list params
+func (o *DcimDevicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices list params
+func (o *DcimDevicesListParams) WithHTTPClient(client *http.Client) *DcimDevicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices list params
+func (o *DcimDevicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithAssetTag adds the assetTag to the dcim devices list params
+func (o *DcimDevicesListParams) WithAssetTag(assetTag *string) *DcimDevicesListParams {
+ o.SetAssetTag(assetTag)
+ return o
+}
+
+// SetAssetTag adds the assetTag to the dcim devices list params
+func (o *DcimDevicesListParams) SetAssetTag(assetTag *string) {
+ o.AssetTag = assetTag
+}
+
+// WithClusterID adds the clusterID to the dcim devices list params
+func (o *DcimDevicesListParams) WithClusterID(clusterID *string) *DcimDevicesListParams {
+ o.SetClusterID(clusterID)
+ return o
+}
+
+// SetClusterID adds the clusterId to the dcim devices list params
+func (o *DcimDevicesListParams) SetClusterID(clusterID *string) {
+ o.ClusterID = clusterID
+}
+
+// WithDeviceTypeID adds the deviceTypeID to the dcim devices list params
+func (o *DcimDevicesListParams) WithDeviceTypeID(deviceTypeID *string) *DcimDevicesListParams {
+ o.SetDeviceTypeID(deviceTypeID)
+ return o
+}
+
+// SetDeviceTypeID adds the deviceTypeId to the dcim devices list params
+func (o *DcimDevicesListParams) SetDeviceTypeID(deviceTypeID *string) {
+ o.DeviceTypeID = deviceTypeID
+}
+
+// WithHasPrimaryIP adds the hasPrimaryIP to the dcim devices list params
+func (o *DcimDevicesListParams) WithHasPrimaryIP(hasPrimaryIP *string) *DcimDevicesListParams {
+ o.SetHasPrimaryIP(hasPrimaryIP)
+ return o
+}
+
+// SetHasPrimaryIP adds the hasPrimaryIp to the dcim devices list params
+func (o *DcimDevicesListParams) SetHasPrimaryIP(hasPrimaryIP *string) {
+ o.HasPrimaryIP = hasPrimaryIP
+}
+
+// WithIDIn adds the iDIn to the dcim devices list params
+func (o *DcimDevicesListParams) WithIDIn(iDIn *string) *DcimDevicesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the dcim devices list params
+func (o *DcimDevicesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithIsConsoleServer adds the isConsoleServer to the dcim devices list params
+func (o *DcimDevicesListParams) WithIsConsoleServer(isConsoleServer *string) *DcimDevicesListParams {
+ o.SetIsConsoleServer(isConsoleServer)
+ return o
+}
+
+// SetIsConsoleServer adds the isConsoleServer to the dcim devices list params
+func (o *DcimDevicesListParams) SetIsConsoleServer(isConsoleServer *string) {
+ o.IsConsoleServer = isConsoleServer
+}
+
+// WithIsFullDepth adds the isFullDepth to the dcim devices list params
+func (o *DcimDevicesListParams) WithIsFullDepth(isFullDepth *string) *DcimDevicesListParams {
+ o.SetIsFullDepth(isFullDepth)
+ return o
+}
+
+// SetIsFullDepth adds the isFullDepth to the dcim devices list params
+func (o *DcimDevicesListParams) SetIsFullDepth(isFullDepth *string) {
+ o.IsFullDepth = isFullDepth
+}
+
+// WithIsNetworkDevice adds the isNetworkDevice to the dcim devices list params
+func (o *DcimDevicesListParams) WithIsNetworkDevice(isNetworkDevice *string) *DcimDevicesListParams {
+ o.SetIsNetworkDevice(isNetworkDevice)
+ return o
+}
+
+// SetIsNetworkDevice adds the isNetworkDevice to the dcim devices list params
+func (o *DcimDevicesListParams) SetIsNetworkDevice(isNetworkDevice *string) {
+ o.IsNetworkDevice = isNetworkDevice
+}
+
+// WithIsPdu adds the isPdu to the dcim devices list params
+func (o *DcimDevicesListParams) WithIsPdu(isPdu *string) *DcimDevicesListParams {
+ o.SetIsPdu(isPdu)
+ return o
+}
+
+// SetIsPdu adds the isPdu to the dcim devices list params
+func (o *DcimDevicesListParams) SetIsPdu(isPdu *string) {
+ o.IsPdu = isPdu
+}
+
+// WithLimit adds the limit to the dcim devices list params
+func (o *DcimDevicesListParams) WithLimit(limit *int64) *DcimDevicesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim devices list params
+func (o *DcimDevicesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMacAddress adds the macAddress to the dcim devices list params
+func (o *DcimDevicesListParams) WithMacAddress(macAddress *string) *DcimDevicesListParams {
+ o.SetMacAddress(macAddress)
+ return o
+}
+
+// SetMacAddress adds the macAddress to the dcim devices list params
+func (o *DcimDevicesListParams) SetMacAddress(macAddress *string) {
+ o.MacAddress = macAddress
+}
+
+// WithManufacturer adds the manufacturer to the dcim devices list params
+func (o *DcimDevicesListParams) WithManufacturer(manufacturer *string) *DcimDevicesListParams {
+ o.SetManufacturer(manufacturer)
+ return o
+}
+
+// SetManufacturer adds the manufacturer to the dcim devices list params
+func (o *DcimDevicesListParams) SetManufacturer(manufacturer *string) {
+ o.Manufacturer = manufacturer
+}
+
+// WithManufacturerID adds the manufacturerID to the dcim devices list params
+func (o *DcimDevicesListParams) WithManufacturerID(manufacturerID *string) *DcimDevicesListParams {
+ o.SetManufacturerID(manufacturerID)
+ return o
+}
+
+// SetManufacturerID adds the manufacturerId to the dcim devices list params
+func (o *DcimDevicesListParams) SetManufacturerID(manufacturerID *string) {
+ o.ManufacturerID = manufacturerID
+}
+
+// WithModel adds the model to the dcim devices list params
+func (o *DcimDevicesListParams) WithModel(model *string) *DcimDevicesListParams {
+ o.SetModel(model)
+ return o
+}
+
+// SetModel adds the model to the dcim devices list params
+func (o *DcimDevicesListParams) SetModel(model *string) {
+ o.Model = model
+}
+
+// WithName adds the name to the dcim devices list params
+func (o *DcimDevicesListParams) WithName(name *string) *DcimDevicesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim devices list params
+func (o *DcimDevicesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim devices list params
+func (o *DcimDevicesListParams) WithOffset(offset *int64) *DcimDevicesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim devices list params
+func (o *DcimDevicesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithPlatform adds the platform to the dcim devices list params
+func (o *DcimDevicesListParams) WithPlatform(platform *string) *DcimDevicesListParams {
+ o.SetPlatform(platform)
+ return o
+}
+
+// SetPlatform adds the platform to the dcim devices list params
+func (o *DcimDevicesListParams) SetPlatform(platform *string) {
+ o.Platform = platform
+}
+
+// WithPlatformID adds the platformID to the dcim devices list params
+func (o *DcimDevicesListParams) WithPlatformID(platformID *string) *DcimDevicesListParams {
+ o.SetPlatformID(platformID)
+ return o
+}
+
+// SetPlatformID adds the platformId to the dcim devices list params
+func (o *DcimDevicesListParams) SetPlatformID(platformID *string) {
+ o.PlatformID = platformID
+}
+
+// WithPosition adds the position to the dcim devices list params
+func (o *DcimDevicesListParams) WithPosition(position *float64) *DcimDevicesListParams {
+ o.SetPosition(position)
+ return o
+}
+
+// SetPosition adds the position to the dcim devices list params
+func (o *DcimDevicesListParams) SetPosition(position *float64) {
+ o.Position = position
+}
+
+// WithQ adds the q to the dcim devices list params
+func (o *DcimDevicesListParams) WithQ(q *string) *DcimDevicesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim devices list params
+func (o *DcimDevicesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRackGroupID adds the rackGroupID to the dcim devices list params
+func (o *DcimDevicesListParams) WithRackGroupID(rackGroupID *string) *DcimDevicesListParams {
+ o.SetRackGroupID(rackGroupID)
+ return o
+}
+
+// SetRackGroupID adds the rackGroupId to the dcim devices list params
+func (o *DcimDevicesListParams) SetRackGroupID(rackGroupID *string) {
+ o.RackGroupID = rackGroupID
+}
+
+// WithRackID adds the rackID to the dcim devices list params
+func (o *DcimDevicesListParams) WithRackID(rackID *string) *DcimDevicesListParams {
+ o.SetRackID(rackID)
+ return o
+}
+
+// SetRackID adds the rackId to the dcim devices list params
+func (o *DcimDevicesListParams) SetRackID(rackID *string) {
+ o.RackID = rackID
+}
+
+// WithRole adds the role to the dcim devices list params
+func (o *DcimDevicesListParams) WithRole(role *string) *DcimDevicesListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the dcim devices list params
+func (o *DcimDevicesListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the dcim devices list params
+func (o *DcimDevicesListParams) WithRoleID(roleID *string) *DcimDevicesListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the dcim devices list params
+func (o *DcimDevicesListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WithSerial adds the serial to the dcim devices list params
+func (o *DcimDevicesListParams) WithSerial(serial *string) *DcimDevicesListParams {
+ o.SetSerial(serial)
+ return o
+}
+
+// SetSerial adds the serial to the dcim devices list params
+func (o *DcimDevicesListParams) SetSerial(serial *string) {
+ o.Serial = serial
+}
+
+// WithSite adds the site to the dcim devices list params
+func (o *DcimDevicesListParams) WithSite(site *string) *DcimDevicesListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim devices list params
+func (o *DcimDevicesListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the dcim devices list params
+func (o *DcimDevicesListParams) WithSiteID(siteID *string) *DcimDevicesListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the dcim devices list params
+func (o *DcimDevicesListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithStatus adds the status to the dcim devices list params
+func (o *DcimDevicesListParams) WithStatus(status *string) *DcimDevicesListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the dcim devices list params
+func (o *DcimDevicesListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the dcim devices list params
+func (o *DcimDevicesListParams) WithTenant(tenant *string) *DcimDevicesListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the dcim devices list params
+func (o *DcimDevicesListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the dcim devices list params
+func (o *DcimDevicesListParams) WithTenantID(tenantID *string) *DcimDevicesListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the dcim devices list params
+func (o *DcimDevicesListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithVirtualChassisID adds the virtualChassisID to the dcim devices list params
+func (o *DcimDevicesListParams) WithVirtualChassisID(virtualChassisID *string) *DcimDevicesListParams {
+ o.SetVirtualChassisID(virtualChassisID)
+ return o
+}
+
+// SetVirtualChassisID adds the virtualChassisId to the dcim devices list params
+func (o *DcimDevicesListParams) SetVirtualChassisID(virtualChassisID *string) {
+ o.VirtualChassisID = virtualChassisID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.AssetTag != nil {
+
+ // query param asset_tag
+ var qrAssetTag string
+ if o.AssetTag != nil {
+ qrAssetTag = *o.AssetTag
+ }
+ qAssetTag := qrAssetTag
+ if qAssetTag != "" {
+ if err := r.SetQueryParam("asset_tag", qAssetTag); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterID != nil {
+
+ // query param cluster_id
+ var qrClusterID string
+ if o.ClusterID != nil {
+ qrClusterID = *o.ClusterID
+ }
+ qClusterID := qrClusterID
+ if qClusterID != "" {
+ if err := r.SetQueryParam("cluster_id", qClusterID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceTypeID != nil {
+
+ // query param device_type_id
+ var qrDeviceTypeID string
+ if o.DeviceTypeID != nil {
+ qrDeviceTypeID = *o.DeviceTypeID
+ }
+ qDeviceTypeID := qrDeviceTypeID
+ if qDeviceTypeID != "" {
+ if err := r.SetQueryParam("device_type_id", qDeviceTypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.HasPrimaryIP != nil {
+
+ // query param has_primary_ip
+ var qrHasPrimaryIP string
+ if o.HasPrimaryIP != nil {
+ qrHasPrimaryIP = *o.HasPrimaryIP
+ }
+ qHasPrimaryIP := qrHasPrimaryIP
+ if qHasPrimaryIP != "" {
+ if err := r.SetQueryParam("has_primary_ip", qHasPrimaryIP); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsConsoleServer != nil {
+
+ // query param is_console_server
+ var qrIsConsoleServer string
+ if o.IsConsoleServer != nil {
+ qrIsConsoleServer = *o.IsConsoleServer
+ }
+ qIsConsoleServer := qrIsConsoleServer
+ if qIsConsoleServer != "" {
+ if err := r.SetQueryParam("is_console_server", qIsConsoleServer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsFullDepth != nil {
+
+ // query param is_full_depth
+ var qrIsFullDepth string
+ if o.IsFullDepth != nil {
+ qrIsFullDepth = *o.IsFullDepth
+ }
+ qIsFullDepth := qrIsFullDepth
+ if qIsFullDepth != "" {
+ if err := r.SetQueryParam("is_full_depth", qIsFullDepth); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsNetworkDevice != nil {
+
+ // query param is_network_device
+ var qrIsNetworkDevice string
+ if o.IsNetworkDevice != nil {
+ qrIsNetworkDevice = *o.IsNetworkDevice
+ }
+ qIsNetworkDevice := qrIsNetworkDevice
+ if qIsNetworkDevice != "" {
+ if err := r.SetQueryParam("is_network_device", qIsNetworkDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsPdu != nil {
+
+ // query param is_pdu
+ var qrIsPdu string
+ if o.IsPdu != nil {
+ qrIsPdu = *o.IsPdu
+ }
+ qIsPdu := qrIsPdu
+ if qIsPdu != "" {
+ if err := r.SetQueryParam("is_pdu", qIsPdu); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MacAddress != nil {
+
+ // query param mac_address
+ var qrMacAddress string
+ if o.MacAddress != nil {
+ qrMacAddress = *o.MacAddress
+ }
+ qMacAddress := qrMacAddress
+ if qMacAddress != "" {
+ if err := r.SetQueryParam("mac_address", qMacAddress); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Manufacturer != nil {
+
+ // query param manufacturer
+ var qrManufacturer string
+ if o.Manufacturer != nil {
+ qrManufacturer = *o.Manufacturer
+ }
+ qManufacturer := qrManufacturer
+ if qManufacturer != "" {
+ if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ManufacturerID != nil {
+
+ // query param manufacturer_id
+ var qrManufacturerID string
+ if o.ManufacturerID != nil {
+ qrManufacturerID = *o.ManufacturerID
+ }
+ qManufacturerID := qrManufacturerID
+ if qManufacturerID != "" {
+ if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Model != nil {
+
+ // query param model
+ var qrModel string
+ if o.Model != nil {
+ qrModel = *o.Model
+ }
+ qModel := qrModel
+ if qModel != "" {
+ if err := r.SetQueryParam("model", qModel); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Platform != nil {
+
+ // query param platform
+ var qrPlatform string
+ if o.Platform != nil {
+ qrPlatform = *o.Platform
+ }
+ qPlatform := qrPlatform
+ if qPlatform != "" {
+ if err := r.SetQueryParam("platform", qPlatform); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.PlatformID != nil {
+
+ // query param platform_id
+ var qrPlatformID string
+ if o.PlatformID != nil {
+ qrPlatformID = *o.PlatformID
+ }
+ qPlatformID := qrPlatformID
+ if qPlatformID != "" {
+ if err := r.SetQueryParam("platform_id", qPlatformID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Position != nil {
+
+ // query param position
+ var qrPosition float64
+ if o.Position != nil {
+ qrPosition = *o.Position
+ }
+ qPosition := swag.FormatFloat64(qrPosition)
+ if qPosition != "" {
+ if err := r.SetQueryParam("position", qPosition); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RackGroupID != nil {
+
+ // query param rack_group_id
+ var qrRackGroupID string
+ if o.RackGroupID != nil {
+ qrRackGroupID = *o.RackGroupID
+ }
+ qRackGroupID := qrRackGroupID
+ if qRackGroupID != "" {
+ if err := r.SetQueryParam("rack_group_id", qRackGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RackID != nil {
+
+ // query param rack_id
+ var qrRackID string
+ if o.RackID != nil {
+ qrRackID = *o.RackID
+ }
+ qRackID := qrRackID
+ if qRackID != "" {
+ if err := r.SetQueryParam("rack_id", qRackID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Serial != nil {
+
+ // query param serial
+ var qrSerial string
+ if o.Serial != nil {
+ qrSerial = *o.Serial
+ }
+ qSerial := qrSerial
+ if qSerial != "" {
+ if err := r.SetQueryParam("serial", qSerial); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualChassisID != nil {
+
+ // query param virtual_chassis_id
+ var qrVirtualChassisID string
+ if o.VirtualChassisID != nil {
+ qrVirtualChassisID = *o.VirtualChassisID
+ }
+ qVirtualChassisID := qrVirtualChassisID
+ if qVirtualChassisID != "" {
+ if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go
new file mode 100644
index 0000000..8c2d569
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesListReader is a Reader for the DcimDevicesList structure.
+type DcimDevicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDevicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesListOK creates a DcimDevicesListOK with default headers values
+func NewDcimDevicesListOK() *DcimDevicesListOK {
+ return &DcimDevicesListOK{}
+}
+
+/*DcimDevicesListOK handles this case with default header values.
+
+DcimDevicesListOK dcim devices list o k
+*/
+type DcimDevicesListOK struct {
+ Payload *models.DcimDevicesListOKBody
+}
+
+func (o *DcimDevicesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/devices/][%d] dcimDevicesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDevicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimDevicesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_parameters.go
new file mode 100644
index 0000000..c23967a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDevicesNapalmParams creates a new DcimDevicesNapalmParams object
+// with the default values initialized.
+func NewDcimDevicesNapalmParams() *DcimDevicesNapalmParams {
+ var ()
+ return &DcimDevicesNapalmParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesNapalmParamsWithTimeout creates a new DcimDevicesNapalmParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesNapalmParamsWithTimeout(timeout time.Duration) *DcimDevicesNapalmParams {
+ var ()
+ return &DcimDevicesNapalmParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesNapalmParamsWithContext creates a new DcimDevicesNapalmParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesNapalmParamsWithContext(ctx context.Context) *DcimDevicesNapalmParams {
+ var ()
+ return &DcimDevicesNapalmParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesNapalmParamsWithHTTPClient creates a new DcimDevicesNapalmParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesNapalmParamsWithHTTPClient(client *http.Client) *DcimDevicesNapalmParams {
+ var ()
+ return &DcimDevicesNapalmParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesNapalmParams contains all the parameters to send to the API endpoint
+for the dcim devices napalm operation typically these are written to a http.Request
+*/
+type DcimDevicesNapalmParams struct {
+
+ /*ID
+ A unique integer value identifying this device.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) WithTimeout(timeout time.Duration) *DcimDevicesNapalmParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) WithContext(ctx context.Context) *DcimDevicesNapalmParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) WithHTTPClient(client *http.Client) *DcimDevicesNapalmParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) WithID(id int64) *DcimDevicesNapalmParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim devices napalm params
+func (o *DcimDevicesNapalmParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesNapalmParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go
new file mode 100644
index 0000000..60a60dc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesNapalmReader is a Reader for the DcimDevicesNapalm structure.
+type DcimDevicesNapalmReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesNapalmReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDevicesNapalmOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesNapalmOK creates a DcimDevicesNapalmOK with default headers values
+func NewDcimDevicesNapalmOK() *DcimDevicesNapalmOK {
+ return &DcimDevicesNapalmOK{}
+}
+
+/*DcimDevicesNapalmOK handles this case with default header values.
+
+DcimDevicesNapalmOK dcim devices napalm o k
+*/
+type DcimDevicesNapalmOK struct {
+ Payload *models.Device
+}
+
+func (o *DcimDevicesNapalmOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/devices/{id}/napalm/][%d] dcimDevicesNapalmOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDevicesNapalmOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Device)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_parameters.go
new file mode 100644
index 0000000..4a3bc2c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDevicesPartialUpdateParams creates a new DcimDevicesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimDevicesPartialUpdateParams() *DcimDevicesPartialUpdateParams {
+ var ()
+ return &DcimDevicesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesPartialUpdateParamsWithTimeout creates a new DcimDevicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimDevicesPartialUpdateParams {
+ var ()
+ return &DcimDevicesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesPartialUpdateParamsWithContext creates a new DcimDevicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesPartialUpdateParamsWithContext(ctx context.Context) *DcimDevicesPartialUpdateParams {
+ var ()
+ return &DcimDevicesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesPartialUpdateParamsWithHTTPClient creates a new DcimDevicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimDevicesPartialUpdateParams {
+ var ()
+ return &DcimDevicesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim devices partial update operation typically these are written to a http.Request
+*/
+type DcimDevicesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDevice
+ /*ID
+ A unique integer value identifying this device.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimDevicesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) WithContext(ctx context.Context) *DcimDevicesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimDevicesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) WithData(data *models.WritableDevice) *DcimDevicesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) SetData(data *models.WritableDevice) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) WithID(id int64) *DcimDevicesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim devices partial update params
+func (o *DcimDevicesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go
new file mode 100644
index 0000000..2193368
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesPartialUpdateReader is a Reader for the DcimDevicesPartialUpdate structure.
+type DcimDevicesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDevicesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesPartialUpdateOK creates a DcimDevicesPartialUpdateOK with default headers values
+func NewDcimDevicesPartialUpdateOK() *DcimDevicesPartialUpdateOK {
+ return &DcimDevicesPartialUpdateOK{}
+}
+
+/*DcimDevicesPartialUpdateOK handles this case with default header values.
+
+DcimDevicesPartialUpdateOK dcim devices partial update o k
+*/
+type DcimDevicesPartialUpdateOK struct {
+ Payload *models.WritableDevice
+}
+
+func (o *DcimDevicesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/devices/{id}/][%d] dcimDevicesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDevicesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDevice)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_parameters.go
new file mode 100644
index 0000000..a72431e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimDevicesReadParams creates a new DcimDevicesReadParams object
+// with the default values initialized.
+func NewDcimDevicesReadParams() *DcimDevicesReadParams {
+ var ()
+ return &DcimDevicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesReadParamsWithTimeout creates a new DcimDevicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesReadParamsWithTimeout(timeout time.Duration) *DcimDevicesReadParams {
+ var ()
+ return &DcimDevicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesReadParamsWithContext creates a new DcimDevicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesReadParamsWithContext(ctx context.Context) *DcimDevicesReadParams {
+ var ()
+ return &DcimDevicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesReadParamsWithHTTPClient creates a new DcimDevicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesReadParamsWithHTTPClient(client *http.Client) *DcimDevicesReadParams {
+ var ()
+ return &DcimDevicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesReadParams contains all the parameters to send to the API endpoint
+for the dcim devices read operation typically these are written to a http.Request
+*/
+type DcimDevicesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this device.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices read params
+func (o *DcimDevicesReadParams) WithTimeout(timeout time.Duration) *DcimDevicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices read params
+func (o *DcimDevicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices read params
+func (o *DcimDevicesReadParams) WithContext(ctx context.Context) *DcimDevicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices read params
+func (o *DcimDevicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices read params
+func (o *DcimDevicesReadParams) WithHTTPClient(client *http.Client) *DcimDevicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices read params
+func (o *DcimDevicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim devices read params
+func (o *DcimDevicesReadParams) WithID(id int64) *DcimDevicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim devices read params
+func (o *DcimDevicesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go
new file mode 100644
index 0000000..25f29c0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesReadReader is a Reader for the DcimDevicesRead structure.
+type DcimDevicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDevicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesReadOK creates a DcimDevicesReadOK with default headers values
+func NewDcimDevicesReadOK() *DcimDevicesReadOK {
+ return &DcimDevicesReadOK{}
+}
+
+/*DcimDevicesReadOK handles this case with default header values.
+
+DcimDevicesReadOK dcim devices read o k
+*/
+type DcimDevicesReadOK struct {
+ Payload *models.Device
+}
+
+func (o *DcimDevicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/devices/{id}/][%d] dcimDevicesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDevicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Device)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_parameters.go
new file mode 100644
index 0000000..f2a84ad
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimDevicesUpdateParams creates a new DcimDevicesUpdateParams object
+// with the default values initialized.
+func NewDcimDevicesUpdateParams() *DcimDevicesUpdateParams {
+ var ()
+ return &DcimDevicesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimDevicesUpdateParamsWithTimeout creates a new DcimDevicesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimDevicesUpdateParamsWithTimeout(timeout time.Duration) *DcimDevicesUpdateParams {
+ var ()
+ return &DcimDevicesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimDevicesUpdateParamsWithContext creates a new DcimDevicesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimDevicesUpdateParamsWithContext(ctx context.Context) *DcimDevicesUpdateParams {
+ var ()
+ return &DcimDevicesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimDevicesUpdateParamsWithHTTPClient creates a new DcimDevicesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimDevicesUpdateParamsWithHTTPClient(client *http.Client) *DcimDevicesUpdateParams {
+ var ()
+ return &DcimDevicesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimDevicesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim devices update operation typically these are written to a http.Request
+*/
+type DcimDevicesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableDevice
+ /*ID
+ A unique integer value identifying this device.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim devices update params
+func (o *DcimDevicesUpdateParams) WithTimeout(timeout time.Duration) *DcimDevicesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim devices update params
+func (o *DcimDevicesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim devices update params
+func (o *DcimDevicesUpdateParams) WithContext(ctx context.Context) *DcimDevicesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim devices update params
+func (o *DcimDevicesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim devices update params
+func (o *DcimDevicesUpdateParams) WithHTTPClient(client *http.Client) *DcimDevicesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim devices update params
+func (o *DcimDevicesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim devices update params
+func (o *DcimDevicesUpdateParams) WithData(data *models.WritableDevice) *DcimDevicesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim devices update params
+func (o *DcimDevicesUpdateParams) SetData(data *models.WritableDevice) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim devices update params
+func (o *DcimDevicesUpdateParams) WithID(id int64) *DcimDevicesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim devices update params
+func (o *DcimDevicesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimDevicesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go
new file mode 100644
index 0000000..4fae46c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimDevicesUpdateReader is a Reader for the DcimDevicesUpdate structure.
+type DcimDevicesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimDevicesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimDevicesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimDevicesUpdateOK creates a DcimDevicesUpdateOK with default headers values
+func NewDcimDevicesUpdateOK() *DcimDevicesUpdateOK {
+ return &DcimDevicesUpdateOK{}
+}
+
+/*DcimDevicesUpdateOK handles this case with default header values.
+
+DcimDevicesUpdateOK dcim devices update o k
+*/
+type DcimDevicesUpdateOK struct {
+ Payload *models.WritableDevice
+}
+
+func (o *DcimDevicesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/devices/{id}/][%d] dcimDevicesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimDevicesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableDevice)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_parameters.go
new file mode 100644
index 0000000..4231057
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceConnectionsCreateParams creates a new DcimInterfaceConnectionsCreateParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsCreateParams() *DcimInterfaceConnectionsCreateParams {
+ var ()
+ return &DcimInterfaceConnectionsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsCreateParamsWithTimeout creates a new DcimInterfaceConnectionsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsCreateParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsCreateParams {
+ var ()
+ return &DcimInterfaceConnectionsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsCreateParamsWithContext creates a new DcimInterfaceConnectionsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsCreateParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsCreateParams {
+ var ()
+ return &DcimInterfaceConnectionsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsCreateParamsWithHTTPClient creates a new DcimInterfaceConnectionsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsCreateParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsCreateParams {
+ var ()
+ return &DcimInterfaceConnectionsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsCreateParams contains all the parameters to send to the API endpoint
+for the dcim interface connections create operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceConnection
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) WithData(data *models.WritableInterfaceConnection) *DcimInterfaceConnectionsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface connections create params
+func (o *DcimInterfaceConnectionsCreateParams) SetData(data *models.WritableInterfaceConnection) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_responses.go
new file mode 100644
index 0000000..ca5040e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceConnectionsCreateReader is a Reader for the DcimInterfaceConnectionsCreate structure.
+type DcimInterfaceConnectionsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimInterfaceConnectionsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsCreateCreated creates a DcimInterfaceConnectionsCreateCreated with default headers values
+func NewDcimInterfaceConnectionsCreateCreated() *DcimInterfaceConnectionsCreateCreated {
+ return &DcimInterfaceConnectionsCreateCreated{}
+}
+
+/*DcimInterfaceConnectionsCreateCreated handles this case with default header values.
+
+DcimInterfaceConnectionsCreateCreated dcim interface connections create created
+*/
+type DcimInterfaceConnectionsCreateCreated struct {
+ Payload *models.WritableInterfaceConnection
+}
+
+func (o *DcimInterfaceConnectionsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/interface-connections/][%d] dcimInterfaceConnectionsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimInterfaceConnectionsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceConnection)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_parameters.go
new file mode 100644
index 0000000..b392d95
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceConnectionsDeleteParams creates a new DcimInterfaceConnectionsDeleteParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsDeleteParams() *DcimInterfaceConnectionsDeleteParams {
+ var ()
+ return &DcimInterfaceConnectionsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsDeleteParamsWithTimeout creates a new DcimInterfaceConnectionsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsDeleteParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsDeleteParams {
+ var ()
+ return &DcimInterfaceConnectionsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsDeleteParamsWithContext creates a new DcimInterfaceConnectionsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsDeleteParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsDeleteParams {
+ var ()
+ return &DcimInterfaceConnectionsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsDeleteParamsWithHTTPClient creates a new DcimInterfaceConnectionsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsDeleteParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsDeleteParams {
+ var ()
+ return &DcimInterfaceConnectionsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim interface connections delete operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this interface connection.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) WithID(id int64) *DcimInterfaceConnectionsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface connections delete params
+func (o *DcimInterfaceConnectionsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_responses.go
new file mode 100644
index 0000000..061d954
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimInterfaceConnectionsDeleteReader is a Reader for the DcimInterfaceConnectionsDelete structure.
+type DcimInterfaceConnectionsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimInterfaceConnectionsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsDeleteNoContent creates a DcimInterfaceConnectionsDeleteNoContent with default headers values
+func NewDcimInterfaceConnectionsDeleteNoContent() *DcimInterfaceConnectionsDeleteNoContent {
+ return &DcimInterfaceConnectionsDeleteNoContent{}
+}
+
+/*DcimInterfaceConnectionsDeleteNoContent handles this case with default header values.
+
+DcimInterfaceConnectionsDeleteNoContent dcim interface connections delete no content
+*/
+type DcimInterfaceConnectionsDeleteNoContent struct {
+}
+
+func (o *DcimInterfaceConnectionsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/interface-connections/{id}/][%d] dcimInterfaceConnectionsDeleteNoContent ", 204)
+}
+
+func (o *DcimInterfaceConnectionsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_parameters.go
new file mode 100644
index 0000000..5e6c1bd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceConnectionsListParams creates a new DcimInterfaceConnectionsListParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsListParams() *DcimInterfaceConnectionsListParams {
+ var ()
+ return &DcimInterfaceConnectionsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsListParamsWithTimeout creates a new DcimInterfaceConnectionsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsListParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsListParams {
+ var ()
+ return &DcimInterfaceConnectionsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsListParamsWithContext creates a new DcimInterfaceConnectionsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsListParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsListParams {
+ var ()
+ return &DcimInterfaceConnectionsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsListParamsWithHTTPClient creates a new DcimInterfaceConnectionsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsListParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsListParams {
+ var ()
+ return &DcimInterfaceConnectionsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsListParams contains all the parameters to send to the API endpoint
+for the dcim interface connections list operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsListParams struct {
+
+ /*ConnectionStatus*/
+ ConnectionStatus *string
+ /*Device*/
+ Device *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithConnectionStatus adds the connectionStatus to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithConnectionStatus(connectionStatus *string) *DcimInterfaceConnectionsListParams {
+ o.SetConnectionStatus(connectionStatus)
+ return o
+}
+
+// SetConnectionStatus adds the connectionStatus to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetConnectionStatus(connectionStatus *string) {
+ o.ConnectionStatus = connectionStatus
+}
+
+// WithDevice adds the device to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithDevice(device *string) *DcimInterfaceConnectionsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithLimit adds the limit to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithLimit(limit *int64) *DcimInterfaceConnectionsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithOffset(offset *int64) *DcimInterfaceConnectionsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) WithSite(site *string) *DcimInterfaceConnectionsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim interface connections list params
+func (o *DcimInterfaceConnectionsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.ConnectionStatus != nil {
+
+ // query param connection_status
+ var qrConnectionStatus string
+ if o.ConnectionStatus != nil {
+ qrConnectionStatus = *o.ConnectionStatus
+ }
+ qConnectionStatus := qrConnectionStatus
+ if qConnectionStatus != "" {
+ if err := r.SetQueryParam("connection_status", qConnectionStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go
new file mode 100644
index 0000000..f65d4fb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceConnectionsListReader is a Reader for the DcimInterfaceConnectionsList structure.
+type DcimInterfaceConnectionsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceConnectionsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsListOK creates a DcimInterfaceConnectionsListOK with default headers values
+func NewDcimInterfaceConnectionsListOK() *DcimInterfaceConnectionsListOK {
+ return &DcimInterfaceConnectionsListOK{}
+}
+
+/*DcimInterfaceConnectionsListOK handles this case with default header values.
+
+DcimInterfaceConnectionsListOK dcim interface connections list o k
+*/
+type DcimInterfaceConnectionsListOK struct {
+ Payload *models.DcimInterfaceConnectionsListOKBody
+}
+
+func (o *DcimInterfaceConnectionsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interface-connections/][%d] dcimInterfaceConnectionsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimInterfaceConnectionsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_parameters.go
new file mode 100644
index 0000000..eda3947
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceConnectionsPartialUpdateParams creates a new DcimInterfaceConnectionsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsPartialUpdateParams() *DcimInterfaceConnectionsPartialUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsPartialUpdateParamsWithTimeout creates a new DcimInterfaceConnectionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsPartialUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsPartialUpdateParamsWithContext creates a new DcimInterfaceConnectionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsPartialUpdateParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsPartialUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsPartialUpdateParamsWithHTTPClient creates a new DcimInterfaceConnectionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsPartialUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interface connections partial update operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceConnection
+ /*ID
+ A unique integer value identifying this interface connection.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WithData(data *models.WritableInterfaceConnection) *DcimInterfaceConnectionsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) SetData(data *models.WritableInterfaceConnection) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WithID(id int64) *DcimInterfaceConnectionsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface connections partial update params
+func (o *DcimInterfaceConnectionsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_responses.go
new file mode 100644
index 0000000..7666482
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceConnectionsPartialUpdateReader is a Reader for the DcimInterfaceConnectionsPartialUpdate structure.
+type DcimInterfaceConnectionsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceConnectionsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsPartialUpdateOK creates a DcimInterfaceConnectionsPartialUpdateOK with default headers values
+func NewDcimInterfaceConnectionsPartialUpdateOK() *DcimInterfaceConnectionsPartialUpdateOK {
+ return &DcimInterfaceConnectionsPartialUpdateOK{}
+}
+
+/*DcimInterfaceConnectionsPartialUpdateOK handles this case with default header values.
+
+DcimInterfaceConnectionsPartialUpdateOK dcim interface connections partial update o k
+*/
+type DcimInterfaceConnectionsPartialUpdateOK struct {
+ Payload *models.WritableInterfaceConnection
+}
+
+func (o *DcimInterfaceConnectionsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/interface-connections/{id}/][%d] dcimInterfaceConnectionsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceConnectionsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceConnection)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_parameters.go
new file mode 100644
index 0000000..e24b256
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceConnectionsReadParams creates a new DcimInterfaceConnectionsReadParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsReadParams() *DcimInterfaceConnectionsReadParams {
+ var ()
+ return &DcimInterfaceConnectionsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsReadParamsWithTimeout creates a new DcimInterfaceConnectionsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsReadParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsReadParams {
+ var ()
+ return &DcimInterfaceConnectionsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsReadParamsWithContext creates a new DcimInterfaceConnectionsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsReadParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsReadParams {
+ var ()
+ return &DcimInterfaceConnectionsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsReadParamsWithHTTPClient creates a new DcimInterfaceConnectionsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsReadParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsReadParams {
+ var ()
+ return &DcimInterfaceConnectionsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsReadParams contains all the parameters to send to the API endpoint
+for the dcim interface connections read operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this interface connection.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) WithID(id int64) *DcimInterfaceConnectionsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface connections read params
+func (o *DcimInterfaceConnectionsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_responses.go
new file mode 100644
index 0000000..9cf2e62
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceConnectionsReadReader is a Reader for the DcimInterfaceConnectionsRead structure.
+type DcimInterfaceConnectionsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceConnectionsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsReadOK creates a DcimInterfaceConnectionsReadOK with default headers values
+func NewDcimInterfaceConnectionsReadOK() *DcimInterfaceConnectionsReadOK {
+ return &DcimInterfaceConnectionsReadOK{}
+}
+
+/*DcimInterfaceConnectionsReadOK handles this case with default header values.
+
+DcimInterfaceConnectionsReadOK dcim interface connections read o k
+*/
+type DcimInterfaceConnectionsReadOK struct {
+ Payload *models.InterfaceConnection
+}
+
+func (o *DcimInterfaceConnectionsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interface-connections/{id}/][%d] dcimInterfaceConnectionsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceConnectionsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.InterfaceConnection)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_parameters.go
new file mode 100644
index 0000000..85cc6a1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceConnectionsUpdateParams creates a new DcimInterfaceConnectionsUpdateParams object
+// with the default values initialized.
+func NewDcimInterfaceConnectionsUpdateParams() *DcimInterfaceConnectionsUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsUpdateParamsWithTimeout creates a new DcimInterfaceConnectionsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceConnectionsUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfaceConnectionsUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceConnectionsUpdateParamsWithContext creates a new DcimInterfaceConnectionsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceConnectionsUpdateParamsWithContext(ctx context.Context) *DcimInterfaceConnectionsUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceConnectionsUpdateParamsWithHTTPClient creates a new DcimInterfaceConnectionsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceConnectionsUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfaceConnectionsUpdateParams {
+ var ()
+ return &DcimInterfaceConnectionsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceConnectionsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interface connections update operation typically these are written to a http.Request
+*/
+type DcimInterfaceConnectionsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceConnection
+ /*ID
+ A unique integer value identifying this interface connection.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfaceConnectionsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) WithContext(ctx context.Context) *DcimInterfaceConnectionsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfaceConnectionsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) WithData(data *models.WritableInterfaceConnection) *DcimInterfaceConnectionsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) SetData(data *models.WritableInterfaceConnection) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) WithID(id int64) *DcimInterfaceConnectionsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface connections update params
+func (o *DcimInterfaceConnectionsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceConnectionsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_responses.go
new file mode 100644
index 0000000..ac16cd5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_connections_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceConnectionsUpdateReader is a Reader for the DcimInterfaceConnectionsUpdate structure.
+type DcimInterfaceConnectionsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceConnectionsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceConnectionsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceConnectionsUpdateOK creates a DcimInterfaceConnectionsUpdateOK with default headers values
+func NewDcimInterfaceConnectionsUpdateOK() *DcimInterfaceConnectionsUpdateOK {
+ return &DcimInterfaceConnectionsUpdateOK{}
+}
+
+/*DcimInterfaceConnectionsUpdateOK handles this case with default header values.
+
+DcimInterfaceConnectionsUpdateOK dcim interface connections update o k
+*/
+type DcimInterfaceConnectionsUpdateOK struct {
+ Payload *models.WritableInterfaceConnection
+}
+
+func (o *DcimInterfaceConnectionsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/interface-connections/{id}/][%d] dcimInterfaceConnectionsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceConnectionsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceConnection)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_parameters.go
new file mode 100644
index 0000000..6307ae6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceTemplatesCreateParams creates a new DcimInterfaceTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesCreateParams() *DcimInterfaceTemplatesCreateParams {
+ var ()
+ return &DcimInterfaceTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesCreateParamsWithTimeout creates a new DcimInterfaceTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesCreateParams {
+ var ()
+ return &DcimInterfaceTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesCreateParamsWithContext creates a new DcimInterfaceTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesCreateParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesCreateParams {
+ var ()
+ return &DcimInterfaceTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesCreateParamsWithHTTPClient creates a new DcimInterfaceTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesCreateParams {
+ var ()
+ return &DcimInterfaceTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim interface templates create operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) WithData(data *models.WritableInterfaceTemplate) *DcimInterfaceTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface templates create params
+func (o *DcimInterfaceTemplatesCreateParams) SetData(data *models.WritableInterfaceTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go
new file mode 100644
index 0000000..150768f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceTemplatesCreateReader is a Reader for the DcimInterfaceTemplatesCreate structure.
+type DcimInterfaceTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimInterfaceTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesCreateCreated creates a DcimInterfaceTemplatesCreateCreated with default headers values
+func NewDcimInterfaceTemplatesCreateCreated() *DcimInterfaceTemplatesCreateCreated {
+ return &DcimInterfaceTemplatesCreateCreated{}
+}
+
+/*DcimInterfaceTemplatesCreateCreated handles this case with default header values.
+
+DcimInterfaceTemplatesCreateCreated dcim interface templates create created
+*/
+type DcimInterfaceTemplatesCreateCreated struct {
+ Payload *models.WritableInterfaceTemplate
+}
+
+func (o *DcimInterfaceTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/interface-templates/][%d] dcimInterfaceTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimInterfaceTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_parameters.go
new file mode 100644
index 0000000..c564d63
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceTemplatesDeleteParams creates a new DcimInterfaceTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesDeleteParams() *DcimInterfaceTemplatesDeleteParams {
+ var ()
+ return &DcimInterfaceTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesDeleteParamsWithTimeout creates a new DcimInterfaceTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesDeleteParams {
+ var ()
+ return &DcimInterfaceTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesDeleteParamsWithContext creates a new DcimInterfaceTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesDeleteParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesDeleteParams {
+ var ()
+ return &DcimInterfaceTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesDeleteParamsWithHTTPClient creates a new DcimInterfaceTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesDeleteParams {
+ var ()
+ return &DcimInterfaceTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim interface templates delete operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this interface template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) WithID(id int64) *DcimInterfaceTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface templates delete params
+func (o *DcimInterfaceTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go
new file mode 100644
index 0000000..28cb958
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimInterfaceTemplatesDeleteReader is a Reader for the DcimInterfaceTemplatesDelete structure.
+type DcimInterfaceTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimInterfaceTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesDeleteNoContent creates a DcimInterfaceTemplatesDeleteNoContent with default headers values
+func NewDcimInterfaceTemplatesDeleteNoContent() *DcimInterfaceTemplatesDeleteNoContent {
+ return &DcimInterfaceTemplatesDeleteNoContent{}
+}
+
+/*DcimInterfaceTemplatesDeleteNoContent handles this case with default header values.
+
+DcimInterfaceTemplatesDeleteNoContent dcim interface templates delete no content
+*/
+type DcimInterfaceTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimInterfaceTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimInterfaceTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_parameters.go
new file mode 100644
index 0000000..44b97fd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceTemplatesListParams creates a new DcimInterfaceTemplatesListParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesListParams() *DcimInterfaceTemplatesListParams {
+ var ()
+ return &DcimInterfaceTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesListParamsWithTimeout creates a new DcimInterfaceTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesListParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesListParams {
+ var ()
+ return &DcimInterfaceTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesListParamsWithContext creates a new DcimInterfaceTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesListParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesListParams {
+ var ()
+ return &DcimInterfaceTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesListParamsWithHTTPClient creates a new DcimInterfaceTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesListParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesListParams {
+ var ()
+ return &DcimInterfaceTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim interface templates list operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*FormFactor*/
+ FormFactor *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MgmtOnly*/
+ MgmtOnly *string
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimInterfaceTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithFormFactor adds the formFactor to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithFormFactor(formFactor *string) *DcimInterfaceTemplatesListParams {
+ o.SetFormFactor(formFactor)
+ return o
+}
+
+// SetFormFactor adds the formFactor to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetFormFactor(formFactor *string) {
+ o.FormFactor = formFactor
+}
+
+// WithLimit adds the limit to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithLimit(limit *int64) *DcimInterfaceTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMgmtOnly adds the mgmtOnly to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithMgmtOnly(mgmtOnly *string) *DcimInterfaceTemplatesListParams {
+ o.SetMgmtOnly(mgmtOnly)
+ return o
+}
+
+// SetMgmtOnly adds the mgmtOnly to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetMgmtOnly(mgmtOnly *string) {
+ o.MgmtOnly = mgmtOnly
+}
+
+// WithName adds the name to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithName(name *string) *DcimInterfaceTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) WithOffset(offset *int64) *DcimInterfaceTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim interface templates list params
+func (o *DcimInterfaceTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.FormFactor != nil {
+
+ // query param form_factor
+ var qrFormFactor string
+ if o.FormFactor != nil {
+ qrFormFactor = *o.FormFactor
+ }
+ qFormFactor := qrFormFactor
+ if qFormFactor != "" {
+ if err := r.SetQueryParam("form_factor", qFormFactor); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MgmtOnly != nil {
+
+ // query param mgmt_only
+ var qrMgmtOnly string
+ if o.MgmtOnly != nil {
+ qrMgmtOnly = *o.MgmtOnly
+ }
+ qMgmtOnly := qrMgmtOnly
+ if qMgmtOnly != "" {
+ if err := r.SetQueryParam("mgmt_only", qMgmtOnly); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go
new file mode 100644
index 0000000..8d505de
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceTemplatesListReader is a Reader for the DcimInterfaceTemplatesList structure.
+type DcimInterfaceTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesListOK creates a DcimInterfaceTemplatesListOK with default headers values
+func NewDcimInterfaceTemplatesListOK() *DcimInterfaceTemplatesListOK {
+ return &DcimInterfaceTemplatesListOK{}
+}
+
+/*DcimInterfaceTemplatesListOK handles this case with default header values.
+
+DcimInterfaceTemplatesListOK dcim interface templates list o k
+*/
+type DcimInterfaceTemplatesListOK struct {
+ Payload *models.DcimInterfaceTemplatesListOKBody
+}
+
+func (o *DcimInterfaceTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interface-templates/][%d] dcimInterfaceTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimInterfaceTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go
new file mode 100644
index 0000000..d231ca8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceTemplatesPartialUpdateParams creates a new DcimInterfaceTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesPartialUpdateParams() *DcimInterfaceTemplatesPartialUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesPartialUpdateParamsWithTimeout creates a new DcimInterfaceTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesPartialUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesPartialUpdateParamsWithContext creates a new DcimInterfaceTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesPartialUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimInterfaceTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesPartialUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interface templates partial update operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceTemplate
+ /*ID
+ A unique integer value identifying this interface template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WithData(data *models.WritableInterfaceTemplate) *DcimInterfaceTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) SetData(data *models.WritableInterfaceTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WithID(id int64) *DcimInterfaceTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface templates partial update params
+func (o *DcimInterfaceTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go
new file mode 100644
index 0000000..7718694
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceTemplatesPartialUpdateReader is a Reader for the DcimInterfaceTemplatesPartialUpdate structure.
+type DcimInterfaceTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesPartialUpdateOK creates a DcimInterfaceTemplatesPartialUpdateOK with default headers values
+func NewDcimInterfaceTemplatesPartialUpdateOK() *DcimInterfaceTemplatesPartialUpdateOK {
+ return &DcimInterfaceTemplatesPartialUpdateOK{}
+}
+
+/*DcimInterfaceTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimInterfaceTemplatesPartialUpdateOK dcim interface templates partial update o k
+*/
+type DcimInterfaceTemplatesPartialUpdateOK struct {
+ Payload *models.WritableInterfaceTemplate
+}
+
+func (o *DcimInterfaceTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_parameters.go
new file mode 100644
index 0000000..8446aad
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfaceTemplatesReadParams creates a new DcimInterfaceTemplatesReadParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesReadParams() *DcimInterfaceTemplatesReadParams {
+ var ()
+ return &DcimInterfaceTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesReadParamsWithTimeout creates a new DcimInterfaceTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesReadParams {
+ var ()
+ return &DcimInterfaceTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesReadParamsWithContext creates a new DcimInterfaceTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesReadParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesReadParams {
+ var ()
+ return &DcimInterfaceTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesReadParamsWithHTTPClient creates a new DcimInterfaceTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesReadParams {
+ var ()
+ return &DcimInterfaceTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim interface templates read operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this interface template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) WithID(id int64) *DcimInterfaceTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface templates read params
+func (o *DcimInterfaceTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go
new file mode 100644
index 0000000..b670d4e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceTemplatesReadReader is a Reader for the DcimInterfaceTemplatesRead structure.
+type DcimInterfaceTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesReadOK creates a DcimInterfaceTemplatesReadOK with default headers values
+func NewDcimInterfaceTemplatesReadOK() *DcimInterfaceTemplatesReadOK {
+ return &DcimInterfaceTemplatesReadOK{}
+}
+
+/*DcimInterfaceTemplatesReadOK handles this case with default header values.
+
+DcimInterfaceTemplatesReadOK dcim interface templates read o k
+*/
+type DcimInterfaceTemplatesReadOK struct {
+ Payload *models.InterfaceTemplate
+}
+
+func (o *DcimInterfaceTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.InterfaceTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_parameters.go
new file mode 100644
index 0000000..526828e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfaceTemplatesUpdateParams creates a new DcimInterfaceTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimInterfaceTemplatesUpdateParams() *DcimInterfaceTemplatesUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesUpdateParamsWithTimeout creates a new DcimInterfaceTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfaceTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfaceTemplatesUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfaceTemplatesUpdateParamsWithContext creates a new DcimInterfaceTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfaceTemplatesUpdateParamsWithContext(ctx context.Context) *DcimInterfaceTemplatesUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfaceTemplatesUpdateParamsWithHTTPClient creates a new DcimInterfaceTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfaceTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfaceTemplatesUpdateParams {
+ var ()
+ return &DcimInterfaceTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfaceTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interface templates update operation typically these are written to a http.Request
+*/
+type DcimInterfaceTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterfaceTemplate
+ /*ID
+ A unique integer value identifying this interface template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfaceTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) WithContext(ctx context.Context) *DcimInterfaceTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfaceTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) WithData(data *models.WritableInterfaceTemplate) *DcimInterfaceTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) SetData(data *models.WritableInterfaceTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) WithID(id int64) *DcimInterfaceTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interface templates update params
+func (o *DcimInterfaceTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfaceTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go
new file mode 100644
index 0000000..1a14d3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfaceTemplatesUpdateReader is a Reader for the DcimInterfaceTemplatesUpdate structure.
+type DcimInterfaceTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfaceTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfaceTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfaceTemplatesUpdateOK creates a DcimInterfaceTemplatesUpdateOK with default headers values
+func NewDcimInterfaceTemplatesUpdateOK() *DcimInterfaceTemplatesUpdateOK {
+ return &DcimInterfaceTemplatesUpdateOK{}
+}
+
+/*DcimInterfaceTemplatesUpdateOK handles this case with default header values.
+
+DcimInterfaceTemplatesUpdateOK dcim interface templates update o k
+*/
+type DcimInterfaceTemplatesUpdateOK struct {
+ Payload *models.WritableInterfaceTemplate
+}
+
+func (o *DcimInterfaceTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/interface-templates/{id}/][%d] dcimInterfaceTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfaceTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterfaceTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go
new file mode 100644
index 0000000..16065f4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfacesCreateParams creates a new DcimInterfacesCreateParams object
+// with the default values initialized.
+func NewDcimInterfacesCreateParams() *DcimInterfacesCreateParams {
+ var ()
+ return &DcimInterfacesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesCreateParamsWithTimeout creates a new DcimInterfacesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesCreateParamsWithTimeout(timeout time.Duration) *DcimInterfacesCreateParams {
+ var ()
+ return &DcimInterfacesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesCreateParamsWithContext creates a new DcimInterfacesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesCreateParamsWithContext(ctx context.Context) *DcimInterfacesCreateParams {
+ var ()
+ return &DcimInterfacesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesCreateParamsWithHTTPClient creates a new DcimInterfacesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesCreateParamsWithHTTPClient(client *http.Client) *DcimInterfacesCreateParams {
+ var ()
+ return &DcimInterfacesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesCreateParams contains all the parameters to send to the API endpoint
+for the dcim interfaces create operation typically these are written to a http.Request
+*/
+type DcimInterfacesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) WithTimeout(timeout time.Duration) *DcimInterfacesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) WithContext(ctx context.Context) *DcimInterfacesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) WithHTTPClient(client *http.Client) *DcimInterfacesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) WithData(data *models.WritableInterface) *DcimInterfacesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interfaces create params
+func (o *DcimInterfacesCreateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go
new file mode 100644
index 0000000..ca7ba27
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesCreateReader is a Reader for the DcimInterfacesCreate structure.
+type DcimInterfacesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimInterfacesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesCreateCreated creates a DcimInterfacesCreateCreated with default headers values
+func NewDcimInterfacesCreateCreated() *DcimInterfacesCreateCreated {
+ return &DcimInterfacesCreateCreated{}
+}
+
+/*DcimInterfacesCreateCreated handles this case with default header values.
+
+DcimInterfacesCreateCreated dcim interfaces create created
+*/
+type DcimInterfacesCreateCreated struct {
+ Payload *models.WritableInterface
+}
+
+func (o *DcimInterfacesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/interfaces/][%d] dcimInterfacesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimInterfacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_parameters.go
new file mode 100644
index 0000000..db8a884
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfacesDeleteParams creates a new DcimInterfacesDeleteParams object
+// with the default values initialized.
+func NewDcimInterfacesDeleteParams() *DcimInterfacesDeleteParams {
+ var ()
+ return &DcimInterfacesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesDeleteParamsWithTimeout creates a new DcimInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesDeleteParamsWithTimeout(timeout time.Duration) *DcimInterfacesDeleteParams {
+ var ()
+ return &DcimInterfacesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesDeleteParamsWithContext creates a new DcimInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesDeleteParamsWithContext(ctx context.Context) *DcimInterfacesDeleteParams {
+ var ()
+ return &DcimInterfacesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesDeleteParamsWithHTTPClient creates a new DcimInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesDeleteParamsWithHTTPClient(client *http.Client) *DcimInterfacesDeleteParams {
+ var ()
+ return &DcimInterfacesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim interfaces delete operation typically these are written to a http.Request
+*/
+type DcimInterfacesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) WithTimeout(timeout time.Duration) *DcimInterfacesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) WithContext(ctx context.Context) *DcimInterfacesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) WithHTTPClient(client *http.Client) *DcimInterfacesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) WithID(id int64) *DcimInterfacesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interfaces delete params
+func (o *DcimInterfacesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go
new file mode 100644
index 0000000..63f526a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimInterfacesDeleteReader is a Reader for the DcimInterfacesDelete structure.
+type DcimInterfacesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimInterfacesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesDeleteNoContent creates a DcimInterfacesDeleteNoContent with default headers values
+func NewDcimInterfacesDeleteNoContent() *DcimInterfacesDeleteNoContent {
+ return &DcimInterfacesDeleteNoContent{}
+}
+
+/*DcimInterfacesDeleteNoContent handles this case with default header values.
+
+DcimInterfacesDeleteNoContent dcim interfaces delete no content
+*/
+type DcimInterfacesDeleteNoContent struct {
+}
+
+func (o *DcimInterfacesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/interfaces/{id}/][%d] dcimInterfacesDeleteNoContent ", 204)
+}
+
+func (o *DcimInterfacesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_parameters.go
new file mode 100644
index 0000000..53fe117
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfacesGraphsParams creates a new DcimInterfacesGraphsParams object
+// with the default values initialized.
+func NewDcimInterfacesGraphsParams() *DcimInterfacesGraphsParams {
+ var ()
+ return &DcimInterfacesGraphsParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesGraphsParamsWithTimeout creates a new DcimInterfacesGraphsParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesGraphsParamsWithTimeout(timeout time.Duration) *DcimInterfacesGraphsParams {
+ var ()
+ return &DcimInterfacesGraphsParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesGraphsParamsWithContext creates a new DcimInterfacesGraphsParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesGraphsParamsWithContext(ctx context.Context) *DcimInterfacesGraphsParams {
+ var ()
+ return &DcimInterfacesGraphsParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesGraphsParamsWithHTTPClient creates a new DcimInterfacesGraphsParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesGraphsParamsWithHTTPClient(client *http.Client) *DcimInterfacesGraphsParams {
+ var ()
+ return &DcimInterfacesGraphsParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesGraphsParams contains all the parameters to send to the API endpoint
+for the dcim interfaces graphs operation typically these are written to a http.Request
+*/
+type DcimInterfacesGraphsParams struct {
+
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) WithTimeout(timeout time.Duration) *DcimInterfacesGraphsParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) WithContext(ctx context.Context) *DcimInterfacesGraphsParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) WithHTTPClient(client *http.Client) *DcimInterfacesGraphsParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) WithID(id int64) *DcimInterfacesGraphsParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interfaces graphs params
+func (o *DcimInterfacesGraphsParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesGraphsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go
new file mode 100644
index 0000000..868c94a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesGraphsReader is a Reader for the DcimInterfacesGraphs structure.
+type DcimInterfacesGraphsReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfacesGraphsOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesGraphsOK creates a DcimInterfacesGraphsOK with default headers values
+func NewDcimInterfacesGraphsOK() *DcimInterfacesGraphsOK {
+ return &DcimInterfacesGraphsOK{}
+}
+
+/*DcimInterfacesGraphsOK handles this case with default header values.
+
+DcimInterfacesGraphsOK dcim interfaces graphs o k
+*/
+type DcimInterfacesGraphsOK struct {
+ Payload *models.Interface
+}
+
+func (o *DcimInterfacesGraphsOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interfaces/{id}/graphs/][%d] dcimInterfacesGraphsOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfacesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Interface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_parameters.go
new file mode 100644
index 0000000..a8121cf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_parameters.go
@@ -0,0 +1,485 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfacesListParams creates a new DcimInterfacesListParams object
+// with the default values initialized.
+func NewDcimInterfacesListParams() *DcimInterfacesListParams {
+ var ()
+ return &DcimInterfacesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesListParamsWithTimeout creates a new DcimInterfacesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesListParamsWithTimeout(timeout time.Duration) *DcimInterfacesListParams {
+ var ()
+ return &DcimInterfacesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesListParamsWithContext creates a new DcimInterfacesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesListParamsWithContext(ctx context.Context) *DcimInterfacesListParams {
+ var ()
+ return &DcimInterfacesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesListParamsWithHTTPClient creates a new DcimInterfacesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesListParamsWithHTTPClient(client *http.Client) *DcimInterfacesListParams {
+ var ()
+ return &DcimInterfacesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesListParams contains all the parameters to send to the API endpoint
+for the dcim interfaces list operation typically these are written to a http.Request
+*/
+type DcimInterfacesListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *float64
+ /*Enabled*/
+ Enabled *string
+ /*FormFactor*/
+ FormFactor *string
+ /*LagID*/
+ LagID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MacAddress*/
+ MacAddress *string
+ /*MgmtOnly*/
+ MgmtOnly *string
+ /*Mtu*/
+ Mtu *float64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Type*/
+ Type *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithTimeout(timeout time.Duration) *DcimInterfacesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithContext(ctx context.Context) *DcimInterfacesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithHTTPClient(client *http.Client) *DcimInterfacesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithDevice(device *string) *DcimInterfacesListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithDeviceID(deviceID *float64) *DcimInterfacesListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetDeviceID(deviceID *float64) {
+ o.DeviceID = deviceID
+}
+
+// WithEnabled adds the enabled to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithEnabled(enabled *string) *DcimInterfacesListParams {
+ o.SetEnabled(enabled)
+ return o
+}
+
+// SetEnabled adds the enabled to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetEnabled(enabled *string) {
+ o.Enabled = enabled
+}
+
+// WithFormFactor adds the formFactor to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithFormFactor(formFactor *string) *DcimInterfacesListParams {
+ o.SetFormFactor(formFactor)
+ return o
+}
+
+// SetFormFactor adds the formFactor to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetFormFactor(formFactor *string) {
+ o.FormFactor = formFactor
+}
+
+// WithLagID adds the lagID to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithLagID(lagID *string) *DcimInterfacesListParams {
+ o.SetLagID(lagID)
+ return o
+}
+
+// SetLagID adds the lagId to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetLagID(lagID *string) {
+ o.LagID = lagID
+}
+
+// WithLimit adds the limit to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithLimit(limit *int64) *DcimInterfacesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMacAddress adds the macAddress to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithMacAddress(macAddress *string) *DcimInterfacesListParams {
+ o.SetMacAddress(macAddress)
+ return o
+}
+
+// SetMacAddress adds the macAddress to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetMacAddress(macAddress *string) {
+ o.MacAddress = macAddress
+}
+
+// WithMgmtOnly adds the mgmtOnly to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithMgmtOnly(mgmtOnly *string) *DcimInterfacesListParams {
+ o.SetMgmtOnly(mgmtOnly)
+ return o
+}
+
+// SetMgmtOnly adds the mgmtOnly to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetMgmtOnly(mgmtOnly *string) {
+ o.MgmtOnly = mgmtOnly
+}
+
+// WithMtu adds the mtu to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithMtu(mtu *float64) *DcimInterfacesListParams {
+ o.SetMtu(mtu)
+ return o
+}
+
+// SetMtu adds the mtu to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetMtu(mtu *float64) {
+ o.Mtu = mtu
+}
+
+// WithName adds the name to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithName(name *string) *DcimInterfacesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithOffset(offset *int64) *DcimInterfacesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithType adds the typeVar to the dcim interfaces list params
+func (o *DcimInterfacesListParams) WithType(typeVar *string) *DcimInterfacesListParams {
+ o.SetType(typeVar)
+ return o
+}
+
+// SetType adds the type to the dcim interfaces list params
+func (o *DcimInterfacesListParams) SetType(typeVar *string) {
+ o.Type = typeVar
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID float64
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := swag.FormatFloat64(qrDeviceID)
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Enabled != nil {
+
+ // query param enabled
+ var qrEnabled string
+ if o.Enabled != nil {
+ qrEnabled = *o.Enabled
+ }
+ qEnabled := qrEnabled
+ if qEnabled != "" {
+ if err := r.SetQueryParam("enabled", qEnabled); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.FormFactor != nil {
+
+ // query param form_factor
+ var qrFormFactor string
+ if o.FormFactor != nil {
+ qrFormFactor = *o.FormFactor
+ }
+ qFormFactor := qrFormFactor
+ if qFormFactor != "" {
+ if err := r.SetQueryParam("form_factor", qFormFactor); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.LagID != nil {
+
+ // query param lag_id
+ var qrLagID string
+ if o.LagID != nil {
+ qrLagID = *o.LagID
+ }
+ qLagID := qrLagID
+ if qLagID != "" {
+ if err := r.SetQueryParam("lag_id", qLagID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MacAddress != nil {
+
+ // query param mac_address
+ var qrMacAddress string
+ if o.MacAddress != nil {
+ qrMacAddress = *o.MacAddress
+ }
+ qMacAddress := qrMacAddress
+ if qMacAddress != "" {
+ if err := r.SetQueryParam("mac_address", qMacAddress); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MgmtOnly != nil {
+
+ // query param mgmt_only
+ var qrMgmtOnly string
+ if o.MgmtOnly != nil {
+ qrMgmtOnly = *o.MgmtOnly
+ }
+ qMgmtOnly := qrMgmtOnly
+ if qMgmtOnly != "" {
+ if err := r.SetQueryParam("mgmt_only", qMgmtOnly); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Mtu != nil {
+
+ // query param mtu
+ var qrMtu float64
+ if o.Mtu != nil {
+ qrMtu = *o.Mtu
+ }
+ qMtu := swag.FormatFloat64(qrMtu)
+ if qMtu != "" {
+ if err := r.SetQueryParam("mtu", qMtu); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Type != nil {
+
+ // query param type
+ var qrType string
+ if o.Type != nil {
+ qrType = *o.Type
+ }
+ qType := qrType
+ if qType != "" {
+ if err := r.SetQueryParam("type", qType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go
new file mode 100644
index 0000000..5245ff7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesListReader is a Reader for the DcimInterfacesList structure.
+type DcimInterfacesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfacesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesListOK creates a DcimInterfacesListOK with default headers values
+func NewDcimInterfacesListOK() *DcimInterfacesListOK {
+ return &DcimInterfacesListOK{}
+}
+
+/*DcimInterfacesListOK handles this case with default header values.
+
+DcimInterfacesListOK dcim interfaces list o k
+*/
+type DcimInterfacesListOK struct {
+ Payload *models.DcimInterfacesListOKBody
+}
+
+func (o *DcimInterfacesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interfaces/][%d] dcimInterfacesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfacesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimInterfacesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go
new file mode 100644
index 0000000..169b7e0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfacesPartialUpdateParams creates a new DcimInterfacesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimInterfacesPartialUpdateParams() *DcimInterfacesPartialUpdateParams {
+ var ()
+ return &DcimInterfacesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesPartialUpdateParamsWithTimeout creates a new DcimInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfacesPartialUpdateParams {
+ var ()
+ return &DcimInterfacesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesPartialUpdateParamsWithContext creates a new DcimInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesPartialUpdateParamsWithContext(ctx context.Context) *DcimInterfacesPartialUpdateParams {
+ var ()
+ return &DcimInterfacesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesPartialUpdateParamsWithHTTPClient creates a new DcimInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfacesPartialUpdateParams {
+ var ()
+ return &DcimInterfacesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interfaces partial update operation typically these are written to a http.Request
+*/
+type DcimInterfacesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfacesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) WithContext(ctx context.Context) *DcimInterfacesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfacesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) WithData(data *models.WritableInterface) *DcimInterfacesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) WithID(id int64) *DcimInterfacesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interfaces partial update params
+func (o *DcimInterfacesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go
new file mode 100644
index 0000000..1a84d55
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesPartialUpdateReader is a Reader for the DcimInterfacesPartialUpdate structure.
+type DcimInterfacesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfacesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesPartialUpdateOK creates a DcimInterfacesPartialUpdateOK with default headers values
+func NewDcimInterfacesPartialUpdateOK() *DcimInterfacesPartialUpdateOK {
+ return &DcimInterfacesPartialUpdateOK{}
+}
+
+/*DcimInterfacesPartialUpdateOK handles this case with default header values.
+
+DcimInterfacesPartialUpdateOK dcim interfaces partial update o k
+*/
+type DcimInterfacesPartialUpdateOK struct {
+ Payload *models.WritableInterface
+}
+
+func (o *DcimInterfacesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/interfaces/{id}/][%d] dcimInterfacesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfacesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_parameters.go
new file mode 100644
index 0000000..82f40ba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInterfacesReadParams creates a new DcimInterfacesReadParams object
+// with the default values initialized.
+func NewDcimInterfacesReadParams() *DcimInterfacesReadParams {
+ var ()
+ return &DcimInterfacesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesReadParamsWithTimeout creates a new DcimInterfacesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesReadParamsWithTimeout(timeout time.Duration) *DcimInterfacesReadParams {
+ var ()
+ return &DcimInterfacesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesReadParamsWithContext creates a new DcimInterfacesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesReadParamsWithContext(ctx context.Context) *DcimInterfacesReadParams {
+ var ()
+ return &DcimInterfacesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesReadParamsWithHTTPClient creates a new DcimInterfacesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesReadParamsWithHTTPClient(client *http.Client) *DcimInterfacesReadParams {
+ var ()
+ return &DcimInterfacesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesReadParams contains all the parameters to send to the API endpoint
+for the dcim interfaces read operation typically these are written to a http.Request
+*/
+type DcimInterfacesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) WithTimeout(timeout time.Duration) *DcimInterfacesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) WithContext(ctx context.Context) *DcimInterfacesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) WithHTTPClient(client *http.Client) *DcimInterfacesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) WithID(id int64) *DcimInterfacesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interfaces read params
+func (o *DcimInterfacesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go
new file mode 100644
index 0000000..415b3b5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesReadReader is a Reader for the DcimInterfacesRead structure.
+type DcimInterfacesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfacesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesReadOK creates a DcimInterfacesReadOK with default headers values
+func NewDcimInterfacesReadOK() *DcimInterfacesReadOK {
+ return &DcimInterfacesReadOK{}
+}
+
+/*DcimInterfacesReadOK handles this case with default header values.
+
+DcimInterfacesReadOK dcim interfaces read o k
+*/
+type DcimInterfacesReadOK struct {
+ Payload *models.Interface
+}
+
+func (o *DcimInterfacesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/interfaces/{id}/][%d] dcimInterfacesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfacesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Interface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go
new file mode 100644
index 0000000..24fd20f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInterfacesUpdateParams creates a new DcimInterfacesUpdateParams object
+// with the default values initialized.
+func NewDcimInterfacesUpdateParams() *DcimInterfacesUpdateParams {
+ var ()
+ return &DcimInterfacesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInterfacesUpdateParamsWithTimeout creates a new DcimInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInterfacesUpdateParamsWithTimeout(timeout time.Duration) *DcimInterfacesUpdateParams {
+ var ()
+ return &DcimInterfacesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInterfacesUpdateParamsWithContext creates a new DcimInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInterfacesUpdateParamsWithContext(ctx context.Context) *DcimInterfacesUpdateParams {
+ var ()
+ return &DcimInterfacesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInterfacesUpdateParamsWithHTTPClient creates a new DcimInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInterfacesUpdateParamsWithHTTPClient(client *http.Client) *DcimInterfacesUpdateParams {
+ var ()
+ return &DcimInterfacesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInterfacesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim interfaces update operation typically these are written to a http.Request
+*/
+type DcimInterfacesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) WithTimeout(timeout time.Duration) *DcimInterfacesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) WithContext(ctx context.Context) *DcimInterfacesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) WithHTTPClient(client *http.Client) *DcimInterfacesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) WithData(data *models.WritableInterface) *DcimInterfacesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) WithID(id int64) *DcimInterfacesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim interfaces update params
+func (o *DcimInterfacesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInterfacesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go
new file mode 100644
index 0000000..f96bc0a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInterfacesUpdateReader is a Reader for the DcimInterfacesUpdate structure.
+type DcimInterfacesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInterfacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInterfacesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInterfacesUpdateOK creates a DcimInterfacesUpdateOK with default headers values
+func NewDcimInterfacesUpdateOK() *DcimInterfacesUpdateOK {
+ return &DcimInterfacesUpdateOK{}
+}
+
+/*DcimInterfacesUpdateOK handles this case with default header values.
+
+DcimInterfacesUpdateOK dcim interfaces update o k
+*/
+type DcimInterfacesUpdateOK struct {
+ Payload *models.WritableInterface
+}
+
+func (o *DcimInterfacesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/interfaces/{id}/][%d] dcimInterfacesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInterfacesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_parameters.go
new file mode 100644
index 0000000..3319bf7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInventoryItemsCreateParams creates a new DcimInventoryItemsCreateParams object
+// with the default values initialized.
+func NewDcimInventoryItemsCreateParams() *DcimInventoryItemsCreateParams {
+ var ()
+ return &DcimInventoryItemsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsCreateParamsWithTimeout creates a new DcimInventoryItemsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsCreateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsCreateParams {
+ var ()
+ return &DcimInventoryItemsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsCreateParamsWithContext creates a new DcimInventoryItemsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsCreateParamsWithContext(ctx context.Context) *DcimInventoryItemsCreateParams {
+ var ()
+ return &DcimInventoryItemsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsCreateParamsWithHTTPClient creates a new DcimInventoryItemsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsCreateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsCreateParams {
+ var ()
+ return &DcimInventoryItemsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsCreateParams contains all the parameters to send to the API endpoint
+for the dcim inventory items create operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableInventoryItem
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) WithContext(ctx context.Context) *DcimInventoryItemsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) WithData(data *models.WritableInventoryItem) *DcimInventoryItemsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim inventory items create params
+func (o *DcimInventoryItemsCreateParams) SetData(data *models.WritableInventoryItem) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go
new file mode 100644
index 0000000..3dac366
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInventoryItemsCreateReader is a Reader for the DcimInventoryItemsCreate structure.
+type DcimInventoryItemsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimInventoryItemsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsCreateCreated creates a DcimInventoryItemsCreateCreated with default headers values
+func NewDcimInventoryItemsCreateCreated() *DcimInventoryItemsCreateCreated {
+ return &DcimInventoryItemsCreateCreated{}
+}
+
+/*DcimInventoryItemsCreateCreated handles this case with default header values.
+
+DcimInventoryItemsCreateCreated dcim inventory items create created
+*/
+type DcimInventoryItemsCreateCreated struct {
+ Payload *models.WritableInventoryItem
+}
+
+func (o *DcimInventoryItemsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/inventory-items/][%d] dcimInventoryItemsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimInventoryItemsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInventoryItem)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_parameters.go
new file mode 100644
index 0000000..2ba49c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInventoryItemsDeleteParams creates a new DcimInventoryItemsDeleteParams object
+// with the default values initialized.
+func NewDcimInventoryItemsDeleteParams() *DcimInventoryItemsDeleteParams {
+ var ()
+ return &DcimInventoryItemsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsDeleteParamsWithTimeout creates a new DcimInventoryItemsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsDeleteParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsDeleteParams {
+ var ()
+ return &DcimInventoryItemsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsDeleteParamsWithContext creates a new DcimInventoryItemsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsDeleteParamsWithContext(ctx context.Context) *DcimInventoryItemsDeleteParams {
+ var ()
+ return &DcimInventoryItemsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsDeleteParamsWithHTTPClient creates a new DcimInventoryItemsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsDeleteParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsDeleteParams {
+ var ()
+ return &DcimInventoryItemsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim inventory items delete operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this inventory item.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) WithContext(ctx context.Context) *DcimInventoryItemsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) WithID(id int64) *DcimInventoryItemsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim inventory items delete params
+func (o *DcimInventoryItemsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go
new file mode 100644
index 0000000..79e6d57
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimInventoryItemsDeleteReader is a Reader for the DcimInventoryItemsDelete structure.
+type DcimInventoryItemsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimInventoryItemsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsDeleteNoContent creates a DcimInventoryItemsDeleteNoContent with default headers values
+func NewDcimInventoryItemsDeleteNoContent() *DcimInventoryItemsDeleteNoContent {
+ return &DcimInventoryItemsDeleteNoContent{}
+}
+
+/*DcimInventoryItemsDeleteNoContent handles this case with default header values.
+
+DcimInventoryItemsDeleteNoContent dcim inventory items delete no content
+*/
+type DcimInventoryItemsDeleteNoContent struct {
+}
+
+func (o *DcimInventoryItemsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/inventory-items/{id}/][%d] dcimInventoryItemsDeleteNoContent ", 204)
+}
+
+func (o *DcimInventoryItemsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_parameters.go
new file mode 100644
index 0000000..2df9620
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_parameters.go
@@ -0,0 +1,514 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInventoryItemsListParams creates a new DcimInventoryItemsListParams object
+// with the default values initialized.
+func NewDcimInventoryItemsListParams() *DcimInventoryItemsListParams {
+ var ()
+ return &DcimInventoryItemsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsListParamsWithTimeout creates a new DcimInventoryItemsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsListParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsListParams {
+ var ()
+ return &DcimInventoryItemsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsListParamsWithContext creates a new DcimInventoryItemsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsListParamsWithContext(ctx context.Context) *DcimInventoryItemsListParams {
+ var ()
+ return &DcimInventoryItemsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsListParamsWithHTTPClient creates a new DcimInventoryItemsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsListParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsListParams {
+ var ()
+ return &DcimInventoryItemsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsListParams contains all the parameters to send to the API endpoint
+for the dcim inventory items list operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsListParams struct {
+
+ /*AssetTag*/
+ AssetTag *string
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Discovered*/
+ Discovered *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Manufacturer*/
+ Manufacturer *string
+ /*ManufacturerID*/
+ ManufacturerID *string
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*ParentID*/
+ ParentID *string
+ /*PartID*/
+ PartID *string
+ /*Q*/
+ Q *string
+ /*Serial*/
+ Serial *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithContext(ctx context.Context) *DcimInventoryItemsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithAssetTag adds the assetTag to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithAssetTag(assetTag *string) *DcimInventoryItemsListParams {
+ o.SetAssetTag(assetTag)
+ return o
+}
+
+// SetAssetTag adds the assetTag to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetAssetTag(assetTag *string) {
+ o.AssetTag = assetTag
+}
+
+// WithDevice adds the device to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithDevice(device *string) *DcimInventoryItemsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithDeviceID(deviceID *string) *DcimInventoryItemsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithDiscovered adds the discovered to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithDiscovered(discovered *string) *DcimInventoryItemsListParams {
+ o.SetDiscovered(discovered)
+ return o
+}
+
+// SetDiscovered adds the discovered to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetDiscovered(discovered *string) {
+ o.Discovered = discovered
+}
+
+// WithLimit adds the limit to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithLimit(limit *int64) *DcimInventoryItemsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithManufacturer adds the manufacturer to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithManufacturer(manufacturer *string) *DcimInventoryItemsListParams {
+ o.SetManufacturer(manufacturer)
+ return o
+}
+
+// SetManufacturer adds the manufacturer to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetManufacturer(manufacturer *string) {
+ o.Manufacturer = manufacturer
+}
+
+// WithManufacturerID adds the manufacturerID to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithManufacturerID(manufacturerID *string) *DcimInventoryItemsListParams {
+ o.SetManufacturerID(manufacturerID)
+ return o
+}
+
+// SetManufacturerID adds the manufacturerId to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetManufacturerID(manufacturerID *string) {
+ o.ManufacturerID = manufacturerID
+}
+
+// WithName adds the name to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithName(name *string) *DcimInventoryItemsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithOffset(offset *int64) *DcimInventoryItemsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithParentID adds the parentID to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithParentID(parentID *string) *DcimInventoryItemsListParams {
+ o.SetParentID(parentID)
+ return o
+}
+
+// SetParentID adds the parentId to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetParentID(parentID *string) {
+ o.ParentID = parentID
+}
+
+// WithPartID adds the partID to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithPartID(partID *string) *DcimInventoryItemsListParams {
+ o.SetPartID(partID)
+ return o
+}
+
+// SetPartID adds the partId to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetPartID(partID *string) {
+ o.PartID = partID
+}
+
+// WithQ adds the q to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithQ(q *string) *DcimInventoryItemsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSerial adds the serial to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) WithSerial(serial *string) *DcimInventoryItemsListParams {
+ o.SetSerial(serial)
+ return o
+}
+
+// SetSerial adds the serial to the dcim inventory items list params
+func (o *DcimInventoryItemsListParams) SetSerial(serial *string) {
+ o.Serial = serial
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.AssetTag != nil {
+
+ // query param asset_tag
+ var qrAssetTag string
+ if o.AssetTag != nil {
+ qrAssetTag = *o.AssetTag
+ }
+ qAssetTag := qrAssetTag
+ if qAssetTag != "" {
+ if err := r.SetQueryParam("asset_tag", qAssetTag); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Discovered != nil {
+
+ // query param discovered
+ var qrDiscovered string
+ if o.Discovered != nil {
+ qrDiscovered = *o.Discovered
+ }
+ qDiscovered := qrDiscovered
+ if qDiscovered != "" {
+ if err := r.SetQueryParam("discovered", qDiscovered); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Manufacturer != nil {
+
+ // query param manufacturer
+ var qrManufacturer string
+ if o.Manufacturer != nil {
+ qrManufacturer = *o.Manufacturer
+ }
+ qManufacturer := qrManufacturer
+ if qManufacturer != "" {
+ if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ManufacturerID != nil {
+
+ // query param manufacturer_id
+ var qrManufacturerID string
+ if o.ManufacturerID != nil {
+ qrManufacturerID = *o.ManufacturerID
+ }
+ qManufacturerID := qrManufacturerID
+ if qManufacturerID != "" {
+ if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ParentID != nil {
+
+ // query param parent_id
+ var qrParentID string
+ if o.ParentID != nil {
+ qrParentID = *o.ParentID
+ }
+ qParentID := qrParentID
+ if qParentID != "" {
+ if err := r.SetQueryParam("parent_id", qParentID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.PartID != nil {
+
+ // query param part_id
+ var qrPartID string
+ if o.PartID != nil {
+ qrPartID = *o.PartID
+ }
+ qPartID := qrPartID
+ if qPartID != "" {
+ if err := r.SetQueryParam("part_id", qPartID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Serial != nil {
+
+ // query param serial
+ var qrSerial string
+ if o.Serial != nil {
+ qrSerial = *o.Serial
+ }
+ qSerial := qrSerial
+ if qSerial != "" {
+ if err := r.SetQueryParam("serial", qSerial); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go
new file mode 100644
index 0000000..0aea08a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInventoryItemsListReader is a Reader for the DcimInventoryItemsList structure.
+type DcimInventoryItemsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInventoryItemsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsListOK creates a DcimInventoryItemsListOK with default headers values
+func NewDcimInventoryItemsListOK() *DcimInventoryItemsListOK {
+ return &DcimInventoryItemsListOK{}
+}
+
+/*DcimInventoryItemsListOK handles this case with default header values.
+
+DcimInventoryItemsListOK dcim inventory items list o k
+*/
+type DcimInventoryItemsListOK struct {
+ Payload *models.DcimInventoryItemsListOKBody
+}
+
+func (o *DcimInventoryItemsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/inventory-items/][%d] dcimInventoryItemsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInventoryItemsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimInventoryItemsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go
new file mode 100644
index 0000000..81ab220
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInventoryItemsPartialUpdateParams creates a new DcimInventoryItemsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimInventoryItemsPartialUpdateParams() *DcimInventoryItemsPartialUpdateParams {
+ var ()
+ return &DcimInventoryItemsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsPartialUpdateParamsWithTimeout creates a new DcimInventoryItemsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsPartialUpdateParams {
+ var ()
+ return &DcimInventoryItemsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsPartialUpdateParamsWithContext creates a new DcimInventoryItemsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsPartialUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemsPartialUpdateParams {
+ var ()
+ return &DcimInventoryItemsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsPartialUpdateParamsWithHTTPClient creates a new DcimInventoryItemsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsPartialUpdateParams {
+ var ()
+ return &DcimInventoryItemsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim inventory items partial update operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInventoryItem
+ /*ID
+ A unique integer value identifying this inventory item.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) WithData(data *models.WritableInventoryItem) *DcimInventoryItemsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) SetData(data *models.WritableInventoryItem) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) WithID(id int64) *DcimInventoryItemsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim inventory items partial update params
+func (o *DcimInventoryItemsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go
new file mode 100644
index 0000000..54bb7e4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInventoryItemsPartialUpdateReader is a Reader for the DcimInventoryItemsPartialUpdate structure.
+type DcimInventoryItemsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInventoryItemsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsPartialUpdateOK creates a DcimInventoryItemsPartialUpdateOK with default headers values
+func NewDcimInventoryItemsPartialUpdateOK() *DcimInventoryItemsPartialUpdateOK {
+ return &DcimInventoryItemsPartialUpdateOK{}
+}
+
+/*DcimInventoryItemsPartialUpdateOK handles this case with default header values.
+
+DcimInventoryItemsPartialUpdateOK dcim inventory items partial update o k
+*/
+type DcimInventoryItemsPartialUpdateOK struct {
+ Payload *models.WritableInventoryItem
+}
+
+func (o *DcimInventoryItemsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/inventory-items/{id}/][%d] dcimInventoryItemsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInventoryItemsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInventoryItem)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_parameters.go
new file mode 100644
index 0000000..a0161a9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimInventoryItemsReadParams creates a new DcimInventoryItemsReadParams object
+// with the default values initialized.
+func NewDcimInventoryItemsReadParams() *DcimInventoryItemsReadParams {
+ var ()
+ return &DcimInventoryItemsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsReadParamsWithTimeout creates a new DcimInventoryItemsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsReadParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsReadParams {
+ var ()
+ return &DcimInventoryItemsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsReadParamsWithContext creates a new DcimInventoryItemsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsReadParamsWithContext(ctx context.Context) *DcimInventoryItemsReadParams {
+ var ()
+ return &DcimInventoryItemsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsReadParamsWithHTTPClient creates a new DcimInventoryItemsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsReadParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsReadParams {
+ var ()
+ return &DcimInventoryItemsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsReadParams contains all the parameters to send to the API endpoint
+for the dcim inventory items read operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this inventory item.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) WithContext(ctx context.Context) *DcimInventoryItemsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) WithID(id int64) *DcimInventoryItemsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim inventory items read params
+func (o *DcimInventoryItemsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go
new file mode 100644
index 0000000..4e07cce
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInventoryItemsReadReader is a Reader for the DcimInventoryItemsRead structure.
+type DcimInventoryItemsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInventoryItemsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsReadOK creates a DcimInventoryItemsReadOK with default headers values
+func NewDcimInventoryItemsReadOK() *DcimInventoryItemsReadOK {
+ return &DcimInventoryItemsReadOK{}
+}
+
+/*DcimInventoryItemsReadOK handles this case with default header values.
+
+DcimInventoryItemsReadOK dcim inventory items read o k
+*/
+type DcimInventoryItemsReadOK struct {
+ Payload *models.InventoryItem
+}
+
+func (o *DcimInventoryItemsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/inventory-items/{id}/][%d] dcimInventoryItemsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInventoryItemsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.InventoryItem)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_parameters.go
new file mode 100644
index 0000000..cc74879
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimInventoryItemsUpdateParams creates a new DcimInventoryItemsUpdateParams object
+// with the default values initialized.
+func NewDcimInventoryItemsUpdateParams() *DcimInventoryItemsUpdateParams {
+ var ()
+ return &DcimInventoryItemsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimInventoryItemsUpdateParamsWithTimeout creates a new DcimInventoryItemsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimInventoryItemsUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemsUpdateParams {
+ var ()
+ return &DcimInventoryItemsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimInventoryItemsUpdateParamsWithContext creates a new DcimInventoryItemsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimInventoryItemsUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemsUpdateParams {
+ var ()
+ return &DcimInventoryItemsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimInventoryItemsUpdateParamsWithHTTPClient creates a new DcimInventoryItemsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimInventoryItemsUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemsUpdateParams {
+ var ()
+ return &DcimInventoryItemsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimInventoryItemsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim inventory items update operation typically these are written to a http.Request
+*/
+type DcimInventoryItemsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInventoryItem
+ /*ID
+ A unique integer value identifying this inventory item.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) WithData(data *models.WritableInventoryItem) *DcimInventoryItemsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) SetData(data *models.WritableInventoryItem) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) WithID(id int64) *DcimInventoryItemsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim inventory items update params
+func (o *DcimInventoryItemsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimInventoryItemsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go
new file mode 100644
index 0000000..b915f00
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimInventoryItemsUpdateReader is a Reader for the DcimInventoryItemsUpdate structure.
+type DcimInventoryItemsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimInventoryItemsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimInventoryItemsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimInventoryItemsUpdateOK creates a DcimInventoryItemsUpdateOK with default headers values
+func NewDcimInventoryItemsUpdateOK() *DcimInventoryItemsUpdateOK {
+ return &DcimInventoryItemsUpdateOK{}
+}
+
+/*DcimInventoryItemsUpdateOK handles this case with default header values.
+
+DcimInventoryItemsUpdateOK dcim inventory items update o k
+*/
+type DcimInventoryItemsUpdateOK struct {
+ Payload *models.WritableInventoryItem
+}
+
+func (o *DcimInventoryItemsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/inventory-items/{id}/][%d] dcimInventoryItemsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimInventoryItemsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInventoryItem)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_parameters.go
new file mode 100644
index 0000000..200dc0a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimManufacturersCreateParams creates a new DcimManufacturersCreateParams object
+// with the default values initialized.
+func NewDcimManufacturersCreateParams() *DcimManufacturersCreateParams {
+ var ()
+ return &DcimManufacturersCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersCreateParamsWithTimeout creates a new DcimManufacturersCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersCreateParamsWithTimeout(timeout time.Duration) *DcimManufacturersCreateParams {
+ var ()
+ return &DcimManufacturersCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersCreateParamsWithContext creates a new DcimManufacturersCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersCreateParamsWithContext(ctx context.Context) *DcimManufacturersCreateParams {
+ var ()
+ return &DcimManufacturersCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersCreateParamsWithHTTPClient creates a new DcimManufacturersCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersCreateParamsWithHTTPClient(client *http.Client) *DcimManufacturersCreateParams {
+ var ()
+ return &DcimManufacturersCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersCreateParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers create operation typically these are written to a http.Request
+*/
+type DcimManufacturersCreateParams struct {
+
+ /*Data*/
+ Data *models.Manufacturer
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) WithTimeout(timeout time.Duration) *DcimManufacturersCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) WithContext(ctx context.Context) *DcimManufacturersCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) WithHTTPClient(client *http.Client) *DcimManufacturersCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) WithData(data *models.Manufacturer) *DcimManufacturersCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim manufacturers create params
+func (o *DcimManufacturersCreateParams) SetData(data *models.Manufacturer) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go
new file mode 100644
index 0000000..f0afa25
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimManufacturersCreateReader is a Reader for the DcimManufacturersCreate structure.
+type DcimManufacturersCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimManufacturersCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersCreateCreated creates a DcimManufacturersCreateCreated with default headers values
+func NewDcimManufacturersCreateCreated() *DcimManufacturersCreateCreated {
+ return &DcimManufacturersCreateCreated{}
+}
+
+/*DcimManufacturersCreateCreated handles this case with default header values.
+
+DcimManufacturersCreateCreated dcim manufacturers create created
+*/
+type DcimManufacturersCreateCreated struct {
+ Payload *models.Manufacturer
+}
+
+func (o *DcimManufacturersCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/manufacturers/][%d] dcimManufacturersCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimManufacturersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Manufacturer)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_parameters.go
new file mode 100644
index 0000000..01472a9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimManufacturersDeleteParams creates a new DcimManufacturersDeleteParams object
+// with the default values initialized.
+func NewDcimManufacturersDeleteParams() *DcimManufacturersDeleteParams {
+ var ()
+ return &DcimManufacturersDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersDeleteParamsWithTimeout creates a new DcimManufacturersDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersDeleteParamsWithTimeout(timeout time.Duration) *DcimManufacturersDeleteParams {
+ var ()
+ return &DcimManufacturersDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersDeleteParamsWithContext creates a new DcimManufacturersDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersDeleteParamsWithContext(ctx context.Context) *DcimManufacturersDeleteParams {
+ var ()
+ return &DcimManufacturersDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersDeleteParamsWithHTTPClient creates a new DcimManufacturersDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersDeleteParamsWithHTTPClient(client *http.Client) *DcimManufacturersDeleteParams {
+ var ()
+ return &DcimManufacturersDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersDeleteParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers delete operation typically these are written to a http.Request
+*/
+type DcimManufacturersDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this manufacturer.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) WithTimeout(timeout time.Duration) *DcimManufacturersDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) WithContext(ctx context.Context) *DcimManufacturersDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) WithHTTPClient(client *http.Client) *DcimManufacturersDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) WithID(id int64) *DcimManufacturersDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim manufacturers delete params
+func (o *DcimManufacturersDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go
new file mode 100644
index 0000000..f5e67e6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimManufacturersDeleteReader is a Reader for the DcimManufacturersDelete structure.
+type DcimManufacturersDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimManufacturersDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersDeleteNoContent creates a DcimManufacturersDeleteNoContent with default headers values
+func NewDcimManufacturersDeleteNoContent() *DcimManufacturersDeleteNoContent {
+ return &DcimManufacturersDeleteNoContent{}
+}
+
+/*DcimManufacturersDeleteNoContent handles this case with default header values.
+
+DcimManufacturersDeleteNoContent dcim manufacturers delete no content
+*/
+type DcimManufacturersDeleteNoContent struct {
+}
+
+func (o *DcimManufacturersDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/manufacturers/{id}/][%d] dcimManufacturersDeleteNoContent ", 204)
+}
+
+func (o *DcimManufacturersDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_parameters.go
new file mode 100644
index 0000000..d741f3e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimManufacturersListParams creates a new DcimManufacturersListParams object
+// with the default values initialized.
+func NewDcimManufacturersListParams() *DcimManufacturersListParams {
+ var ()
+ return &DcimManufacturersListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersListParamsWithTimeout creates a new DcimManufacturersListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersListParamsWithTimeout(timeout time.Duration) *DcimManufacturersListParams {
+ var ()
+ return &DcimManufacturersListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersListParamsWithContext creates a new DcimManufacturersListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersListParamsWithContext(ctx context.Context) *DcimManufacturersListParams {
+ var ()
+ return &DcimManufacturersListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersListParamsWithHTTPClient creates a new DcimManufacturersListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersListParamsWithHTTPClient(client *http.Client) *DcimManufacturersListParams {
+ var ()
+ return &DcimManufacturersListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersListParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers list operation typically these are written to a http.Request
+*/
+type DcimManufacturersListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithTimeout(timeout time.Duration) *DcimManufacturersListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithContext(ctx context.Context) *DcimManufacturersListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithHTTPClient(client *http.Client) *DcimManufacturersListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithLimit(limit *int64) *DcimManufacturersListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithName(name *string) *DcimManufacturersListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithOffset(offset *int64) *DcimManufacturersListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) WithSlug(slug *string) *DcimManufacturersListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim manufacturers list params
+func (o *DcimManufacturersListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go
new file mode 100644
index 0000000..ac2d046
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimManufacturersListReader is a Reader for the DcimManufacturersList structure.
+type DcimManufacturersListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimManufacturersListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersListOK creates a DcimManufacturersListOK with default headers values
+func NewDcimManufacturersListOK() *DcimManufacturersListOK {
+ return &DcimManufacturersListOK{}
+}
+
+/*DcimManufacturersListOK handles this case with default header values.
+
+DcimManufacturersListOK dcim manufacturers list o k
+*/
+type DcimManufacturersListOK struct {
+ Payload *models.DcimManufacturersListOKBody
+}
+
+func (o *DcimManufacturersListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/manufacturers/][%d] dcimManufacturersListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimManufacturersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimManufacturersListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go
new file mode 100644
index 0000000..03d10e4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimManufacturersPartialUpdateParams creates a new DcimManufacturersPartialUpdateParams object
+// with the default values initialized.
+func NewDcimManufacturersPartialUpdateParams() *DcimManufacturersPartialUpdateParams {
+ var ()
+ return &DcimManufacturersPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersPartialUpdateParamsWithTimeout creates a new DcimManufacturersPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimManufacturersPartialUpdateParams {
+ var ()
+ return &DcimManufacturersPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersPartialUpdateParamsWithContext creates a new DcimManufacturersPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersPartialUpdateParamsWithContext(ctx context.Context) *DcimManufacturersPartialUpdateParams {
+ var ()
+ return &DcimManufacturersPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersPartialUpdateParamsWithHTTPClient creates a new DcimManufacturersPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimManufacturersPartialUpdateParams {
+ var ()
+ return &DcimManufacturersPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers partial update operation typically these are written to a http.Request
+*/
+type DcimManufacturersPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.Manufacturer
+ /*ID
+ A unique integer value identifying this manufacturer.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimManufacturersPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) WithContext(ctx context.Context) *DcimManufacturersPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimManufacturersPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) WithData(data *models.Manufacturer) *DcimManufacturersPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) SetData(data *models.Manufacturer) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) WithID(id int64) *DcimManufacturersPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim manufacturers partial update params
+func (o *DcimManufacturersPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go
new file mode 100644
index 0000000..6e5826a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimManufacturersPartialUpdateReader is a Reader for the DcimManufacturersPartialUpdate structure.
+type DcimManufacturersPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimManufacturersPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersPartialUpdateOK creates a DcimManufacturersPartialUpdateOK with default headers values
+func NewDcimManufacturersPartialUpdateOK() *DcimManufacturersPartialUpdateOK {
+ return &DcimManufacturersPartialUpdateOK{}
+}
+
+/*DcimManufacturersPartialUpdateOK handles this case with default header values.
+
+DcimManufacturersPartialUpdateOK dcim manufacturers partial update o k
+*/
+type DcimManufacturersPartialUpdateOK struct {
+ Payload *models.Manufacturer
+}
+
+func (o *DcimManufacturersPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/manufacturers/{id}/][%d] dcimManufacturersPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimManufacturersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Manufacturer)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_parameters.go
new file mode 100644
index 0000000..1b54dbf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimManufacturersReadParams creates a new DcimManufacturersReadParams object
+// with the default values initialized.
+func NewDcimManufacturersReadParams() *DcimManufacturersReadParams {
+ var ()
+ return &DcimManufacturersReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersReadParamsWithTimeout creates a new DcimManufacturersReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersReadParamsWithTimeout(timeout time.Duration) *DcimManufacturersReadParams {
+ var ()
+ return &DcimManufacturersReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersReadParamsWithContext creates a new DcimManufacturersReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersReadParamsWithContext(ctx context.Context) *DcimManufacturersReadParams {
+ var ()
+ return &DcimManufacturersReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersReadParamsWithHTTPClient creates a new DcimManufacturersReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersReadParamsWithHTTPClient(client *http.Client) *DcimManufacturersReadParams {
+ var ()
+ return &DcimManufacturersReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersReadParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers read operation typically these are written to a http.Request
+*/
+type DcimManufacturersReadParams struct {
+
+ /*ID
+ A unique integer value identifying this manufacturer.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) WithTimeout(timeout time.Duration) *DcimManufacturersReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) WithContext(ctx context.Context) *DcimManufacturersReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) WithHTTPClient(client *http.Client) *DcimManufacturersReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) WithID(id int64) *DcimManufacturersReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim manufacturers read params
+func (o *DcimManufacturersReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go
new file mode 100644
index 0000000..1440577
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimManufacturersReadReader is a Reader for the DcimManufacturersRead structure.
+type DcimManufacturersReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimManufacturersReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersReadOK creates a DcimManufacturersReadOK with default headers values
+func NewDcimManufacturersReadOK() *DcimManufacturersReadOK {
+ return &DcimManufacturersReadOK{}
+}
+
+/*DcimManufacturersReadOK handles this case with default header values.
+
+DcimManufacturersReadOK dcim manufacturers read o k
+*/
+type DcimManufacturersReadOK struct {
+ Payload *models.Manufacturer
+}
+
+func (o *DcimManufacturersReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/manufacturers/{id}/][%d] dcimManufacturersReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimManufacturersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Manufacturer)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_parameters.go
new file mode 100644
index 0000000..2782ce7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimManufacturersUpdateParams creates a new DcimManufacturersUpdateParams object
+// with the default values initialized.
+func NewDcimManufacturersUpdateParams() *DcimManufacturersUpdateParams {
+ var ()
+ return &DcimManufacturersUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimManufacturersUpdateParamsWithTimeout creates a new DcimManufacturersUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimManufacturersUpdateParamsWithTimeout(timeout time.Duration) *DcimManufacturersUpdateParams {
+ var ()
+ return &DcimManufacturersUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimManufacturersUpdateParamsWithContext creates a new DcimManufacturersUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimManufacturersUpdateParamsWithContext(ctx context.Context) *DcimManufacturersUpdateParams {
+ var ()
+ return &DcimManufacturersUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimManufacturersUpdateParamsWithHTTPClient creates a new DcimManufacturersUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimManufacturersUpdateParamsWithHTTPClient(client *http.Client) *DcimManufacturersUpdateParams {
+ var ()
+ return &DcimManufacturersUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimManufacturersUpdateParams contains all the parameters to send to the API endpoint
+for the dcim manufacturers update operation typically these are written to a http.Request
+*/
+type DcimManufacturersUpdateParams struct {
+
+ /*Data*/
+ Data *models.Manufacturer
+ /*ID
+ A unique integer value identifying this manufacturer.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) WithTimeout(timeout time.Duration) *DcimManufacturersUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) WithContext(ctx context.Context) *DcimManufacturersUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) WithHTTPClient(client *http.Client) *DcimManufacturersUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) WithData(data *models.Manufacturer) *DcimManufacturersUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) SetData(data *models.Manufacturer) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) WithID(id int64) *DcimManufacturersUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim manufacturers update params
+func (o *DcimManufacturersUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimManufacturersUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go
new file mode 100644
index 0000000..4d7da12
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimManufacturersUpdateReader is a Reader for the DcimManufacturersUpdate structure.
+type DcimManufacturersUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimManufacturersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimManufacturersUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimManufacturersUpdateOK creates a DcimManufacturersUpdateOK with default headers values
+func NewDcimManufacturersUpdateOK() *DcimManufacturersUpdateOK {
+ return &DcimManufacturersUpdateOK{}
+}
+
+/*DcimManufacturersUpdateOK handles this case with default header values.
+
+DcimManufacturersUpdateOK dcim manufacturers update o k
+*/
+type DcimManufacturersUpdateOK struct {
+ Payload *models.Manufacturer
+}
+
+func (o *DcimManufacturersUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/manufacturers/{id}/][%d] dcimManufacturersUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimManufacturersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Manufacturer)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_parameters.go
new file mode 100644
index 0000000..c3036b4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPlatformsCreateParams creates a new DcimPlatformsCreateParams object
+// with the default values initialized.
+func NewDcimPlatformsCreateParams() *DcimPlatformsCreateParams {
+ var ()
+ return &DcimPlatformsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsCreateParamsWithTimeout creates a new DcimPlatformsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsCreateParamsWithTimeout(timeout time.Duration) *DcimPlatformsCreateParams {
+ var ()
+ return &DcimPlatformsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsCreateParamsWithContext creates a new DcimPlatformsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsCreateParamsWithContext(ctx context.Context) *DcimPlatformsCreateParams {
+ var ()
+ return &DcimPlatformsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsCreateParamsWithHTTPClient creates a new DcimPlatformsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsCreateParamsWithHTTPClient(client *http.Client) *DcimPlatformsCreateParams {
+ var ()
+ return &DcimPlatformsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsCreateParams contains all the parameters to send to the API endpoint
+for the dcim platforms create operation typically these are written to a http.Request
+*/
+type DcimPlatformsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePlatform
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) WithTimeout(timeout time.Duration) *DcimPlatformsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) WithContext(ctx context.Context) *DcimPlatformsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) WithHTTPClient(client *http.Client) *DcimPlatformsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) WithData(data *models.WritablePlatform) *DcimPlatformsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim platforms create params
+func (o *DcimPlatformsCreateParams) SetData(data *models.WritablePlatform) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go
new file mode 100644
index 0000000..8450833
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPlatformsCreateReader is a Reader for the DcimPlatformsCreate structure.
+type DcimPlatformsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimPlatformsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsCreateCreated creates a DcimPlatformsCreateCreated with default headers values
+func NewDcimPlatformsCreateCreated() *DcimPlatformsCreateCreated {
+ return &DcimPlatformsCreateCreated{}
+}
+
+/*DcimPlatformsCreateCreated handles this case with default header values.
+
+DcimPlatformsCreateCreated dcim platforms create created
+*/
+type DcimPlatformsCreateCreated struct {
+ Payload *models.WritablePlatform
+}
+
+func (o *DcimPlatformsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/platforms/][%d] dcimPlatformsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimPlatformsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePlatform)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_parameters.go
new file mode 100644
index 0000000..4807f41
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPlatformsDeleteParams creates a new DcimPlatformsDeleteParams object
+// with the default values initialized.
+func NewDcimPlatformsDeleteParams() *DcimPlatformsDeleteParams {
+ var ()
+ return &DcimPlatformsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsDeleteParamsWithTimeout creates a new DcimPlatformsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsDeleteParamsWithTimeout(timeout time.Duration) *DcimPlatformsDeleteParams {
+ var ()
+ return &DcimPlatformsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsDeleteParamsWithContext creates a new DcimPlatformsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsDeleteParamsWithContext(ctx context.Context) *DcimPlatformsDeleteParams {
+ var ()
+ return &DcimPlatformsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsDeleteParamsWithHTTPClient creates a new DcimPlatformsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsDeleteParamsWithHTTPClient(client *http.Client) *DcimPlatformsDeleteParams {
+ var ()
+ return &DcimPlatformsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim platforms delete operation typically these are written to a http.Request
+*/
+type DcimPlatformsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this platform.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) WithTimeout(timeout time.Duration) *DcimPlatformsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) WithContext(ctx context.Context) *DcimPlatformsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) WithHTTPClient(client *http.Client) *DcimPlatformsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) WithID(id int64) *DcimPlatformsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim platforms delete params
+func (o *DcimPlatformsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go
new file mode 100644
index 0000000..da9e3f9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimPlatformsDeleteReader is a Reader for the DcimPlatformsDelete structure.
+type DcimPlatformsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimPlatformsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsDeleteNoContent creates a DcimPlatformsDeleteNoContent with default headers values
+func NewDcimPlatformsDeleteNoContent() *DcimPlatformsDeleteNoContent {
+ return &DcimPlatformsDeleteNoContent{}
+}
+
+/*DcimPlatformsDeleteNoContent handles this case with default header values.
+
+DcimPlatformsDeleteNoContent dcim platforms delete no content
+*/
+type DcimPlatformsDeleteNoContent struct {
+}
+
+func (o *DcimPlatformsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/platforms/{id}/][%d] dcimPlatformsDeleteNoContent ", 204)
+}
+
+func (o *DcimPlatformsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_parameters.go
new file mode 100644
index 0000000..85b2afd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPlatformsListParams creates a new DcimPlatformsListParams object
+// with the default values initialized.
+func NewDcimPlatformsListParams() *DcimPlatformsListParams {
+ var ()
+ return &DcimPlatformsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsListParamsWithTimeout creates a new DcimPlatformsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsListParamsWithTimeout(timeout time.Duration) *DcimPlatformsListParams {
+ var ()
+ return &DcimPlatformsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsListParamsWithContext creates a new DcimPlatformsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsListParamsWithContext(ctx context.Context) *DcimPlatformsListParams {
+ var ()
+ return &DcimPlatformsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsListParamsWithHTTPClient creates a new DcimPlatformsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsListParamsWithHTTPClient(client *http.Client) *DcimPlatformsListParams {
+ var ()
+ return &DcimPlatformsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsListParams contains all the parameters to send to the API endpoint
+for the dcim platforms list operation typically these are written to a http.Request
+*/
+type DcimPlatformsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Manufacturer*/
+ Manufacturer *string
+ /*ManufacturerID*/
+ ManufacturerID *string
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithTimeout(timeout time.Duration) *DcimPlatformsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithContext(ctx context.Context) *DcimPlatformsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithHTTPClient(client *http.Client) *DcimPlatformsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithLimit(limit *int64) *DcimPlatformsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithManufacturer adds the manufacturer to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithManufacturer(manufacturer *string) *DcimPlatformsListParams {
+ o.SetManufacturer(manufacturer)
+ return o
+}
+
+// SetManufacturer adds the manufacturer to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetManufacturer(manufacturer *string) {
+ o.Manufacturer = manufacturer
+}
+
+// WithManufacturerID adds the manufacturerID to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithManufacturerID(manufacturerID *string) *DcimPlatformsListParams {
+ o.SetManufacturerID(manufacturerID)
+ return o
+}
+
+// SetManufacturerID adds the manufacturerId to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetManufacturerID(manufacturerID *string) {
+ o.ManufacturerID = manufacturerID
+}
+
+// WithName adds the name to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithName(name *string) *DcimPlatformsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithOffset(offset *int64) *DcimPlatformsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the dcim platforms list params
+func (o *DcimPlatformsListParams) WithSlug(slug *string) *DcimPlatformsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim platforms list params
+func (o *DcimPlatformsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Manufacturer != nil {
+
+ // query param manufacturer
+ var qrManufacturer string
+ if o.Manufacturer != nil {
+ qrManufacturer = *o.Manufacturer
+ }
+ qManufacturer := qrManufacturer
+ if qManufacturer != "" {
+ if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ManufacturerID != nil {
+
+ // query param manufacturer_id
+ var qrManufacturerID string
+ if o.ManufacturerID != nil {
+ qrManufacturerID = *o.ManufacturerID
+ }
+ qManufacturerID := qrManufacturerID
+ if qManufacturerID != "" {
+ if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go
new file mode 100644
index 0000000..a1613b8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPlatformsListReader is a Reader for the DcimPlatformsList structure.
+type DcimPlatformsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPlatformsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsListOK creates a DcimPlatformsListOK with default headers values
+func NewDcimPlatformsListOK() *DcimPlatformsListOK {
+ return &DcimPlatformsListOK{}
+}
+
+/*DcimPlatformsListOK handles this case with default header values.
+
+DcimPlatformsListOK dcim platforms list o k
+*/
+type DcimPlatformsListOK struct {
+ Payload *models.DcimPlatformsListOKBody
+}
+
+func (o *DcimPlatformsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/platforms/][%d] dcimPlatformsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPlatformsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPlatformsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_parameters.go
new file mode 100644
index 0000000..38d50da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPlatformsPartialUpdateParams creates a new DcimPlatformsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimPlatformsPartialUpdateParams() *DcimPlatformsPartialUpdateParams {
+ var ()
+ return &DcimPlatformsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsPartialUpdateParamsWithTimeout creates a new DcimPlatformsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimPlatformsPartialUpdateParams {
+ var ()
+ return &DcimPlatformsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsPartialUpdateParamsWithContext creates a new DcimPlatformsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsPartialUpdateParamsWithContext(ctx context.Context) *DcimPlatformsPartialUpdateParams {
+ var ()
+ return &DcimPlatformsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsPartialUpdateParamsWithHTTPClient creates a new DcimPlatformsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimPlatformsPartialUpdateParams {
+ var ()
+ return &DcimPlatformsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim platforms partial update operation typically these are written to a http.Request
+*/
+type DcimPlatformsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePlatform
+ /*ID
+ A unique integer value identifying this platform.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimPlatformsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) WithContext(ctx context.Context) *DcimPlatformsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimPlatformsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) WithData(data *models.WritablePlatform) *DcimPlatformsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) SetData(data *models.WritablePlatform) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) WithID(id int64) *DcimPlatformsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim platforms partial update params
+func (o *DcimPlatformsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go
new file mode 100644
index 0000000..aad0071
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPlatformsPartialUpdateReader is a Reader for the DcimPlatformsPartialUpdate structure.
+type DcimPlatformsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPlatformsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsPartialUpdateOK creates a DcimPlatformsPartialUpdateOK with default headers values
+func NewDcimPlatformsPartialUpdateOK() *DcimPlatformsPartialUpdateOK {
+ return &DcimPlatformsPartialUpdateOK{}
+}
+
+/*DcimPlatformsPartialUpdateOK handles this case with default header values.
+
+DcimPlatformsPartialUpdateOK dcim platforms partial update o k
+*/
+type DcimPlatformsPartialUpdateOK struct {
+ Payload *models.WritablePlatform
+}
+
+func (o *DcimPlatformsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/platforms/{id}/][%d] dcimPlatformsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPlatformsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePlatform)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_parameters.go
new file mode 100644
index 0000000..dac4a65
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPlatformsReadParams creates a new DcimPlatformsReadParams object
+// with the default values initialized.
+func NewDcimPlatformsReadParams() *DcimPlatformsReadParams {
+ var ()
+ return &DcimPlatformsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsReadParamsWithTimeout creates a new DcimPlatformsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsReadParamsWithTimeout(timeout time.Duration) *DcimPlatformsReadParams {
+ var ()
+ return &DcimPlatformsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsReadParamsWithContext creates a new DcimPlatformsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsReadParamsWithContext(ctx context.Context) *DcimPlatformsReadParams {
+ var ()
+ return &DcimPlatformsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsReadParamsWithHTTPClient creates a new DcimPlatformsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsReadParamsWithHTTPClient(client *http.Client) *DcimPlatformsReadParams {
+ var ()
+ return &DcimPlatformsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsReadParams contains all the parameters to send to the API endpoint
+for the dcim platforms read operation typically these are written to a http.Request
+*/
+type DcimPlatformsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this platform.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms read params
+func (o *DcimPlatformsReadParams) WithTimeout(timeout time.Duration) *DcimPlatformsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms read params
+func (o *DcimPlatformsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms read params
+func (o *DcimPlatformsReadParams) WithContext(ctx context.Context) *DcimPlatformsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms read params
+func (o *DcimPlatformsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms read params
+func (o *DcimPlatformsReadParams) WithHTTPClient(client *http.Client) *DcimPlatformsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms read params
+func (o *DcimPlatformsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim platforms read params
+func (o *DcimPlatformsReadParams) WithID(id int64) *DcimPlatformsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim platforms read params
+func (o *DcimPlatformsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go
new file mode 100644
index 0000000..67220ba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPlatformsReadReader is a Reader for the DcimPlatformsRead structure.
+type DcimPlatformsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPlatformsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsReadOK creates a DcimPlatformsReadOK with default headers values
+func NewDcimPlatformsReadOK() *DcimPlatformsReadOK {
+ return &DcimPlatformsReadOK{}
+}
+
+/*DcimPlatformsReadOK handles this case with default header values.
+
+DcimPlatformsReadOK dcim platforms read o k
+*/
+type DcimPlatformsReadOK struct {
+ Payload *models.Platform
+}
+
+func (o *DcimPlatformsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/platforms/{id}/][%d] dcimPlatformsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPlatformsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Platform)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_parameters.go
new file mode 100644
index 0000000..08123e1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPlatformsUpdateParams creates a new DcimPlatformsUpdateParams object
+// with the default values initialized.
+func NewDcimPlatformsUpdateParams() *DcimPlatformsUpdateParams {
+ var ()
+ return &DcimPlatformsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPlatformsUpdateParamsWithTimeout creates a new DcimPlatformsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPlatformsUpdateParamsWithTimeout(timeout time.Duration) *DcimPlatformsUpdateParams {
+ var ()
+ return &DcimPlatformsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPlatformsUpdateParamsWithContext creates a new DcimPlatformsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPlatformsUpdateParamsWithContext(ctx context.Context) *DcimPlatformsUpdateParams {
+ var ()
+ return &DcimPlatformsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPlatformsUpdateParamsWithHTTPClient creates a new DcimPlatformsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPlatformsUpdateParamsWithHTTPClient(client *http.Client) *DcimPlatformsUpdateParams {
+ var ()
+ return &DcimPlatformsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPlatformsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim platforms update operation typically these are written to a http.Request
+*/
+type DcimPlatformsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePlatform
+ /*ID
+ A unique integer value identifying this platform.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) WithTimeout(timeout time.Duration) *DcimPlatformsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) WithContext(ctx context.Context) *DcimPlatformsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) WithHTTPClient(client *http.Client) *DcimPlatformsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) WithData(data *models.WritablePlatform) *DcimPlatformsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) SetData(data *models.WritablePlatform) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) WithID(id int64) *DcimPlatformsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim platforms update params
+func (o *DcimPlatformsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPlatformsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go
new file mode 100644
index 0000000..e6c6942
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPlatformsUpdateReader is a Reader for the DcimPlatformsUpdate structure.
+type DcimPlatformsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPlatformsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPlatformsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPlatformsUpdateOK creates a DcimPlatformsUpdateOK with default headers values
+func NewDcimPlatformsUpdateOK() *DcimPlatformsUpdateOK {
+ return &DcimPlatformsUpdateOK{}
+}
+
+/*DcimPlatformsUpdateOK handles this case with default header values.
+
+DcimPlatformsUpdateOK dcim platforms update o k
+*/
+type DcimPlatformsUpdateOK struct {
+ Payload *models.WritablePlatform
+}
+
+func (o *DcimPlatformsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/platforms/{id}/][%d] dcimPlatformsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPlatformsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePlatform)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_parameters.go
new file mode 100644
index 0000000..2926f1e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerConnectionsListParams creates a new DcimPowerConnectionsListParams object
+// with the default values initialized.
+func NewDcimPowerConnectionsListParams() *DcimPowerConnectionsListParams {
+ var ()
+ return &DcimPowerConnectionsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerConnectionsListParamsWithTimeout creates a new DcimPowerConnectionsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerConnectionsListParamsWithTimeout(timeout time.Duration) *DcimPowerConnectionsListParams {
+ var ()
+ return &DcimPowerConnectionsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerConnectionsListParamsWithContext creates a new DcimPowerConnectionsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerConnectionsListParamsWithContext(ctx context.Context) *DcimPowerConnectionsListParams {
+ var ()
+ return &DcimPowerConnectionsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerConnectionsListParamsWithHTTPClient creates a new DcimPowerConnectionsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerConnectionsListParamsWithHTTPClient(client *http.Client) *DcimPowerConnectionsListParams {
+ var ()
+ return &DcimPowerConnectionsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerConnectionsListParams contains all the parameters to send to the API endpoint
+for the dcim power connections list operation typically these are written to a http.Request
+*/
+type DcimPowerConnectionsListParams struct {
+
+ /*ConnectionStatus*/
+ ConnectionStatus *string
+ /*Device*/
+ Device *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithTimeout(timeout time.Duration) *DcimPowerConnectionsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithContext(ctx context.Context) *DcimPowerConnectionsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithHTTPClient(client *http.Client) *DcimPowerConnectionsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithConnectionStatus adds the connectionStatus to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithConnectionStatus(connectionStatus *string) *DcimPowerConnectionsListParams {
+ o.SetConnectionStatus(connectionStatus)
+ return o
+}
+
+// SetConnectionStatus adds the connectionStatus to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetConnectionStatus(connectionStatus *string) {
+ o.ConnectionStatus = connectionStatus
+}
+
+// WithDevice adds the device to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithDevice(device *string) *DcimPowerConnectionsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithLimit adds the limit to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithLimit(limit *int64) *DcimPowerConnectionsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithName(name *string) *DcimPowerConnectionsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithOffset(offset *int64) *DcimPowerConnectionsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) WithSite(site *string) *DcimPowerConnectionsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim power connections list params
+func (o *DcimPowerConnectionsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerConnectionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.ConnectionStatus != nil {
+
+ // query param connection_status
+ var qrConnectionStatus string
+ if o.ConnectionStatus != nil {
+ qrConnectionStatus = *o.ConnectionStatus
+ }
+ qConnectionStatus := qrConnectionStatus
+ if qConnectionStatus != "" {
+ if err := r.SetQueryParam("connection_status", qConnectionStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go
new file mode 100644
index 0000000..ac4a5dc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerConnectionsListReader is a Reader for the DcimPowerConnectionsList structure.
+type DcimPowerConnectionsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerConnectionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerConnectionsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerConnectionsListOK creates a DcimPowerConnectionsListOK with default headers values
+func NewDcimPowerConnectionsListOK() *DcimPowerConnectionsListOK {
+ return &DcimPowerConnectionsListOK{}
+}
+
+/*DcimPowerConnectionsListOK handles this case with default header values.
+
+DcimPowerConnectionsListOK dcim power connections list o k
+*/
+type DcimPowerConnectionsListOK struct {
+ Payload *models.DcimPowerConnectionsListOKBody
+}
+
+func (o *DcimPowerConnectionsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-connections/][%d] dcimPowerConnectionsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerConnectionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPowerConnectionsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go
new file mode 100644
index 0000000..e714e22
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletTemplatesCreateParams creates a new DcimPowerOutletTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesCreateParams() *DcimPowerOutletTemplatesCreateParams {
+ var ()
+ return &DcimPowerOutletTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesCreateParamsWithTimeout creates a new DcimPowerOutletTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesCreateParams {
+ var ()
+ return &DcimPowerOutletTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesCreateParamsWithContext creates a new DcimPowerOutletTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesCreateParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesCreateParams {
+ var ()
+ return &DcimPowerOutletTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesCreateParamsWithHTTPClient creates a new DcimPowerOutletTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesCreateParams {
+ var ()
+ return &DcimPowerOutletTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates create operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutletTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) WithData(data *models.WritablePowerOutletTemplate) *DcimPowerOutletTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlet templates create params
+func (o *DcimPowerOutletTemplatesCreateParams) SetData(data *models.WritablePowerOutletTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go
new file mode 100644
index 0000000..0dd2e5a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletTemplatesCreateReader is a Reader for the DcimPowerOutletTemplatesCreate structure.
+type DcimPowerOutletTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimPowerOutletTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesCreateCreated creates a DcimPowerOutletTemplatesCreateCreated with default headers values
+func NewDcimPowerOutletTemplatesCreateCreated() *DcimPowerOutletTemplatesCreateCreated {
+ return &DcimPowerOutletTemplatesCreateCreated{}
+}
+
+/*DcimPowerOutletTemplatesCreateCreated handles this case with default header values.
+
+DcimPowerOutletTemplatesCreateCreated dcim power outlet templates create created
+*/
+type DcimPowerOutletTemplatesCreateCreated struct {
+ Payload *models.WritablePowerOutletTemplate
+}
+
+func (o *DcimPowerOutletTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/power-outlet-templates/][%d] dcimPowerOutletTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimPowerOutletTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutletTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go
new file mode 100644
index 0000000..e26bb3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletTemplatesDeleteParams creates a new DcimPowerOutletTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesDeleteParams() *DcimPowerOutletTemplatesDeleteParams {
+ var ()
+ return &DcimPowerOutletTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesDeleteParamsWithTimeout creates a new DcimPowerOutletTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesDeleteParams {
+ var ()
+ return &DcimPowerOutletTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesDeleteParamsWithContext creates a new DcimPowerOutletTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesDeleteParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesDeleteParams {
+ var ()
+ return &DcimPowerOutletTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesDeleteParamsWithHTTPClient creates a new DcimPowerOutletTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesDeleteParams {
+ var ()
+ return &DcimPowerOutletTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates delete operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this power outlet template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) WithID(id int64) *DcimPowerOutletTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlet templates delete params
+func (o *DcimPowerOutletTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go
new file mode 100644
index 0000000..b6845f8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimPowerOutletTemplatesDeleteReader is a Reader for the DcimPowerOutletTemplatesDelete structure.
+type DcimPowerOutletTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimPowerOutletTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesDeleteNoContent creates a DcimPowerOutletTemplatesDeleteNoContent with default headers values
+func NewDcimPowerOutletTemplatesDeleteNoContent() *DcimPowerOutletTemplatesDeleteNoContent {
+ return &DcimPowerOutletTemplatesDeleteNoContent{}
+}
+
+/*DcimPowerOutletTemplatesDeleteNoContent handles this case with default header values.
+
+DcimPowerOutletTemplatesDeleteNoContent dcim power outlet templates delete no content
+*/
+type DcimPowerOutletTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimPowerOutletTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimPowerOutletTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go
new file mode 100644
index 0000000..860a335
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletTemplatesListParams creates a new DcimPowerOutletTemplatesListParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesListParams() *DcimPowerOutletTemplatesListParams {
+ var ()
+ return &DcimPowerOutletTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesListParamsWithTimeout creates a new DcimPowerOutletTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesListParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesListParams {
+ var ()
+ return &DcimPowerOutletTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesListParamsWithContext creates a new DcimPowerOutletTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesListParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesListParams {
+ var ()
+ return &DcimPowerOutletTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesListParamsWithHTTPClient creates a new DcimPowerOutletTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesListParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesListParams {
+ var ()
+ return &DcimPowerOutletTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates list operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimPowerOutletTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithLimit adds the limit to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithLimit(limit *int64) *DcimPowerOutletTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithName(name *string) *DcimPowerOutletTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) WithOffset(offset *int64) *DcimPowerOutletTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim power outlet templates list params
+func (o *DcimPowerOutletTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go
new file mode 100644
index 0000000..f57d14a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletTemplatesListReader is a Reader for the DcimPowerOutletTemplatesList structure.
+type DcimPowerOutletTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesListOK creates a DcimPowerOutletTemplatesListOK with default headers values
+func NewDcimPowerOutletTemplatesListOK() *DcimPowerOutletTemplatesListOK {
+ return &DcimPowerOutletTemplatesListOK{}
+}
+
+/*DcimPowerOutletTemplatesListOK handles this case with default header values.
+
+DcimPowerOutletTemplatesListOK dcim power outlet templates list o k
+*/
+type DcimPowerOutletTemplatesListOK struct {
+ Payload *models.DcimPowerOutletTemplatesListOKBody
+}
+
+func (o *DcimPowerOutletTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-outlet-templates/][%d] dcimPowerOutletTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPowerOutletTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go
new file mode 100644
index 0000000..36a52c3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletTemplatesPartialUpdateParams creates a new DcimPowerOutletTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesPartialUpdateParams() *DcimPowerOutletTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesPartialUpdateParamsWithTimeout creates a new DcimPowerOutletTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesPartialUpdateParamsWithContext creates a new DcimPowerOutletTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimPowerOutletTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates partial update operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutletTemplate
+ /*ID
+ A unique integer value identifying this power outlet template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WithData(data *models.WritablePowerOutletTemplate) *DcimPowerOutletTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) SetData(data *models.WritablePowerOutletTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WithID(id int64) *DcimPowerOutletTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlet templates partial update params
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go
new file mode 100644
index 0000000..8d573bf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletTemplatesPartialUpdateReader is a Reader for the DcimPowerOutletTemplatesPartialUpdate structure.
+type DcimPowerOutletTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesPartialUpdateOK creates a DcimPowerOutletTemplatesPartialUpdateOK with default headers values
+func NewDcimPowerOutletTemplatesPartialUpdateOK() *DcimPowerOutletTemplatesPartialUpdateOK {
+ return &DcimPowerOutletTemplatesPartialUpdateOK{}
+}
+
+/*DcimPowerOutletTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimPowerOutletTemplatesPartialUpdateOK dcim power outlet templates partial update o k
+*/
+type DcimPowerOutletTemplatesPartialUpdateOK struct {
+ Payload *models.WritablePowerOutletTemplate
+}
+
+func (o *DcimPowerOutletTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutletTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go
new file mode 100644
index 0000000..7290f3c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletTemplatesReadParams creates a new DcimPowerOutletTemplatesReadParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesReadParams() *DcimPowerOutletTemplatesReadParams {
+ var ()
+ return &DcimPowerOutletTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesReadParamsWithTimeout creates a new DcimPowerOutletTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesReadParams {
+ var ()
+ return &DcimPowerOutletTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesReadParamsWithContext creates a new DcimPowerOutletTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesReadParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesReadParams {
+ var ()
+ return &DcimPowerOutletTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesReadParamsWithHTTPClient creates a new DcimPowerOutletTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesReadParams {
+ var ()
+ return &DcimPowerOutletTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates read operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this power outlet template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) WithID(id int64) *DcimPowerOutletTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlet templates read params
+func (o *DcimPowerOutletTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go
new file mode 100644
index 0000000..ce8d931
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletTemplatesReadReader is a Reader for the DcimPowerOutletTemplatesRead structure.
+type DcimPowerOutletTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesReadOK creates a DcimPowerOutletTemplatesReadOK with default headers values
+func NewDcimPowerOutletTemplatesReadOK() *DcimPowerOutletTemplatesReadOK {
+ return &DcimPowerOutletTemplatesReadOK{}
+}
+
+/*DcimPowerOutletTemplatesReadOK handles this case with default header values.
+
+DcimPowerOutletTemplatesReadOK dcim power outlet templates read o k
+*/
+type DcimPowerOutletTemplatesReadOK struct {
+ Payload *models.PowerOutletTemplate
+}
+
+func (o *DcimPowerOutletTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.PowerOutletTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go
new file mode 100644
index 0000000..5402906
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletTemplatesUpdateParams creates a new DcimPowerOutletTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimPowerOutletTemplatesUpdateParams() *DcimPowerOutletTemplatesUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesUpdateParamsWithTimeout creates a new DcimPowerOutletTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletTemplatesUpdateParamsWithContext creates a new DcimPowerOutletTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletTemplatesUpdateParamsWithContext(ctx context.Context) *DcimPowerOutletTemplatesUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletTemplatesUpdateParamsWithHTTPClient creates a new DcimPowerOutletTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesUpdateParams {
+ var ()
+ return &DcimPowerOutletTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power outlet templates update operation typically these are written to a http.Request
+*/
+type DcimPowerOutletTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutletTemplate
+ /*ID
+ A unique integer value identifying this power outlet template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) WithContext(ctx context.Context) *DcimPowerOutletTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) WithData(data *models.WritablePowerOutletTemplate) *DcimPowerOutletTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) SetData(data *models.WritablePowerOutletTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) WithID(id int64) *DcimPowerOutletTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlet templates update params
+func (o *DcimPowerOutletTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go
new file mode 100644
index 0000000..b933d33
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletTemplatesUpdateReader is a Reader for the DcimPowerOutletTemplatesUpdate structure.
+type DcimPowerOutletTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletTemplatesUpdateOK creates a DcimPowerOutletTemplatesUpdateOK with default headers values
+func NewDcimPowerOutletTemplatesUpdateOK() *DcimPowerOutletTemplatesUpdateOK {
+ return &DcimPowerOutletTemplatesUpdateOK{}
+}
+
+/*DcimPowerOutletTemplatesUpdateOK handles this case with default header values.
+
+DcimPowerOutletTemplatesUpdateOK dcim power outlet templates update o k
+*/
+type DcimPowerOutletTemplatesUpdateOK struct {
+ Payload *models.WritablePowerOutletTemplate
+}
+
+func (o *DcimPowerOutletTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/power-outlet-templates/{id}/][%d] dcimPowerOutletTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutletTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_parameters.go
new file mode 100644
index 0000000..177b9e2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletsCreateParams creates a new DcimPowerOutletsCreateParams object
+// with the default values initialized.
+func NewDcimPowerOutletsCreateParams() *DcimPowerOutletsCreateParams {
+ var ()
+ return &DcimPowerOutletsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsCreateParamsWithTimeout creates a new DcimPowerOutletsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsCreateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsCreateParams {
+ var ()
+ return &DcimPowerOutletsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsCreateParamsWithContext creates a new DcimPowerOutletsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsCreateParamsWithContext(ctx context.Context) *DcimPowerOutletsCreateParams {
+ var ()
+ return &DcimPowerOutletsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsCreateParamsWithHTTPClient creates a new DcimPowerOutletsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsCreateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsCreateParams {
+ var ()
+ return &DcimPowerOutletsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsCreateParams contains all the parameters to send to the API endpoint
+for the dcim power outlets create operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutlet
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) WithContext(ctx context.Context) *DcimPowerOutletsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) WithData(data *models.WritablePowerOutlet) *DcimPowerOutletsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlets create params
+func (o *DcimPowerOutletsCreateParams) SetData(data *models.WritablePowerOutlet) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go
new file mode 100644
index 0000000..972ccc2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletsCreateReader is a Reader for the DcimPowerOutletsCreate structure.
+type DcimPowerOutletsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimPowerOutletsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsCreateCreated creates a DcimPowerOutletsCreateCreated with default headers values
+func NewDcimPowerOutletsCreateCreated() *DcimPowerOutletsCreateCreated {
+ return &DcimPowerOutletsCreateCreated{}
+}
+
+/*DcimPowerOutletsCreateCreated handles this case with default header values.
+
+DcimPowerOutletsCreateCreated dcim power outlets create created
+*/
+type DcimPowerOutletsCreateCreated struct {
+ Payload *models.WritablePowerOutlet
+}
+
+func (o *DcimPowerOutletsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/power-outlets/][%d] dcimPowerOutletsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimPowerOutletsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutlet)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_parameters.go
new file mode 100644
index 0000000..017807a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletsDeleteParams creates a new DcimPowerOutletsDeleteParams object
+// with the default values initialized.
+func NewDcimPowerOutletsDeleteParams() *DcimPowerOutletsDeleteParams {
+ var ()
+ return &DcimPowerOutletsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsDeleteParamsWithTimeout creates a new DcimPowerOutletsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsDeleteParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsDeleteParams {
+ var ()
+ return &DcimPowerOutletsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsDeleteParamsWithContext creates a new DcimPowerOutletsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsDeleteParamsWithContext(ctx context.Context) *DcimPowerOutletsDeleteParams {
+ var ()
+ return &DcimPowerOutletsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsDeleteParamsWithHTTPClient creates a new DcimPowerOutletsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsDeleteParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsDeleteParams {
+ var ()
+ return &DcimPowerOutletsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim power outlets delete operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this power outlet.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) WithContext(ctx context.Context) *DcimPowerOutletsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) WithID(id int64) *DcimPowerOutletsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlets delete params
+func (o *DcimPowerOutletsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go
new file mode 100644
index 0000000..5a645b5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimPowerOutletsDeleteReader is a Reader for the DcimPowerOutletsDelete structure.
+type DcimPowerOutletsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimPowerOutletsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsDeleteNoContent creates a DcimPowerOutletsDeleteNoContent with default headers values
+func NewDcimPowerOutletsDeleteNoContent() *DcimPowerOutletsDeleteNoContent {
+ return &DcimPowerOutletsDeleteNoContent{}
+}
+
+/*DcimPowerOutletsDeleteNoContent handles this case with default header values.
+
+DcimPowerOutletsDeleteNoContent dcim power outlets delete no content
+*/
+type DcimPowerOutletsDeleteNoContent struct {
+}
+
+func (o *DcimPowerOutletsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/power-outlets/{id}/][%d] dcimPowerOutletsDeleteNoContent ", 204)
+}
+
+func (o *DcimPowerOutletsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_parameters.go
new file mode 100644
index 0000000..e83ce7d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletsListParams creates a new DcimPowerOutletsListParams object
+// with the default values initialized.
+func NewDcimPowerOutletsListParams() *DcimPowerOutletsListParams {
+ var ()
+ return &DcimPowerOutletsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsListParamsWithTimeout creates a new DcimPowerOutletsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsListParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsListParams {
+ var ()
+ return &DcimPowerOutletsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsListParamsWithContext creates a new DcimPowerOutletsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsListParamsWithContext(ctx context.Context) *DcimPowerOutletsListParams {
+ var ()
+ return &DcimPowerOutletsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsListParamsWithHTTPClient creates a new DcimPowerOutletsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsListParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsListParams {
+ var ()
+ return &DcimPowerOutletsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsListParams contains all the parameters to send to the API endpoint
+for the dcim power outlets list operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithContext(ctx context.Context) *DcimPowerOutletsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithDevice(device *string) *DcimPowerOutletsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithDeviceID(deviceID *string) *DcimPowerOutletsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithLimit(limit *int64) *DcimPowerOutletsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithName(name *string) *DcimPowerOutletsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) WithOffset(offset *int64) *DcimPowerOutletsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim power outlets list params
+func (o *DcimPowerOutletsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go
new file mode 100644
index 0000000..cbe5249
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletsListReader is a Reader for the DcimPowerOutletsList structure.
+type DcimPowerOutletsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsListOK creates a DcimPowerOutletsListOK with default headers values
+func NewDcimPowerOutletsListOK() *DcimPowerOutletsListOK {
+ return &DcimPowerOutletsListOK{}
+}
+
+/*DcimPowerOutletsListOK handles this case with default header values.
+
+DcimPowerOutletsListOK dcim power outlets list o k
+*/
+type DcimPowerOutletsListOK struct {
+ Payload *models.DcimPowerOutletsListOKBody
+}
+
+func (o *DcimPowerOutletsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-outlets/][%d] dcimPowerOutletsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPowerOutletsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go
new file mode 100644
index 0000000..42e1924
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletsPartialUpdateParams creates a new DcimPowerOutletsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimPowerOutletsPartialUpdateParams() *DcimPowerOutletsPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsPartialUpdateParamsWithTimeout creates a new DcimPowerOutletsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsPartialUpdateParamsWithContext creates a new DcimPowerOutletsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsPartialUpdateParamsWithContext(ctx context.Context) *DcimPowerOutletsPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsPartialUpdateParamsWithHTTPClient creates a new DcimPowerOutletsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsPartialUpdateParams {
+ var ()
+ return &DcimPowerOutletsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power outlets partial update operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutlet
+ /*ID
+ A unique integer value identifying this power outlet.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) WithContext(ctx context.Context) *DcimPowerOutletsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) WithData(data *models.WritablePowerOutlet) *DcimPowerOutletsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) SetData(data *models.WritablePowerOutlet) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) WithID(id int64) *DcimPowerOutletsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlets partial update params
+func (o *DcimPowerOutletsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go
new file mode 100644
index 0000000..0dda720
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletsPartialUpdateReader is a Reader for the DcimPowerOutletsPartialUpdate structure.
+type DcimPowerOutletsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsPartialUpdateOK creates a DcimPowerOutletsPartialUpdateOK with default headers values
+func NewDcimPowerOutletsPartialUpdateOK() *DcimPowerOutletsPartialUpdateOK {
+ return &DcimPowerOutletsPartialUpdateOK{}
+}
+
+/*DcimPowerOutletsPartialUpdateOK handles this case with default header values.
+
+DcimPowerOutletsPartialUpdateOK dcim power outlets partial update o k
+*/
+type DcimPowerOutletsPartialUpdateOK struct {
+ Payload *models.WritablePowerOutlet
+}
+
+func (o *DcimPowerOutletsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/power-outlets/{id}/][%d] dcimPowerOutletsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutlet)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_parameters.go
new file mode 100644
index 0000000..bd517a5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerOutletsReadParams creates a new DcimPowerOutletsReadParams object
+// with the default values initialized.
+func NewDcimPowerOutletsReadParams() *DcimPowerOutletsReadParams {
+ var ()
+ return &DcimPowerOutletsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsReadParamsWithTimeout creates a new DcimPowerOutletsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsReadParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsReadParams {
+ var ()
+ return &DcimPowerOutletsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsReadParamsWithContext creates a new DcimPowerOutletsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsReadParamsWithContext(ctx context.Context) *DcimPowerOutletsReadParams {
+ var ()
+ return &DcimPowerOutletsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsReadParamsWithHTTPClient creates a new DcimPowerOutletsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsReadParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsReadParams {
+ var ()
+ return &DcimPowerOutletsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsReadParams contains all the parameters to send to the API endpoint
+for the dcim power outlets read operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this power outlet.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) WithContext(ctx context.Context) *DcimPowerOutletsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) WithID(id int64) *DcimPowerOutletsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlets read params
+func (o *DcimPowerOutletsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go
new file mode 100644
index 0000000..468ff3d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletsReadReader is a Reader for the DcimPowerOutletsRead structure.
+type DcimPowerOutletsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsReadOK creates a DcimPowerOutletsReadOK with default headers values
+func NewDcimPowerOutletsReadOK() *DcimPowerOutletsReadOK {
+ return &DcimPowerOutletsReadOK{}
+}
+
+/*DcimPowerOutletsReadOK handles this case with default header values.
+
+DcimPowerOutletsReadOK dcim power outlets read o k
+*/
+type DcimPowerOutletsReadOK struct {
+ Payload *models.PowerOutlet
+}
+
+func (o *DcimPowerOutletsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-outlets/{id}/][%d] dcimPowerOutletsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.PowerOutlet)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_parameters.go
new file mode 100644
index 0000000..2f0e1aa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerOutletsUpdateParams creates a new DcimPowerOutletsUpdateParams object
+// with the default values initialized.
+func NewDcimPowerOutletsUpdateParams() *DcimPowerOutletsUpdateParams {
+ var ()
+ return &DcimPowerOutletsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerOutletsUpdateParamsWithTimeout creates a new DcimPowerOutletsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerOutletsUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerOutletsUpdateParams {
+ var ()
+ return &DcimPowerOutletsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerOutletsUpdateParamsWithContext creates a new DcimPowerOutletsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerOutletsUpdateParamsWithContext(ctx context.Context) *DcimPowerOutletsUpdateParams {
+ var ()
+ return &DcimPowerOutletsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerOutletsUpdateParamsWithHTTPClient creates a new DcimPowerOutletsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerOutletsUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerOutletsUpdateParams {
+ var ()
+ return &DcimPowerOutletsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerOutletsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power outlets update operation typically these are written to a http.Request
+*/
+type DcimPowerOutletsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerOutlet
+ /*ID
+ A unique integer value identifying this power outlet.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerOutletsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) WithContext(ctx context.Context) *DcimPowerOutletsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerOutletsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) WithData(data *models.WritablePowerOutlet) *DcimPowerOutletsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) SetData(data *models.WritablePowerOutlet) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) WithID(id int64) *DcimPowerOutletsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power outlets update params
+func (o *DcimPowerOutletsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerOutletsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go
new file mode 100644
index 0000000..5a26117
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerOutletsUpdateReader is a Reader for the DcimPowerOutletsUpdate structure.
+type DcimPowerOutletsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerOutletsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerOutletsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerOutletsUpdateOK creates a DcimPowerOutletsUpdateOK with default headers values
+func NewDcimPowerOutletsUpdateOK() *DcimPowerOutletsUpdateOK {
+ return &DcimPowerOutletsUpdateOK{}
+}
+
+/*DcimPowerOutletsUpdateOK handles this case with default header values.
+
+DcimPowerOutletsUpdateOK dcim power outlets update o k
+*/
+type DcimPowerOutletsUpdateOK struct {
+ Payload *models.WritablePowerOutlet
+}
+
+func (o *DcimPowerOutletsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/power-outlets/{id}/][%d] dcimPowerOutletsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerOutletsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerOutlet)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_parameters.go
new file mode 100644
index 0000000..fe10b21
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortTemplatesCreateParams creates a new DcimPowerPortTemplatesCreateParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesCreateParams() *DcimPowerPortTemplatesCreateParams {
+ var ()
+ return &DcimPowerPortTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesCreateParamsWithTimeout creates a new DcimPowerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesCreateParams {
+ var ()
+ return &DcimPowerPortTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesCreateParamsWithContext creates a new DcimPowerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesCreateParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesCreateParams {
+ var ()
+ return &DcimPowerPortTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesCreateParamsWithHTTPClient creates a new DcimPowerPortTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesCreateParams {
+ var ()
+ return &DcimPowerPortTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the dcim power port templates create operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPortTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) WithData(data *models.WritablePowerPortTemplate) *DcimPowerPortTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power port templates create params
+func (o *DcimPowerPortTemplatesCreateParams) SetData(data *models.WritablePowerPortTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go
new file mode 100644
index 0000000..93040a2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortTemplatesCreateReader is a Reader for the DcimPowerPortTemplatesCreate structure.
+type DcimPowerPortTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimPowerPortTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesCreateCreated creates a DcimPowerPortTemplatesCreateCreated with default headers values
+func NewDcimPowerPortTemplatesCreateCreated() *DcimPowerPortTemplatesCreateCreated {
+ return &DcimPowerPortTemplatesCreateCreated{}
+}
+
+/*DcimPowerPortTemplatesCreateCreated handles this case with default header values.
+
+DcimPowerPortTemplatesCreateCreated dcim power port templates create created
+*/
+type DcimPowerPortTemplatesCreateCreated struct {
+ Payload *models.WritablePowerPortTemplate
+}
+
+func (o *DcimPowerPortTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/power-port-templates/][%d] dcimPowerPortTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimPowerPortTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go
new file mode 100644
index 0000000..81469b3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortTemplatesDeleteParams creates a new DcimPowerPortTemplatesDeleteParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesDeleteParams() *DcimPowerPortTemplatesDeleteParams {
+ var ()
+ return &DcimPowerPortTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesDeleteParamsWithTimeout creates a new DcimPowerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesDeleteParams {
+ var ()
+ return &DcimPowerPortTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesDeleteParamsWithContext creates a new DcimPowerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesDeleteParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesDeleteParams {
+ var ()
+ return &DcimPowerPortTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesDeleteParamsWithHTTPClient creates a new DcimPowerPortTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesDeleteParams {
+ var ()
+ return &DcimPowerPortTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim power port templates delete operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this power port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) WithID(id int64) *DcimPowerPortTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power port templates delete params
+func (o *DcimPowerPortTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go
new file mode 100644
index 0000000..cc3ffdc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimPowerPortTemplatesDeleteReader is a Reader for the DcimPowerPortTemplatesDelete structure.
+type DcimPowerPortTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimPowerPortTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesDeleteNoContent creates a DcimPowerPortTemplatesDeleteNoContent with default headers values
+func NewDcimPowerPortTemplatesDeleteNoContent() *DcimPowerPortTemplatesDeleteNoContent {
+ return &DcimPowerPortTemplatesDeleteNoContent{}
+}
+
+/*DcimPowerPortTemplatesDeleteNoContent handles this case with default header values.
+
+DcimPowerPortTemplatesDeleteNoContent dcim power port templates delete no content
+*/
+type DcimPowerPortTemplatesDeleteNoContent struct {
+}
+
+func (o *DcimPowerPortTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesDeleteNoContent ", 204)
+}
+
+func (o *DcimPowerPortTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_parameters.go
new file mode 100644
index 0000000..0cd93cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortTemplatesListParams creates a new DcimPowerPortTemplatesListParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesListParams() *DcimPowerPortTemplatesListParams {
+ var ()
+ return &DcimPowerPortTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesListParamsWithTimeout creates a new DcimPowerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesListParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesListParams {
+ var ()
+ return &DcimPowerPortTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesListParamsWithContext creates a new DcimPowerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesListParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesListParams {
+ var ()
+ return &DcimPowerPortTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesListParamsWithHTTPClient creates a new DcimPowerPortTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesListParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesListParams {
+ var ()
+ return &DcimPowerPortTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesListParams contains all the parameters to send to the API endpoint
+for the dcim power port templates list operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesListParams struct {
+
+ /*DevicetypeID*/
+ DevicetypeID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevicetypeID adds the devicetypeID to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimPowerPortTemplatesListParams {
+ o.SetDevicetypeID(devicetypeID)
+ return o
+}
+
+// SetDevicetypeID adds the devicetypeId to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetDevicetypeID(devicetypeID *string) {
+ o.DevicetypeID = devicetypeID
+}
+
+// WithLimit adds the limit to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithLimit(limit *int64) *DcimPowerPortTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithName(name *string) *DcimPowerPortTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) WithOffset(offset *int64) *DcimPowerPortTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim power port templates list params
+func (o *DcimPowerPortTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DevicetypeID != nil {
+
+ // query param devicetype_id
+ var qrDevicetypeID string
+ if o.DevicetypeID != nil {
+ qrDevicetypeID = *o.DevicetypeID
+ }
+ qDevicetypeID := qrDevicetypeID
+ if qDevicetypeID != "" {
+ if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go
new file mode 100644
index 0000000..83daf9e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortTemplatesListReader is a Reader for the DcimPowerPortTemplatesList structure.
+type DcimPowerPortTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesListOK creates a DcimPowerPortTemplatesListOK with default headers values
+func NewDcimPowerPortTemplatesListOK() *DcimPowerPortTemplatesListOK {
+ return &DcimPowerPortTemplatesListOK{}
+}
+
+/*DcimPowerPortTemplatesListOK handles this case with default header values.
+
+DcimPowerPortTemplatesListOK dcim power port templates list o k
+*/
+type DcimPowerPortTemplatesListOK struct {
+ Payload *models.DcimPowerPortTemplatesListOKBody
+}
+
+func (o *DcimPowerPortTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-port-templates/][%d] dcimPowerPortTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPowerPortTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go
new file mode 100644
index 0000000..a79fd7a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortTemplatesPartialUpdateParams creates a new DcimPowerPortTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesPartialUpdateParams() *DcimPowerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesPartialUpdateParamsWithTimeout creates a new DcimPowerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesPartialUpdateParamsWithContext creates a new DcimPowerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimPowerPortTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesPartialUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power port templates partial update operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPortTemplate
+ /*ID
+ A unique integer value identifying this power port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WithData(data *models.WritablePowerPortTemplate) *DcimPowerPortTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) SetData(data *models.WritablePowerPortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WithID(id int64) *DcimPowerPortTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power port templates partial update params
+func (o *DcimPowerPortTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go
new file mode 100644
index 0000000..9746c7e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortTemplatesPartialUpdateReader is a Reader for the DcimPowerPortTemplatesPartialUpdate structure.
+type DcimPowerPortTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesPartialUpdateOK creates a DcimPowerPortTemplatesPartialUpdateOK with default headers values
+func NewDcimPowerPortTemplatesPartialUpdateOK() *DcimPowerPortTemplatesPartialUpdateOK {
+ return &DcimPowerPortTemplatesPartialUpdateOK{}
+}
+
+/*DcimPowerPortTemplatesPartialUpdateOK handles this case with default header values.
+
+DcimPowerPortTemplatesPartialUpdateOK dcim power port templates partial update o k
+*/
+type DcimPowerPortTemplatesPartialUpdateOK struct {
+ Payload *models.WritablePowerPortTemplate
+}
+
+func (o *DcimPowerPortTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_parameters.go
new file mode 100644
index 0000000..a8dd7bb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortTemplatesReadParams creates a new DcimPowerPortTemplatesReadParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesReadParams() *DcimPowerPortTemplatesReadParams {
+ var ()
+ return &DcimPowerPortTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesReadParamsWithTimeout creates a new DcimPowerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesReadParams {
+ var ()
+ return &DcimPowerPortTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesReadParamsWithContext creates a new DcimPowerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesReadParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesReadParams {
+ var ()
+ return &DcimPowerPortTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesReadParamsWithHTTPClient creates a new DcimPowerPortTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesReadParams {
+ var ()
+ return &DcimPowerPortTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesReadParams contains all the parameters to send to the API endpoint
+for the dcim power port templates read operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this power port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) WithID(id int64) *DcimPowerPortTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power port templates read params
+func (o *DcimPowerPortTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go
new file mode 100644
index 0000000..4517170
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortTemplatesReadReader is a Reader for the DcimPowerPortTemplatesRead structure.
+type DcimPowerPortTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesReadOK creates a DcimPowerPortTemplatesReadOK with default headers values
+func NewDcimPowerPortTemplatesReadOK() *DcimPowerPortTemplatesReadOK {
+ return &DcimPowerPortTemplatesReadOK{}
+}
+
+/*DcimPowerPortTemplatesReadOK handles this case with default header values.
+
+DcimPowerPortTemplatesReadOK dcim power port templates read o k
+*/
+type DcimPowerPortTemplatesReadOK struct {
+ Payload *models.PowerPortTemplate
+}
+
+func (o *DcimPowerPortTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.PowerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_parameters.go
new file mode 100644
index 0000000..f1820eb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortTemplatesUpdateParams creates a new DcimPowerPortTemplatesUpdateParams object
+// with the default values initialized.
+func NewDcimPowerPortTemplatesUpdateParams() *DcimPowerPortTemplatesUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesUpdateParamsWithTimeout creates a new DcimPowerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerPortTemplatesUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortTemplatesUpdateParamsWithContext creates a new DcimPowerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortTemplatesUpdateParamsWithContext(ctx context.Context) *DcimPowerPortTemplatesUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortTemplatesUpdateParamsWithHTTPClient creates a new DcimPowerPortTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerPortTemplatesUpdateParams {
+ var ()
+ return &DcimPowerPortTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power port templates update operation typically these are written to a http.Request
+*/
+type DcimPowerPortTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPortTemplate
+ /*ID
+ A unique integer value identifying this power port template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerPortTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) WithContext(ctx context.Context) *DcimPowerPortTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerPortTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) WithData(data *models.WritablePowerPortTemplate) *DcimPowerPortTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) SetData(data *models.WritablePowerPortTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) WithID(id int64) *DcimPowerPortTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power port templates update params
+func (o *DcimPowerPortTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go
new file mode 100644
index 0000000..d19d457
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortTemplatesUpdateReader is a Reader for the DcimPowerPortTemplatesUpdate structure.
+type DcimPowerPortTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortTemplatesUpdateOK creates a DcimPowerPortTemplatesUpdateOK with default headers values
+func NewDcimPowerPortTemplatesUpdateOK() *DcimPowerPortTemplatesUpdateOK {
+ return &DcimPowerPortTemplatesUpdateOK{}
+}
+
+/*DcimPowerPortTemplatesUpdateOK handles this case with default header values.
+
+DcimPowerPortTemplatesUpdateOK dcim power port templates update o k
+*/
+type DcimPowerPortTemplatesUpdateOK struct {
+ Payload *models.WritablePowerPortTemplate
+}
+
+func (o *DcimPowerPortTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/power-port-templates/{id}/][%d] dcimPowerPortTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPortTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_parameters.go
new file mode 100644
index 0000000..da44b48
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortsCreateParams creates a new DcimPowerPortsCreateParams object
+// with the default values initialized.
+func NewDcimPowerPortsCreateParams() *DcimPowerPortsCreateParams {
+ var ()
+ return &DcimPowerPortsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsCreateParamsWithTimeout creates a new DcimPowerPortsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsCreateParamsWithTimeout(timeout time.Duration) *DcimPowerPortsCreateParams {
+ var ()
+ return &DcimPowerPortsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsCreateParamsWithContext creates a new DcimPowerPortsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsCreateParamsWithContext(ctx context.Context) *DcimPowerPortsCreateParams {
+ var ()
+ return &DcimPowerPortsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsCreateParamsWithHTTPClient creates a new DcimPowerPortsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsCreateParamsWithHTTPClient(client *http.Client) *DcimPowerPortsCreateParams {
+ var ()
+ return &DcimPowerPortsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsCreateParams contains all the parameters to send to the API endpoint
+for the dcim power ports create operation typically these are written to a http.Request
+*/
+type DcimPowerPortsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPort
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) WithTimeout(timeout time.Duration) *DcimPowerPortsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) WithContext(ctx context.Context) *DcimPowerPortsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) WithHTTPClient(client *http.Client) *DcimPowerPortsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) WithData(data *models.WritablePowerPort) *DcimPowerPortsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power ports create params
+func (o *DcimPowerPortsCreateParams) SetData(data *models.WritablePowerPort) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go
new file mode 100644
index 0000000..fd7c4b2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortsCreateReader is a Reader for the DcimPowerPortsCreate structure.
+type DcimPowerPortsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimPowerPortsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsCreateCreated creates a DcimPowerPortsCreateCreated with default headers values
+func NewDcimPowerPortsCreateCreated() *DcimPowerPortsCreateCreated {
+ return &DcimPowerPortsCreateCreated{}
+}
+
+/*DcimPowerPortsCreateCreated handles this case with default header values.
+
+DcimPowerPortsCreateCreated dcim power ports create created
+*/
+type DcimPowerPortsCreateCreated struct {
+ Payload *models.WritablePowerPort
+}
+
+func (o *DcimPowerPortsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/power-ports/][%d] dcimPowerPortsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimPowerPortsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_parameters.go
new file mode 100644
index 0000000..04455a3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortsDeleteParams creates a new DcimPowerPortsDeleteParams object
+// with the default values initialized.
+func NewDcimPowerPortsDeleteParams() *DcimPowerPortsDeleteParams {
+ var ()
+ return &DcimPowerPortsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsDeleteParamsWithTimeout creates a new DcimPowerPortsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsDeleteParamsWithTimeout(timeout time.Duration) *DcimPowerPortsDeleteParams {
+ var ()
+ return &DcimPowerPortsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsDeleteParamsWithContext creates a new DcimPowerPortsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsDeleteParamsWithContext(ctx context.Context) *DcimPowerPortsDeleteParams {
+ var ()
+ return &DcimPowerPortsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsDeleteParamsWithHTTPClient creates a new DcimPowerPortsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsDeleteParamsWithHTTPClient(client *http.Client) *DcimPowerPortsDeleteParams {
+ var ()
+ return &DcimPowerPortsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim power ports delete operation typically these are written to a http.Request
+*/
+type DcimPowerPortsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this power port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) WithTimeout(timeout time.Duration) *DcimPowerPortsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) WithContext(ctx context.Context) *DcimPowerPortsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) WithHTTPClient(client *http.Client) *DcimPowerPortsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) WithID(id int64) *DcimPowerPortsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power ports delete params
+func (o *DcimPowerPortsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go
new file mode 100644
index 0000000..483f11a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimPowerPortsDeleteReader is a Reader for the DcimPowerPortsDelete structure.
+type DcimPowerPortsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimPowerPortsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsDeleteNoContent creates a DcimPowerPortsDeleteNoContent with default headers values
+func NewDcimPowerPortsDeleteNoContent() *DcimPowerPortsDeleteNoContent {
+ return &DcimPowerPortsDeleteNoContent{}
+}
+
+/*DcimPowerPortsDeleteNoContent handles this case with default header values.
+
+DcimPowerPortsDeleteNoContent dcim power ports delete no content
+*/
+type DcimPowerPortsDeleteNoContent struct {
+}
+
+func (o *DcimPowerPortsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/power-ports/{id}/][%d] dcimPowerPortsDeleteNoContent ", 204)
+}
+
+func (o *DcimPowerPortsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_parameters.go
new file mode 100644
index 0000000..6db800c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortsListParams creates a new DcimPowerPortsListParams object
+// with the default values initialized.
+func NewDcimPowerPortsListParams() *DcimPowerPortsListParams {
+ var ()
+ return &DcimPowerPortsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsListParamsWithTimeout creates a new DcimPowerPortsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsListParamsWithTimeout(timeout time.Duration) *DcimPowerPortsListParams {
+ var ()
+ return &DcimPowerPortsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsListParamsWithContext creates a new DcimPowerPortsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsListParamsWithContext(ctx context.Context) *DcimPowerPortsListParams {
+ var ()
+ return &DcimPowerPortsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsListParamsWithHTTPClient creates a new DcimPowerPortsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsListParamsWithHTTPClient(client *http.Client) *DcimPowerPortsListParams {
+ var ()
+ return &DcimPowerPortsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsListParams contains all the parameters to send to the API endpoint
+for the dcim power ports list operation typically these are written to a http.Request
+*/
+type DcimPowerPortsListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithTimeout(timeout time.Duration) *DcimPowerPortsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithContext(ctx context.Context) *DcimPowerPortsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithHTTPClient(client *http.Client) *DcimPowerPortsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithDevice(device *string) *DcimPowerPortsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithDeviceID(deviceID *string) *DcimPowerPortsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithLimit(limit *int64) *DcimPowerPortsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithName(name *string) *DcimPowerPortsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim power ports list params
+func (o *DcimPowerPortsListParams) WithOffset(offset *int64) *DcimPowerPortsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim power ports list params
+func (o *DcimPowerPortsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go
new file mode 100644
index 0000000..d4ba8d4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortsListReader is a Reader for the DcimPowerPortsList structure.
+type DcimPowerPortsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsListOK creates a DcimPowerPortsListOK with default headers values
+func NewDcimPowerPortsListOK() *DcimPowerPortsListOK {
+ return &DcimPowerPortsListOK{}
+}
+
+/*DcimPowerPortsListOK handles this case with default header values.
+
+DcimPowerPortsListOK dcim power ports list o k
+*/
+type DcimPowerPortsListOK struct {
+ Payload *models.DcimPowerPortsListOKBody
+}
+
+func (o *DcimPowerPortsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-ports/][%d] dcimPowerPortsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimPowerPortsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go
new file mode 100644
index 0000000..25e0a5e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortsPartialUpdateParams creates a new DcimPowerPortsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimPowerPortsPartialUpdateParams() *DcimPowerPortsPartialUpdateParams {
+ var ()
+ return &DcimPowerPortsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsPartialUpdateParamsWithTimeout creates a new DcimPowerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerPortsPartialUpdateParams {
+ var ()
+ return &DcimPowerPortsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsPartialUpdateParamsWithContext creates a new DcimPowerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsPartialUpdateParamsWithContext(ctx context.Context) *DcimPowerPortsPartialUpdateParams {
+ var ()
+ return &DcimPowerPortsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsPartialUpdateParamsWithHTTPClient creates a new DcimPowerPortsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerPortsPartialUpdateParams {
+ var ()
+ return &DcimPowerPortsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power ports partial update operation typically these are written to a http.Request
+*/
+type DcimPowerPortsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPort
+ /*ID
+ A unique integer value identifying this power port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerPortsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) WithContext(ctx context.Context) *DcimPowerPortsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerPortsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) WithData(data *models.WritablePowerPort) *DcimPowerPortsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) SetData(data *models.WritablePowerPort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) WithID(id int64) *DcimPowerPortsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power ports partial update params
+func (o *DcimPowerPortsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go
new file mode 100644
index 0000000..398fea9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortsPartialUpdateReader is a Reader for the DcimPowerPortsPartialUpdate structure.
+type DcimPowerPortsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsPartialUpdateOK creates a DcimPowerPortsPartialUpdateOK with default headers values
+func NewDcimPowerPortsPartialUpdateOK() *DcimPowerPortsPartialUpdateOK {
+ return &DcimPowerPortsPartialUpdateOK{}
+}
+
+/*DcimPowerPortsPartialUpdateOK handles this case with default header values.
+
+DcimPowerPortsPartialUpdateOK dcim power ports partial update o k
+*/
+type DcimPowerPortsPartialUpdateOK struct {
+ Payload *models.WritablePowerPort
+}
+
+func (o *DcimPowerPortsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/power-ports/{id}/][%d] dcimPowerPortsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_parameters.go
new file mode 100644
index 0000000..0916143
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimPowerPortsReadParams creates a new DcimPowerPortsReadParams object
+// with the default values initialized.
+func NewDcimPowerPortsReadParams() *DcimPowerPortsReadParams {
+ var ()
+ return &DcimPowerPortsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsReadParamsWithTimeout creates a new DcimPowerPortsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsReadParamsWithTimeout(timeout time.Duration) *DcimPowerPortsReadParams {
+ var ()
+ return &DcimPowerPortsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsReadParamsWithContext creates a new DcimPowerPortsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsReadParamsWithContext(ctx context.Context) *DcimPowerPortsReadParams {
+ var ()
+ return &DcimPowerPortsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsReadParamsWithHTTPClient creates a new DcimPowerPortsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsReadParamsWithHTTPClient(client *http.Client) *DcimPowerPortsReadParams {
+ var ()
+ return &DcimPowerPortsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsReadParams contains all the parameters to send to the API endpoint
+for the dcim power ports read operation typically these are written to a http.Request
+*/
+type DcimPowerPortsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this power port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) WithTimeout(timeout time.Duration) *DcimPowerPortsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) WithContext(ctx context.Context) *DcimPowerPortsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) WithHTTPClient(client *http.Client) *DcimPowerPortsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) WithID(id int64) *DcimPowerPortsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power ports read params
+func (o *DcimPowerPortsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go
new file mode 100644
index 0000000..a85e478
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortsReadReader is a Reader for the DcimPowerPortsRead structure.
+type DcimPowerPortsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsReadOK creates a DcimPowerPortsReadOK with default headers values
+func NewDcimPowerPortsReadOK() *DcimPowerPortsReadOK {
+ return &DcimPowerPortsReadOK{}
+}
+
+/*DcimPowerPortsReadOK handles this case with default header values.
+
+DcimPowerPortsReadOK dcim power ports read o k
+*/
+type DcimPowerPortsReadOK struct {
+ Payload *models.PowerPort
+}
+
+func (o *DcimPowerPortsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/power-ports/{id}/][%d] dcimPowerPortsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.PowerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_parameters.go
new file mode 100644
index 0000000..05299dd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimPowerPortsUpdateParams creates a new DcimPowerPortsUpdateParams object
+// with the default values initialized.
+func NewDcimPowerPortsUpdateParams() *DcimPowerPortsUpdateParams {
+ var ()
+ return &DcimPowerPortsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimPowerPortsUpdateParamsWithTimeout creates a new DcimPowerPortsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimPowerPortsUpdateParamsWithTimeout(timeout time.Duration) *DcimPowerPortsUpdateParams {
+ var ()
+ return &DcimPowerPortsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimPowerPortsUpdateParamsWithContext creates a new DcimPowerPortsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimPowerPortsUpdateParamsWithContext(ctx context.Context) *DcimPowerPortsUpdateParams {
+ var ()
+ return &DcimPowerPortsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimPowerPortsUpdateParamsWithHTTPClient creates a new DcimPowerPortsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimPowerPortsUpdateParamsWithHTTPClient(client *http.Client) *DcimPowerPortsUpdateParams {
+ var ()
+ return &DcimPowerPortsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimPowerPortsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim power ports update operation typically these are written to a http.Request
+*/
+type DcimPowerPortsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePowerPort
+ /*ID
+ A unique integer value identifying this power port.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) WithTimeout(timeout time.Duration) *DcimPowerPortsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) WithContext(ctx context.Context) *DcimPowerPortsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) WithHTTPClient(client *http.Client) *DcimPowerPortsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) WithData(data *models.WritablePowerPort) *DcimPowerPortsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) SetData(data *models.WritablePowerPort) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) WithID(id int64) *DcimPowerPortsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim power ports update params
+func (o *DcimPowerPortsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimPowerPortsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go
new file mode 100644
index 0000000..db4b090
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimPowerPortsUpdateReader is a Reader for the DcimPowerPortsUpdate structure.
+type DcimPowerPortsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimPowerPortsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimPowerPortsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimPowerPortsUpdateOK creates a DcimPowerPortsUpdateOK with default headers values
+func NewDcimPowerPortsUpdateOK() *DcimPowerPortsUpdateOK {
+ return &DcimPowerPortsUpdateOK{}
+}
+
+/*DcimPowerPortsUpdateOK handles this case with default header values.
+
+DcimPowerPortsUpdateOK dcim power ports update o k
+*/
+type DcimPowerPortsUpdateOK struct {
+ Payload *models.WritablePowerPort
+}
+
+func (o *DcimPowerPortsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/power-ports/{id}/][%d] dcimPowerPortsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimPowerPortsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePowerPort)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_parameters.go
new file mode 100644
index 0000000..fe004c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackGroupsCreateParams creates a new DcimRackGroupsCreateParams object
+// with the default values initialized.
+func NewDcimRackGroupsCreateParams() *DcimRackGroupsCreateParams {
+ var ()
+ return &DcimRackGroupsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsCreateParamsWithTimeout creates a new DcimRackGroupsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsCreateParamsWithTimeout(timeout time.Duration) *DcimRackGroupsCreateParams {
+ var ()
+ return &DcimRackGroupsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsCreateParamsWithContext creates a new DcimRackGroupsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsCreateParamsWithContext(ctx context.Context) *DcimRackGroupsCreateParams {
+ var ()
+ return &DcimRackGroupsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsCreateParamsWithHTTPClient creates a new DcimRackGroupsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsCreateParamsWithHTTPClient(client *http.Client) *DcimRackGroupsCreateParams {
+ var ()
+ return &DcimRackGroupsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsCreateParams contains all the parameters to send to the API endpoint
+for the dcim rack groups create operation typically these are written to a http.Request
+*/
+type DcimRackGroupsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackGroup
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) WithTimeout(timeout time.Duration) *DcimRackGroupsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) WithContext(ctx context.Context) *DcimRackGroupsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) WithHTTPClient(client *http.Client) *DcimRackGroupsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) WithData(data *models.WritableRackGroup) *DcimRackGroupsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack groups create params
+func (o *DcimRackGroupsCreateParams) SetData(data *models.WritableRackGroup) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go
new file mode 100644
index 0000000..651256a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackGroupsCreateReader is a Reader for the DcimRackGroupsCreate structure.
+type DcimRackGroupsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimRackGroupsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsCreateCreated creates a DcimRackGroupsCreateCreated with default headers values
+func NewDcimRackGroupsCreateCreated() *DcimRackGroupsCreateCreated {
+ return &DcimRackGroupsCreateCreated{}
+}
+
+/*DcimRackGroupsCreateCreated handles this case with default header values.
+
+DcimRackGroupsCreateCreated dcim rack groups create created
+*/
+type DcimRackGroupsCreateCreated struct {
+ Payload *models.WritableRackGroup
+}
+
+func (o *DcimRackGroupsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/rack-groups/][%d] dcimRackGroupsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimRackGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_parameters.go
new file mode 100644
index 0000000..407e8fd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackGroupsDeleteParams creates a new DcimRackGroupsDeleteParams object
+// with the default values initialized.
+func NewDcimRackGroupsDeleteParams() *DcimRackGroupsDeleteParams {
+ var ()
+ return &DcimRackGroupsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsDeleteParamsWithTimeout creates a new DcimRackGroupsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsDeleteParamsWithTimeout(timeout time.Duration) *DcimRackGroupsDeleteParams {
+ var ()
+ return &DcimRackGroupsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsDeleteParamsWithContext creates a new DcimRackGroupsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsDeleteParamsWithContext(ctx context.Context) *DcimRackGroupsDeleteParams {
+ var ()
+ return &DcimRackGroupsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsDeleteParamsWithHTTPClient creates a new DcimRackGroupsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsDeleteParamsWithHTTPClient(client *http.Client) *DcimRackGroupsDeleteParams {
+ var ()
+ return &DcimRackGroupsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim rack groups delete operation typically these are written to a http.Request
+*/
+type DcimRackGroupsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this rack group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) WithTimeout(timeout time.Duration) *DcimRackGroupsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) WithContext(ctx context.Context) *DcimRackGroupsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) WithHTTPClient(client *http.Client) *DcimRackGroupsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) WithID(id int64) *DcimRackGroupsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack groups delete params
+func (o *DcimRackGroupsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go
new file mode 100644
index 0000000..fb59a5f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimRackGroupsDeleteReader is a Reader for the DcimRackGroupsDelete structure.
+type DcimRackGroupsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimRackGroupsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsDeleteNoContent creates a DcimRackGroupsDeleteNoContent with default headers values
+func NewDcimRackGroupsDeleteNoContent() *DcimRackGroupsDeleteNoContent {
+ return &DcimRackGroupsDeleteNoContent{}
+}
+
+/*DcimRackGroupsDeleteNoContent handles this case with default header values.
+
+DcimRackGroupsDeleteNoContent dcim rack groups delete no content
+*/
+type DcimRackGroupsDeleteNoContent struct {
+}
+
+func (o *DcimRackGroupsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/rack-groups/{id}/][%d] dcimRackGroupsDeleteNoContent ", 204)
+}
+
+func (o *DcimRackGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_parameters.go
new file mode 100644
index 0000000..dedc12c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackGroupsListParams creates a new DcimRackGroupsListParams object
+// with the default values initialized.
+func NewDcimRackGroupsListParams() *DcimRackGroupsListParams {
+ var ()
+ return &DcimRackGroupsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsListParamsWithTimeout creates a new DcimRackGroupsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsListParamsWithTimeout(timeout time.Duration) *DcimRackGroupsListParams {
+ var ()
+ return &DcimRackGroupsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsListParamsWithContext creates a new DcimRackGroupsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsListParamsWithContext(ctx context.Context) *DcimRackGroupsListParams {
+ var ()
+ return &DcimRackGroupsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsListParamsWithHTTPClient creates a new DcimRackGroupsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsListParamsWithHTTPClient(client *http.Client) *DcimRackGroupsListParams {
+ var ()
+ return &DcimRackGroupsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsListParams contains all the parameters to send to the API endpoint
+for the dcim rack groups list operation typically these are written to a http.Request
+*/
+type DcimRackGroupsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithTimeout(timeout time.Duration) *DcimRackGroupsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithContext(ctx context.Context) *DcimRackGroupsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithHTTPClient(client *http.Client) *DcimRackGroupsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithLimit(limit *int64) *DcimRackGroupsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithName(name *string) *DcimRackGroupsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithOffset(offset *int64) *DcimRackGroupsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithSite(site *string) *DcimRackGroupsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithSiteID(siteID *string) *DcimRackGroupsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithSlug adds the slug to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) WithSlug(slug *string) *DcimRackGroupsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim rack groups list params
+func (o *DcimRackGroupsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go
new file mode 100644
index 0000000..20cda21
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackGroupsListReader is a Reader for the DcimRackGroupsList structure.
+type DcimRackGroupsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackGroupsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsListOK creates a DcimRackGroupsListOK with default headers values
+func NewDcimRackGroupsListOK() *DcimRackGroupsListOK {
+ return &DcimRackGroupsListOK{}
+}
+
+/*DcimRackGroupsListOK handles this case with default header values.
+
+DcimRackGroupsListOK dcim rack groups list o k
+*/
+type DcimRackGroupsListOK struct {
+ Payload *models.DcimRackGroupsListOKBody
+}
+
+func (o *DcimRackGroupsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-groups/][%d] dcimRackGroupsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimRackGroupsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go
new file mode 100644
index 0000000..e6061df
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackGroupsPartialUpdateParams creates a new DcimRackGroupsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimRackGroupsPartialUpdateParams() *DcimRackGroupsPartialUpdateParams {
+ var ()
+ return &DcimRackGroupsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsPartialUpdateParamsWithTimeout creates a new DcimRackGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimRackGroupsPartialUpdateParams {
+ var ()
+ return &DcimRackGroupsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsPartialUpdateParamsWithContext creates a new DcimRackGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsPartialUpdateParamsWithContext(ctx context.Context) *DcimRackGroupsPartialUpdateParams {
+ var ()
+ return &DcimRackGroupsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsPartialUpdateParamsWithHTTPClient creates a new DcimRackGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimRackGroupsPartialUpdateParams {
+ var ()
+ return &DcimRackGroupsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack groups partial update operation typically these are written to a http.Request
+*/
+type DcimRackGroupsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackGroup
+ /*ID
+ A unique integer value identifying this rack group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimRackGroupsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) WithContext(ctx context.Context) *DcimRackGroupsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimRackGroupsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) WithData(data *models.WritableRackGroup) *DcimRackGroupsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) SetData(data *models.WritableRackGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) WithID(id int64) *DcimRackGroupsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack groups partial update params
+func (o *DcimRackGroupsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go
new file mode 100644
index 0000000..bde1d46
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackGroupsPartialUpdateReader is a Reader for the DcimRackGroupsPartialUpdate structure.
+type DcimRackGroupsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackGroupsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsPartialUpdateOK creates a DcimRackGroupsPartialUpdateOK with default headers values
+func NewDcimRackGroupsPartialUpdateOK() *DcimRackGroupsPartialUpdateOK {
+ return &DcimRackGroupsPartialUpdateOK{}
+}
+
+/*DcimRackGroupsPartialUpdateOK handles this case with default header values.
+
+DcimRackGroupsPartialUpdateOK dcim rack groups partial update o k
+*/
+type DcimRackGroupsPartialUpdateOK struct {
+ Payload *models.WritableRackGroup
+}
+
+func (o *DcimRackGroupsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/rack-groups/{id}/][%d] dcimRackGroupsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_parameters.go
new file mode 100644
index 0000000..d38f929
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackGroupsReadParams creates a new DcimRackGroupsReadParams object
+// with the default values initialized.
+func NewDcimRackGroupsReadParams() *DcimRackGroupsReadParams {
+ var ()
+ return &DcimRackGroupsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsReadParamsWithTimeout creates a new DcimRackGroupsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsReadParamsWithTimeout(timeout time.Duration) *DcimRackGroupsReadParams {
+ var ()
+ return &DcimRackGroupsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsReadParamsWithContext creates a new DcimRackGroupsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsReadParamsWithContext(ctx context.Context) *DcimRackGroupsReadParams {
+ var ()
+ return &DcimRackGroupsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsReadParamsWithHTTPClient creates a new DcimRackGroupsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsReadParamsWithHTTPClient(client *http.Client) *DcimRackGroupsReadParams {
+ var ()
+ return &DcimRackGroupsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsReadParams contains all the parameters to send to the API endpoint
+for the dcim rack groups read operation typically these are written to a http.Request
+*/
+type DcimRackGroupsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this rack group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) WithTimeout(timeout time.Duration) *DcimRackGroupsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) WithContext(ctx context.Context) *DcimRackGroupsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) WithHTTPClient(client *http.Client) *DcimRackGroupsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) WithID(id int64) *DcimRackGroupsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack groups read params
+func (o *DcimRackGroupsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go
new file mode 100644
index 0000000..962177a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackGroupsReadReader is a Reader for the DcimRackGroupsRead structure.
+type DcimRackGroupsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackGroupsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsReadOK creates a DcimRackGroupsReadOK with default headers values
+func NewDcimRackGroupsReadOK() *DcimRackGroupsReadOK {
+ return &DcimRackGroupsReadOK{}
+}
+
+/*DcimRackGroupsReadOK handles this case with default header values.
+
+DcimRackGroupsReadOK dcim rack groups read o k
+*/
+type DcimRackGroupsReadOK struct {
+ Payload *models.RackGroup
+}
+
+func (o *DcimRackGroupsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-groups/{id}/][%d] dcimRackGroupsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_parameters.go
new file mode 100644
index 0000000..1538164
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackGroupsUpdateParams creates a new DcimRackGroupsUpdateParams object
+// with the default values initialized.
+func NewDcimRackGroupsUpdateParams() *DcimRackGroupsUpdateParams {
+ var ()
+ return &DcimRackGroupsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackGroupsUpdateParamsWithTimeout creates a new DcimRackGroupsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackGroupsUpdateParamsWithTimeout(timeout time.Duration) *DcimRackGroupsUpdateParams {
+ var ()
+ return &DcimRackGroupsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackGroupsUpdateParamsWithContext creates a new DcimRackGroupsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackGroupsUpdateParamsWithContext(ctx context.Context) *DcimRackGroupsUpdateParams {
+ var ()
+ return &DcimRackGroupsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackGroupsUpdateParamsWithHTTPClient creates a new DcimRackGroupsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackGroupsUpdateParamsWithHTTPClient(client *http.Client) *DcimRackGroupsUpdateParams {
+ var ()
+ return &DcimRackGroupsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackGroupsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack groups update operation typically these are written to a http.Request
+*/
+type DcimRackGroupsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackGroup
+ /*ID
+ A unique integer value identifying this rack group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) WithTimeout(timeout time.Duration) *DcimRackGroupsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) WithContext(ctx context.Context) *DcimRackGroupsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) WithHTTPClient(client *http.Client) *DcimRackGroupsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) WithData(data *models.WritableRackGroup) *DcimRackGroupsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) SetData(data *models.WritableRackGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) WithID(id int64) *DcimRackGroupsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack groups update params
+func (o *DcimRackGroupsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go
new file mode 100644
index 0000000..d43c50f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackGroupsUpdateReader is a Reader for the DcimRackGroupsUpdate structure.
+type DcimRackGroupsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackGroupsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackGroupsUpdateOK creates a DcimRackGroupsUpdateOK with default headers values
+func NewDcimRackGroupsUpdateOK() *DcimRackGroupsUpdateOK {
+ return &DcimRackGroupsUpdateOK{}
+}
+
+/*DcimRackGroupsUpdateOK handles this case with default header values.
+
+DcimRackGroupsUpdateOK dcim rack groups update o k
+*/
+type DcimRackGroupsUpdateOK struct {
+ Payload *models.WritableRackGroup
+}
+
+func (o *DcimRackGroupsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/rack-groups/{id}/][%d] dcimRackGroupsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_parameters.go
new file mode 100644
index 0000000..c1a1ad2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackReservationsCreateParams creates a new DcimRackReservationsCreateParams object
+// with the default values initialized.
+func NewDcimRackReservationsCreateParams() *DcimRackReservationsCreateParams {
+ var ()
+ return &DcimRackReservationsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsCreateParamsWithTimeout creates a new DcimRackReservationsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsCreateParamsWithTimeout(timeout time.Duration) *DcimRackReservationsCreateParams {
+ var ()
+ return &DcimRackReservationsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsCreateParamsWithContext creates a new DcimRackReservationsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsCreateParamsWithContext(ctx context.Context) *DcimRackReservationsCreateParams {
+ var ()
+ return &DcimRackReservationsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsCreateParamsWithHTTPClient creates a new DcimRackReservationsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsCreateParamsWithHTTPClient(client *http.Client) *DcimRackReservationsCreateParams {
+ var ()
+ return &DcimRackReservationsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsCreateParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations create operation typically these are written to a http.Request
+*/
+type DcimRackReservationsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackReservation
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) WithTimeout(timeout time.Duration) *DcimRackReservationsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) WithContext(ctx context.Context) *DcimRackReservationsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) WithHTTPClient(client *http.Client) *DcimRackReservationsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) WithData(data *models.WritableRackReservation) *DcimRackReservationsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack reservations create params
+func (o *DcimRackReservationsCreateParams) SetData(data *models.WritableRackReservation) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go
new file mode 100644
index 0000000..002160b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackReservationsCreateReader is a Reader for the DcimRackReservationsCreate structure.
+type DcimRackReservationsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimRackReservationsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsCreateCreated creates a DcimRackReservationsCreateCreated with default headers values
+func NewDcimRackReservationsCreateCreated() *DcimRackReservationsCreateCreated {
+ return &DcimRackReservationsCreateCreated{}
+}
+
+/*DcimRackReservationsCreateCreated handles this case with default header values.
+
+DcimRackReservationsCreateCreated dcim rack reservations create created
+*/
+type DcimRackReservationsCreateCreated struct {
+ Payload *models.WritableRackReservation
+}
+
+func (o *DcimRackReservationsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/rack-reservations/][%d] dcimRackReservationsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimRackReservationsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackReservation)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go
new file mode 100644
index 0000000..97b77bf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackReservationsDeleteParams creates a new DcimRackReservationsDeleteParams object
+// with the default values initialized.
+func NewDcimRackReservationsDeleteParams() *DcimRackReservationsDeleteParams {
+ var ()
+ return &DcimRackReservationsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsDeleteParamsWithTimeout creates a new DcimRackReservationsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsDeleteParamsWithTimeout(timeout time.Duration) *DcimRackReservationsDeleteParams {
+ var ()
+ return &DcimRackReservationsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsDeleteParamsWithContext creates a new DcimRackReservationsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsDeleteParamsWithContext(ctx context.Context) *DcimRackReservationsDeleteParams {
+ var ()
+ return &DcimRackReservationsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsDeleteParamsWithHTTPClient creates a new DcimRackReservationsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsDeleteParamsWithHTTPClient(client *http.Client) *DcimRackReservationsDeleteParams {
+ var ()
+ return &DcimRackReservationsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations delete operation typically these are written to a http.Request
+*/
+type DcimRackReservationsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this rack reservation.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) WithTimeout(timeout time.Duration) *DcimRackReservationsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) WithContext(ctx context.Context) *DcimRackReservationsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) WithHTTPClient(client *http.Client) *DcimRackReservationsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) WithID(id int64) *DcimRackReservationsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack reservations delete params
+func (o *DcimRackReservationsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go
new file mode 100644
index 0000000..a6a5eca
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimRackReservationsDeleteReader is a Reader for the DcimRackReservationsDelete structure.
+type DcimRackReservationsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimRackReservationsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsDeleteNoContent creates a DcimRackReservationsDeleteNoContent with default headers values
+func NewDcimRackReservationsDeleteNoContent() *DcimRackReservationsDeleteNoContent {
+ return &DcimRackReservationsDeleteNoContent{}
+}
+
+/*DcimRackReservationsDeleteNoContent handles this case with default header values.
+
+DcimRackReservationsDeleteNoContent dcim rack reservations delete no content
+*/
+type DcimRackReservationsDeleteNoContent struct {
+}
+
+func (o *DcimRackReservationsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/rack-reservations/{id}/][%d] dcimRackReservationsDeleteNoContent ", 204)
+}
+
+func (o *DcimRackReservationsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go
new file mode 100644
index 0000000..bf4fd02
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go
@@ -0,0 +1,546 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackReservationsListParams creates a new DcimRackReservationsListParams object
+// with the default values initialized.
+func NewDcimRackReservationsListParams() *DcimRackReservationsListParams {
+ var ()
+ return &DcimRackReservationsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsListParamsWithTimeout creates a new DcimRackReservationsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsListParamsWithTimeout(timeout time.Duration) *DcimRackReservationsListParams {
+ var ()
+ return &DcimRackReservationsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsListParamsWithContext creates a new DcimRackReservationsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsListParamsWithContext(ctx context.Context) *DcimRackReservationsListParams {
+ var ()
+ return &DcimRackReservationsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsListParamsWithHTTPClient creates a new DcimRackReservationsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsListParamsWithHTTPClient(client *http.Client) *DcimRackReservationsListParams {
+ var ()
+ return &DcimRackReservationsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsListParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations list operation typically these are written to a http.Request
+*/
+type DcimRackReservationsListParams struct {
+
+ /*Created*/
+ Created *string
+ /*Group*/
+ Group *string
+ /*GroupID*/
+ GroupID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*RackID*/
+ RackID *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*User*/
+ User *string
+ /*UserID*/
+ UserID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithTimeout(timeout time.Duration) *DcimRackReservationsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithContext(ctx context.Context) *DcimRackReservationsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithHTTPClient(client *http.Client) *DcimRackReservationsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithCreated adds the created to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithCreated(created *string) *DcimRackReservationsListParams {
+ o.SetCreated(created)
+ return o
+}
+
+// SetCreated adds the created to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetCreated(created *string) {
+ o.Created = created
+}
+
+// WithGroup adds the group to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithGroup(group *string) *DcimRackReservationsListParams {
+ o.SetGroup(group)
+ return o
+}
+
+// SetGroup adds the group to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetGroup(group *string) {
+ o.Group = group
+}
+
+// WithGroupID adds the groupID to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithGroupID(groupID *string) *DcimRackReservationsListParams {
+ o.SetGroupID(groupID)
+ return o
+}
+
+// SetGroupID adds the groupId to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetGroupID(groupID *string) {
+ o.GroupID = groupID
+}
+
+// WithIDIn adds the iDIn to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithIDIn(iDIn *string) *DcimRackReservationsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithLimit(limit *int64) *DcimRackReservationsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithOffset(offset *int64) *DcimRackReservationsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithQ(q *string) *DcimRackReservationsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRackID adds the rackID to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithRackID(rackID *string) *DcimRackReservationsListParams {
+ o.SetRackID(rackID)
+ return o
+}
+
+// SetRackID adds the rackId to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetRackID(rackID *string) {
+ o.RackID = rackID
+}
+
+// WithSite adds the site to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithSite(site *string) *DcimRackReservationsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithSiteID(siteID *string) *DcimRackReservationsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithTenant adds the tenant to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithTenant(tenant *string) *DcimRackReservationsListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithTenantID(tenantID *string) *DcimRackReservationsListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithUser adds the user to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithUser(user *string) *DcimRackReservationsListParams {
+ o.SetUser(user)
+ return o
+}
+
+// SetUser adds the user to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetUser(user *string) {
+ o.User = user
+}
+
+// WithUserID adds the userID to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) WithUserID(userID *string) *DcimRackReservationsListParams {
+ o.SetUserID(userID)
+ return o
+}
+
+// SetUserID adds the userId to the dcim rack reservations list params
+func (o *DcimRackReservationsListParams) SetUserID(userID *string) {
+ o.UserID = userID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Created != nil {
+
+ // query param created
+ var qrCreated string
+ if o.Created != nil {
+ qrCreated = *o.Created
+ }
+ qCreated := qrCreated
+ if qCreated != "" {
+ if err := r.SetQueryParam("created", qCreated); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Group != nil {
+
+ // query param group
+ var qrGroup string
+ if o.Group != nil {
+ qrGroup = *o.Group
+ }
+ qGroup := qrGroup
+ if qGroup != "" {
+ if err := r.SetQueryParam("group", qGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.GroupID != nil {
+
+ // query param group_id
+ var qrGroupID string
+ if o.GroupID != nil {
+ qrGroupID = *o.GroupID
+ }
+ qGroupID := qrGroupID
+ if qGroupID != "" {
+ if err := r.SetQueryParam("group_id", qGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RackID != nil {
+
+ // query param rack_id
+ var qrRackID string
+ if o.RackID != nil {
+ qrRackID = *o.RackID
+ }
+ qRackID := qrRackID
+ if qRackID != "" {
+ if err := r.SetQueryParam("rack_id", qRackID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.User != nil {
+
+ // query param user
+ var qrUser string
+ if o.User != nil {
+ qrUser = *o.User
+ }
+ qUser := qrUser
+ if qUser != "" {
+ if err := r.SetQueryParam("user", qUser); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.UserID != nil {
+
+ // query param user_id
+ var qrUserID string
+ if o.UserID != nil {
+ qrUserID = *o.UserID
+ }
+ qUserID := qrUserID
+ if qUserID != "" {
+ if err := r.SetQueryParam("user_id", qUserID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go
new file mode 100644
index 0000000..b6f13da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackReservationsListReader is a Reader for the DcimRackReservationsList structure.
+type DcimRackReservationsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackReservationsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsListOK creates a DcimRackReservationsListOK with default headers values
+func NewDcimRackReservationsListOK() *DcimRackReservationsListOK {
+ return &DcimRackReservationsListOK{}
+}
+
+/*DcimRackReservationsListOK handles this case with default header values.
+
+DcimRackReservationsListOK dcim rack reservations list o k
+*/
+type DcimRackReservationsListOK struct {
+ Payload *models.DcimRackReservationsListOKBody
+}
+
+func (o *DcimRackReservationsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-reservations/][%d] dcimRackReservationsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackReservationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimRackReservationsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go
new file mode 100644
index 0000000..19718df
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackReservationsPartialUpdateParams creates a new DcimRackReservationsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimRackReservationsPartialUpdateParams() *DcimRackReservationsPartialUpdateParams {
+ var ()
+ return &DcimRackReservationsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsPartialUpdateParamsWithTimeout creates a new DcimRackReservationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimRackReservationsPartialUpdateParams {
+ var ()
+ return &DcimRackReservationsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsPartialUpdateParamsWithContext creates a new DcimRackReservationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsPartialUpdateParamsWithContext(ctx context.Context) *DcimRackReservationsPartialUpdateParams {
+ var ()
+ return &DcimRackReservationsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsPartialUpdateParamsWithHTTPClient creates a new DcimRackReservationsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimRackReservationsPartialUpdateParams {
+ var ()
+ return &DcimRackReservationsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations partial update operation typically these are written to a http.Request
+*/
+type DcimRackReservationsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackReservation
+ /*ID
+ A unique integer value identifying this rack reservation.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimRackReservationsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) WithContext(ctx context.Context) *DcimRackReservationsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimRackReservationsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) WithData(data *models.WritableRackReservation) *DcimRackReservationsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) SetData(data *models.WritableRackReservation) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) WithID(id int64) *DcimRackReservationsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack reservations partial update params
+func (o *DcimRackReservationsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go
new file mode 100644
index 0000000..20a059d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackReservationsPartialUpdateReader is a Reader for the DcimRackReservationsPartialUpdate structure.
+type DcimRackReservationsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackReservationsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsPartialUpdateOK creates a DcimRackReservationsPartialUpdateOK with default headers values
+func NewDcimRackReservationsPartialUpdateOK() *DcimRackReservationsPartialUpdateOK {
+ return &DcimRackReservationsPartialUpdateOK{}
+}
+
+/*DcimRackReservationsPartialUpdateOK handles this case with default header values.
+
+DcimRackReservationsPartialUpdateOK dcim rack reservations partial update o k
+*/
+type DcimRackReservationsPartialUpdateOK struct {
+ Payload *models.WritableRackReservation
+}
+
+func (o *DcimRackReservationsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/rack-reservations/{id}/][%d] dcimRackReservationsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackReservationsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackReservation)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_parameters.go
new file mode 100644
index 0000000..c24f8dd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackReservationsReadParams creates a new DcimRackReservationsReadParams object
+// with the default values initialized.
+func NewDcimRackReservationsReadParams() *DcimRackReservationsReadParams {
+ var ()
+ return &DcimRackReservationsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsReadParamsWithTimeout creates a new DcimRackReservationsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsReadParamsWithTimeout(timeout time.Duration) *DcimRackReservationsReadParams {
+ var ()
+ return &DcimRackReservationsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsReadParamsWithContext creates a new DcimRackReservationsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsReadParamsWithContext(ctx context.Context) *DcimRackReservationsReadParams {
+ var ()
+ return &DcimRackReservationsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsReadParamsWithHTTPClient creates a new DcimRackReservationsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsReadParamsWithHTTPClient(client *http.Client) *DcimRackReservationsReadParams {
+ var ()
+ return &DcimRackReservationsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsReadParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations read operation typically these are written to a http.Request
+*/
+type DcimRackReservationsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this rack reservation.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) WithTimeout(timeout time.Duration) *DcimRackReservationsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) WithContext(ctx context.Context) *DcimRackReservationsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) WithHTTPClient(client *http.Client) *DcimRackReservationsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) WithID(id int64) *DcimRackReservationsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack reservations read params
+func (o *DcimRackReservationsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go
new file mode 100644
index 0000000..77f0db2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackReservationsReadReader is a Reader for the DcimRackReservationsRead structure.
+type DcimRackReservationsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackReservationsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsReadOK creates a DcimRackReservationsReadOK with default headers values
+func NewDcimRackReservationsReadOK() *DcimRackReservationsReadOK {
+ return &DcimRackReservationsReadOK{}
+}
+
+/*DcimRackReservationsReadOK handles this case with default header values.
+
+DcimRackReservationsReadOK dcim rack reservations read o k
+*/
+type DcimRackReservationsReadOK struct {
+ Payload *models.RackReservation
+}
+
+func (o *DcimRackReservationsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-reservations/{id}/][%d] dcimRackReservationsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackReservationsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackReservation)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_parameters.go
new file mode 100644
index 0000000..cbbf6c8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackReservationsUpdateParams creates a new DcimRackReservationsUpdateParams object
+// with the default values initialized.
+func NewDcimRackReservationsUpdateParams() *DcimRackReservationsUpdateParams {
+ var ()
+ return &DcimRackReservationsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackReservationsUpdateParamsWithTimeout creates a new DcimRackReservationsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackReservationsUpdateParamsWithTimeout(timeout time.Duration) *DcimRackReservationsUpdateParams {
+ var ()
+ return &DcimRackReservationsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackReservationsUpdateParamsWithContext creates a new DcimRackReservationsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackReservationsUpdateParamsWithContext(ctx context.Context) *DcimRackReservationsUpdateParams {
+ var ()
+ return &DcimRackReservationsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackReservationsUpdateParamsWithHTTPClient creates a new DcimRackReservationsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackReservationsUpdateParamsWithHTTPClient(client *http.Client) *DcimRackReservationsUpdateParams {
+ var ()
+ return &DcimRackReservationsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackReservationsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack reservations update operation typically these are written to a http.Request
+*/
+type DcimRackReservationsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRackReservation
+ /*ID
+ A unique integer value identifying this rack reservation.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) WithTimeout(timeout time.Duration) *DcimRackReservationsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) WithContext(ctx context.Context) *DcimRackReservationsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) WithHTTPClient(client *http.Client) *DcimRackReservationsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) WithData(data *models.WritableRackReservation) *DcimRackReservationsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) SetData(data *models.WritableRackReservation) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) WithID(id int64) *DcimRackReservationsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack reservations update params
+func (o *DcimRackReservationsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackReservationsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go
new file mode 100644
index 0000000..2277550
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackReservationsUpdateReader is a Reader for the DcimRackReservationsUpdate structure.
+type DcimRackReservationsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackReservationsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackReservationsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackReservationsUpdateOK creates a DcimRackReservationsUpdateOK with default headers values
+func NewDcimRackReservationsUpdateOK() *DcimRackReservationsUpdateOK {
+ return &DcimRackReservationsUpdateOK{}
+}
+
+/*DcimRackReservationsUpdateOK handles this case with default header values.
+
+DcimRackReservationsUpdateOK dcim rack reservations update o k
+*/
+type DcimRackReservationsUpdateOK struct {
+ Payload *models.WritableRackReservation
+}
+
+func (o *DcimRackReservationsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/rack-reservations/{id}/][%d] dcimRackReservationsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackReservationsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRackReservation)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_parameters.go
new file mode 100644
index 0000000..6442cdb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackRolesCreateParams creates a new DcimRackRolesCreateParams object
+// with the default values initialized.
+func NewDcimRackRolesCreateParams() *DcimRackRolesCreateParams {
+ var ()
+ return &DcimRackRolesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesCreateParamsWithTimeout creates a new DcimRackRolesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesCreateParamsWithTimeout(timeout time.Duration) *DcimRackRolesCreateParams {
+ var ()
+ return &DcimRackRolesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesCreateParamsWithContext creates a new DcimRackRolesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesCreateParamsWithContext(ctx context.Context) *DcimRackRolesCreateParams {
+ var ()
+ return &DcimRackRolesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesCreateParamsWithHTTPClient creates a new DcimRackRolesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesCreateParamsWithHTTPClient(client *http.Client) *DcimRackRolesCreateParams {
+ var ()
+ return &DcimRackRolesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesCreateParams contains all the parameters to send to the API endpoint
+for the dcim rack roles create operation typically these are written to a http.Request
+*/
+type DcimRackRolesCreateParams struct {
+
+ /*Data*/
+ Data *models.RackRole
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) WithTimeout(timeout time.Duration) *DcimRackRolesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) WithContext(ctx context.Context) *DcimRackRolesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) WithHTTPClient(client *http.Client) *DcimRackRolesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) WithData(data *models.RackRole) *DcimRackRolesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack roles create params
+func (o *DcimRackRolesCreateParams) SetData(data *models.RackRole) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go
new file mode 100644
index 0000000..a084688
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackRolesCreateReader is a Reader for the DcimRackRolesCreate structure.
+type DcimRackRolesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimRackRolesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesCreateCreated creates a DcimRackRolesCreateCreated with default headers values
+func NewDcimRackRolesCreateCreated() *DcimRackRolesCreateCreated {
+ return &DcimRackRolesCreateCreated{}
+}
+
+/*DcimRackRolesCreateCreated handles this case with default header values.
+
+DcimRackRolesCreateCreated dcim rack roles create created
+*/
+type DcimRackRolesCreateCreated struct {
+ Payload *models.RackRole
+}
+
+func (o *DcimRackRolesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/rack-roles/][%d] dcimRackRolesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimRackRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_parameters.go
new file mode 100644
index 0000000..cad9b03
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackRolesDeleteParams creates a new DcimRackRolesDeleteParams object
+// with the default values initialized.
+func NewDcimRackRolesDeleteParams() *DcimRackRolesDeleteParams {
+ var ()
+ return &DcimRackRolesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesDeleteParamsWithTimeout creates a new DcimRackRolesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesDeleteParamsWithTimeout(timeout time.Duration) *DcimRackRolesDeleteParams {
+ var ()
+ return &DcimRackRolesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesDeleteParamsWithContext creates a new DcimRackRolesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesDeleteParamsWithContext(ctx context.Context) *DcimRackRolesDeleteParams {
+ var ()
+ return &DcimRackRolesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesDeleteParamsWithHTTPClient creates a new DcimRackRolesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesDeleteParamsWithHTTPClient(client *http.Client) *DcimRackRolesDeleteParams {
+ var ()
+ return &DcimRackRolesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim rack roles delete operation typically these are written to a http.Request
+*/
+type DcimRackRolesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this rack role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) WithTimeout(timeout time.Duration) *DcimRackRolesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) WithContext(ctx context.Context) *DcimRackRolesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) WithHTTPClient(client *http.Client) *DcimRackRolesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) WithID(id int64) *DcimRackRolesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack roles delete params
+func (o *DcimRackRolesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go
new file mode 100644
index 0000000..aa0e6c1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimRackRolesDeleteReader is a Reader for the DcimRackRolesDelete structure.
+type DcimRackRolesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimRackRolesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesDeleteNoContent creates a DcimRackRolesDeleteNoContent with default headers values
+func NewDcimRackRolesDeleteNoContent() *DcimRackRolesDeleteNoContent {
+ return &DcimRackRolesDeleteNoContent{}
+}
+
+/*DcimRackRolesDeleteNoContent handles this case with default header values.
+
+DcimRackRolesDeleteNoContent dcim rack roles delete no content
+*/
+type DcimRackRolesDeleteNoContent struct {
+}
+
+func (o *DcimRackRolesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/rack-roles/{id}/][%d] dcimRackRolesDeleteNoContent ", 204)
+}
+
+func (o *DcimRackRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_parameters.go
new file mode 100644
index 0000000..60165da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_parameters.go
@@ -0,0 +1,282 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackRolesListParams creates a new DcimRackRolesListParams object
+// with the default values initialized.
+func NewDcimRackRolesListParams() *DcimRackRolesListParams {
+ var ()
+ return &DcimRackRolesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesListParamsWithTimeout creates a new DcimRackRolesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesListParamsWithTimeout(timeout time.Duration) *DcimRackRolesListParams {
+ var ()
+ return &DcimRackRolesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesListParamsWithContext creates a new DcimRackRolesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesListParamsWithContext(ctx context.Context) *DcimRackRolesListParams {
+ var ()
+ return &DcimRackRolesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesListParamsWithHTTPClient creates a new DcimRackRolesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesListParamsWithHTTPClient(client *http.Client) *DcimRackRolesListParams {
+ var ()
+ return &DcimRackRolesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesListParams contains all the parameters to send to the API endpoint
+for the dcim rack roles list operation typically these are written to a http.Request
+*/
+type DcimRackRolesListParams struct {
+
+ /*Color*/
+ Color *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithTimeout(timeout time.Duration) *DcimRackRolesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithContext(ctx context.Context) *DcimRackRolesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithHTTPClient(client *http.Client) *DcimRackRolesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithColor adds the color to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithColor(color *string) *DcimRackRolesListParams {
+ o.SetColor(color)
+ return o
+}
+
+// SetColor adds the color to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetColor(color *string) {
+ o.Color = color
+}
+
+// WithLimit adds the limit to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithLimit(limit *int64) *DcimRackRolesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithName(name *string) *DcimRackRolesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithOffset(offset *int64) *DcimRackRolesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the dcim rack roles list params
+func (o *DcimRackRolesListParams) WithSlug(slug *string) *DcimRackRolesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim rack roles list params
+func (o *DcimRackRolesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Color != nil {
+
+ // query param color
+ var qrColor string
+ if o.Color != nil {
+ qrColor = *o.Color
+ }
+ qColor := qrColor
+ if qColor != "" {
+ if err := r.SetQueryParam("color", qColor); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go
new file mode 100644
index 0000000..e11ebb3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackRolesListReader is a Reader for the DcimRackRolesList structure.
+type DcimRackRolesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackRolesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesListOK creates a DcimRackRolesListOK with default headers values
+func NewDcimRackRolesListOK() *DcimRackRolesListOK {
+ return &DcimRackRolesListOK{}
+}
+
+/*DcimRackRolesListOK handles this case with default header values.
+
+DcimRackRolesListOK dcim rack roles list o k
+*/
+type DcimRackRolesListOK struct {
+ Payload *models.DcimRackRolesListOKBody
+}
+
+func (o *DcimRackRolesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-roles/][%d] dcimRackRolesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimRackRolesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go
new file mode 100644
index 0000000..7723718
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackRolesPartialUpdateParams creates a new DcimRackRolesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimRackRolesPartialUpdateParams() *DcimRackRolesPartialUpdateParams {
+ var ()
+ return &DcimRackRolesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesPartialUpdateParamsWithTimeout creates a new DcimRackRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimRackRolesPartialUpdateParams {
+ var ()
+ return &DcimRackRolesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesPartialUpdateParamsWithContext creates a new DcimRackRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesPartialUpdateParamsWithContext(ctx context.Context) *DcimRackRolesPartialUpdateParams {
+ var ()
+ return &DcimRackRolesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesPartialUpdateParamsWithHTTPClient creates a new DcimRackRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimRackRolesPartialUpdateParams {
+ var ()
+ return &DcimRackRolesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack roles partial update operation typically these are written to a http.Request
+*/
+type DcimRackRolesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.RackRole
+ /*ID
+ A unique integer value identifying this rack role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimRackRolesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) WithContext(ctx context.Context) *DcimRackRolesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimRackRolesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) WithData(data *models.RackRole) *DcimRackRolesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) SetData(data *models.RackRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) WithID(id int64) *DcimRackRolesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack roles partial update params
+func (o *DcimRackRolesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go
new file mode 100644
index 0000000..e18388a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackRolesPartialUpdateReader is a Reader for the DcimRackRolesPartialUpdate structure.
+type DcimRackRolesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackRolesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesPartialUpdateOK creates a DcimRackRolesPartialUpdateOK with default headers values
+func NewDcimRackRolesPartialUpdateOK() *DcimRackRolesPartialUpdateOK {
+ return &DcimRackRolesPartialUpdateOK{}
+}
+
+/*DcimRackRolesPartialUpdateOK handles this case with default header values.
+
+DcimRackRolesPartialUpdateOK dcim rack roles partial update o k
+*/
+type DcimRackRolesPartialUpdateOK struct {
+ Payload *models.RackRole
+}
+
+func (o *DcimRackRolesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/rack-roles/{id}/][%d] dcimRackRolesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_parameters.go
new file mode 100644
index 0000000..1a49f3f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRackRolesReadParams creates a new DcimRackRolesReadParams object
+// with the default values initialized.
+func NewDcimRackRolesReadParams() *DcimRackRolesReadParams {
+ var ()
+ return &DcimRackRolesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesReadParamsWithTimeout creates a new DcimRackRolesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesReadParamsWithTimeout(timeout time.Duration) *DcimRackRolesReadParams {
+ var ()
+ return &DcimRackRolesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesReadParamsWithContext creates a new DcimRackRolesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesReadParamsWithContext(ctx context.Context) *DcimRackRolesReadParams {
+ var ()
+ return &DcimRackRolesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesReadParamsWithHTTPClient creates a new DcimRackRolesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesReadParamsWithHTTPClient(client *http.Client) *DcimRackRolesReadParams {
+ var ()
+ return &DcimRackRolesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesReadParams contains all the parameters to send to the API endpoint
+for the dcim rack roles read operation typically these are written to a http.Request
+*/
+type DcimRackRolesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this rack role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) WithTimeout(timeout time.Duration) *DcimRackRolesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) WithContext(ctx context.Context) *DcimRackRolesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) WithHTTPClient(client *http.Client) *DcimRackRolesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) WithID(id int64) *DcimRackRolesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack roles read params
+func (o *DcimRackRolesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go
new file mode 100644
index 0000000..a2ed230
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackRolesReadReader is a Reader for the DcimRackRolesRead structure.
+type DcimRackRolesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackRolesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesReadOK creates a DcimRackRolesReadOK with default headers values
+func NewDcimRackRolesReadOK() *DcimRackRolesReadOK {
+ return &DcimRackRolesReadOK{}
+}
+
+/*DcimRackRolesReadOK handles this case with default header values.
+
+DcimRackRolesReadOK dcim rack roles read o k
+*/
+type DcimRackRolesReadOK struct {
+ Payload *models.RackRole
+}
+
+func (o *DcimRackRolesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/rack-roles/{id}/][%d] dcimRackRolesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_parameters.go
new file mode 100644
index 0000000..5ac177d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRackRolesUpdateParams creates a new DcimRackRolesUpdateParams object
+// with the default values initialized.
+func NewDcimRackRolesUpdateParams() *DcimRackRolesUpdateParams {
+ var ()
+ return &DcimRackRolesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRackRolesUpdateParamsWithTimeout creates a new DcimRackRolesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRackRolesUpdateParamsWithTimeout(timeout time.Duration) *DcimRackRolesUpdateParams {
+ var ()
+ return &DcimRackRolesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRackRolesUpdateParamsWithContext creates a new DcimRackRolesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRackRolesUpdateParamsWithContext(ctx context.Context) *DcimRackRolesUpdateParams {
+ var ()
+ return &DcimRackRolesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRackRolesUpdateParamsWithHTTPClient creates a new DcimRackRolesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRackRolesUpdateParamsWithHTTPClient(client *http.Client) *DcimRackRolesUpdateParams {
+ var ()
+ return &DcimRackRolesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRackRolesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim rack roles update operation typically these are written to a http.Request
+*/
+type DcimRackRolesUpdateParams struct {
+
+ /*Data*/
+ Data *models.RackRole
+ /*ID
+ A unique integer value identifying this rack role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) WithTimeout(timeout time.Duration) *DcimRackRolesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) WithContext(ctx context.Context) *DcimRackRolesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) WithHTTPClient(client *http.Client) *DcimRackRolesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) WithData(data *models.RackRole) *DcimRackRolesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) SetData(data *models.RackRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) WithID(id int64) *DcimRackRolesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim rack roles update params
+func (o *DcimRackRolesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRackRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go
new file mode 100644
index 0000000..9d0c94f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRackRolesUpdateReader is a Reader for the DcimRackRolesUpdate structure.
+type DcimRackRolesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRackRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRackRolesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRackRolesUpdateOK creates a DcimRackRolesUpdateOK with default headers values
+func NewDcimRackRolesUpdateOK() *DcimRackRolesUpdateOK {
+ return &DcimRackRolesUpdateOK{}
+}
+
+/*DcimRackRolesUpdateOK handles this case with default header values.
+
+DcimRackRolesUpdateOK dcim rack roles update o k
+*/
+type DcimRackRolesUpdateOK struct {
+ Payload *models.RackRole
+}
+
+func (o *DcimRackRolesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/rack-roles/{id}/][%d] dcimRackRolesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRackRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RackRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_parameters.go
new file mode 100644
index 0000000..a319020
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRacksCreateParams creates a new DcimRacksCreateParams object
+// with the default values initialized.
+func NewDcimRacksCreateParams() *DcimRacksCreateParams {
+ var ()
+ return &DcimRacksCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksCreateParamsWithTimeout creates a new DcimRacksCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksCreateParamsWithTimeout(timeout time.Duration) *DcimRacksCreateParams {
+ var ()
+ return &DcimRacksCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksCreateParamsWithContext creates a new DcimRacksCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksCreateParamsWithContext(ctx context.Context) *DcimRacksCreateParams {
+ var ()
+ return &DcimRacksCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksCreateParamsWithHTTPClient creates a new DcimRacksCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksCreateParamsWithHTTPClient(client *http.Client) *DcimRacksCreateParams {
+ var ()
+ return &DcimRacksCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksCreateParams contains all the parameters to send to the API endpoint
+for the dcim racks create operation typically these are written to a http.Request
+*/
+type DcimRacksCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableRack
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks create params
+func (o *DcimRacksCreateParams) WithTimeout(timeout time.Duration) *DcimRacksCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks create params
+func (o *DcimRacksCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks create params
+func (o *DcimRacksCreateParams) WithContext(ctx context.Context) *DcimRacksCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks create params
+func (o *DcimRacksCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks create params
+func (o *DcimRacksCreateParams) WithHTTPClient(client *http.Client) *DcimRacksCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks create params
+func (o *DcimRacksCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim racks create params
+func (o *DcimRacksCreateParams) WithData(data *models.WritableRack) *DcimRacksCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim racks create params
+func (o *DcimRacksCreateParams) SetData(data *models.WritableRack) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go
new file mode 100644
index 0000000..cde955f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksCreateReader is a Reader for the DcimRacksCreate structure.
+type DcimRacksCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimRacksCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksCreateCreated creates a DcimRacksCreateCreated with default headers values
+func NewDcimRacksCreateCreated() *DcimRacksCreateCreated {
+ return &DcimRacksCreateCreated{}
+}
+
+/*DcimRacksCreateCreated handles this case with default header values.
+
+DcimRacksCreateCreated dcim racks create created
+*/
+type DcimRacksCreateCreated struct {
+ Payload *models.WritableRack
+}
+
+func (o *DcimRacksCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/racks/][%d] dcimRacksCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimRacksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRack)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_parameters.go
new file mode 100644
index 0000000..d91063e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRacksDeleteParams creates a new DcimRacksDeleteParams object
+// with the default values initialized.
+func NewDcimRacksDeleteParams() *DcimRacksDeleteParams {
+ var ()
+ return &DcimRacksDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksDeleteParamsWithTimeout creates a new DcimRacksDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksDeleteParamsWithTimeout(timeout time.Duration) *DcimRacksDeleteParams {
+ var ()
+ return &DcimRacksDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksDeleteParamsWithContext creates a new DcimRacksDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksDeleteParamsWithContext(ctx context.Context) *DcimRacksDeleteParams {
+ var ()
+ return &DcimRacksDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksDeleteParamsWithHTTPClient creates a new DcimRacksDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksDeleteParamsWithHTTPClient(client *http.Client) *DcimRacksDeleteParams {
+ var ()
+ return &DcimRacksDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksDeleteParams contains all the parameters to send to the API endpoint
+for the dcim racks delete operation typically these are written to a http.Request
+*/
+type DcimRacksDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this rack.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks delete params
+func (o *DcimRacksDeleteParams) WithTimeout(timeout time.Duration) *DcimRacksDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks delete params
+func (o *DcimRacksDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks delete params
+func (o *DcimRacksDeleteParams) WithContext(ctx context.Context) *DcimRacksDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks delete params
+func (o *DcimRacksDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks delete params
+func (o *DcimRacksDeleteParams) WithHTTPClient(client *http.Client) *DcimRacksDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks delete params
+func (o *DcimRacksDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim racks delete params
+func (o *DcimRacksDeleteParams) WithID(id int64) *DcimRacksDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim racks delete params
+func (o *DcimRacksDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go
new file mode 100644
index 0000000..29e1d80
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimRacksDeleteReader is a Reader for the DcimRacksDelete structure.
+type DcimRacksDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimRacksDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksDeleteNoContent creates a DcimRacksDeleteNoContent with default headers values
+func NewDcimRacksDeleteNoContent() *DcimRacksDeleteNoContent {
+ return &DcimRacksDeleteNoContent{}
+}
+
+/*DcimRacksDeleteNoContent handles this case with default header values.
+
+DcimRacksDeleteNoContent dcim racks delete no content
+*/
+type DcimRacksDeleteNoContent struct {
+}
+
+func (o *DcimRacksDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/racks/{id}/][%d] dcimRacksDeleteNoContent ", 204)
+}
+
+func (o *DcimRacksDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_parameters.go
new file mode 100644
index 0000000..c28c053
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_parameters.go
@@ -0,0 +1,691 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRacksListParams creates a new DcimRacksListParams object
+// with the default values initialized.
+func NewDcimRacksListParams() *DcimRacksListParams {
+ var ()
+ return &DcimRacksListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksListParamsWithTimeout creates a new DcimRacksListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksListParamsWithTimeout(timeout time.Duration) *DcimRacksListParams {
+ var ()
+ return &DcimRacksListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksListParamsWithContext creates a new DcimRacksListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksListParamsWithContext(ctx context.Context) *DcimRacksListParams {
+ var ()
+ return &DcimRacksListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksListParamsWithHTTPClient creates a new DcimRacksListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksListParamsWithHTTPClient(client *http.Client) *DcimRacksListParams {
+ var ()
+ return &DcimRacksListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksListParams contains all the parameters to send to the API endpoint
+for the dcim racks list operation typically these are written to a http.Request
+*/
+type DcimRacksListParams struct {
+
+ /*DescUnits*/
+ DescUnits *string
+ /*FacilityID*/
+ FacilityID *string
+ /*Group*/
+ Group *string
+ /*GroupID*/
+ GroupID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+ /*Serial*/
+ Serial *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*Type*/
+ Type *string
+ /*UHeight*/
+ UHeight *float64
+ /*Width*/
+ Width *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks list params
+func (o *DcimRacksListParams) WithTimeout(timeout time.Duration) *DcimRacksListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks list params
+func (o *DcimRacksListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks list params
+func (o *DcimRacksListParams) WithContext(ctx context.Context) *DcimRacksListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks list params
+func (o *DcimRacksListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks list params
+func (o *DcimRacksListParams) WithHTTPClient(client *http.Client) *DcimRacksListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks list params
+func (o *DcimRacksListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDescUnits adds the descUnits to the dcim racks list params
+func (o *DcimRacksListParams) WithDescUnits(descUnits *string) *DcimRacksListParams {
+ o.SetDescUnits(descUnits)
+ return o
+}
+
+// SetDescUnits adds the descUnits to the dcim racks list params
+func (o *DcimRacksListParams) SetDescUnits(descUnits *string) {
+ o.DescUnits = descUnits
+}
+
+// WithFacilityID adds the facilityID to the dcim racks list params
+func (o *DcimRacksListParams) WithFacilityID(facilityID *string) *DcimRacksListParams {
+ o.SetFacilityID(facilityID)
+ return o
+}
+
+// SetFacilityID adds the facilityId to the dcim racks list params
+func (o *DcimRacksListParams) SetFacilityID(facilityID *string) {
+ o.FacilityID = facilityID
+}
+
+// WithGroup adds the group to the dcim racks list params
+func (o *DcimRacksListParams) WithGroup(group *string) *DcimRacksListParams {
+ o.SetGroup(group)
+ return o
+}
+
+// SetGroup adds the group to the dcim racks list params
+func (o *DcimRacksListParams) SetGroup(group *string) {
+ o.Group = group
+}
+
+// WithGroupID adds the groupID to the dcim racks list params
+func (o *DcimRacksListParams) WithGroupID(groupID *string) *DcimRacksListParams {
+ o.SetGroupID(groupID)
+ return o
+}
+
+// SetGroupID adds the groupId to the dcim racks list params
+func (o *DcimRacksListParams) SetGroupID(groupID *string) {
+ o.GroupID = groupID
+}
+
+// WithIDIn adds the iDIn to the dcim racks list params
+func (o *DcimRacksListParams) WithIDIn(iDIn *string) *DcimRacksListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the dcim racks list params
+func (o *DcimRacksListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the dcim racks list params
+func (o *DcimRacksListParams) WithLimit(limit *int64) *DcimRacksListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim racks list params
+func (o *DcimRacksListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim racks list params
+func (o *DcimRacksListParams) WithName(name *string) *DcimRacksListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim racks list params
+func (o *DcimRacksListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim racks list params
+func (o *DcimRacksListParams) WithOffset(offset *int64) *DcimRacksListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim racks list params
+func (o *DcimRacksListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the dcim racks list params
+func (o *DcimRacksListParams) WithQ(q *string) *DcimRacksListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim racks list params
+func (o *DcimRacksListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the dcim racks list params
+func (o *DcimRacksListParams) WithRole(role *string) *DcimRacksListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the dcim racks list params
+func (o *DcimRacksListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the dcim racks list params
+func (o *DcimRacksListParams) WithRoleID(roleID *string) *DcimRacksListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the dcim racks list params
+func (o *DcimRacksListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WithSerial adds the serial to the dcim racks list params
+func (o *DcimRacksListParams) WithSerial(serial *string) *DcimRacksListParams {
+ o.SetSerial(serial)
+ return o
+}
+
+// SetSerial adds the serial to the dcim racks list params
+func (o *DcimRacksListParams) SetSerial(serial *string) {
+ o.Serial = serial
+}
+
+// WithSite adds the site to the dcim racks list params
+func (o *DcimRacksListParams) WithSite(site *string) *DcimRacksListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the dcim racks list params
+func (o *DcimRacksListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the dcim racks list params
+func (o *DcimRacksListParams) WithSiteID(siteID *string) *DcimRacksListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the dcim racks list params
+func (o *DcimRacksListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithTenant adds the tenant to the dcim racks list params
+func (o *DcimRacksListParams) WithTenant(tenant *string) *DcimRacksListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the dcim racks list params
+func (o *DcimRacksListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the dcim racks list params
+func (o *DcimRacksListParams) WithTenantID(tenantID *string) *DcimRacksListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the dcim racks list params
+func (o *DcimRacksListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithType adds the typeVar to the dcim racks list params
+func (o *DcimRacksListParams) WithType(typeVar *string) *DcimRacksListParams {
+ o.SetType(typeVar)
+ return o
+}
+
+// SetType adds the type to the dcim racks list params
+func (o *DcimRacksListParams) SetType(typeVar *string) {
+ o.Type = typeVar
+}
+
+// WithUHeight adds the uHeight to the dcim racks list params
+func (o *DcimRacksListParams) WithUHeight(uHeight *float64) *DcimRacksListParams {
+ o.SetUHeight(uHeight)
+ return o
+}
+
+// SetUHeight adds the uHeight to the dcim racks list params
+func (o *DcimRacksListParams) SetUHeight(uHeight *float64) {
+ o.UHeight = uHeight
+}
+
+// WithWidth adds the width to the dcim racks list params
+func (o *DcimRacksListParams) WithWidth(width *string) *DcimRacksListParams {
+ o.SetWidth(width)
+ return o
+}
+
+// SetWidth adds the width to the dcim racks list params
+func (o *DcimRacksListParams) SetWidth(width *string) {
+ o.Width = width
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DescUnits != nil {
+
+ // query param desc_units
+ var qrDescUnits string
+ if o.DescUnits != nil {
+ qrDescUnits = *o.DescUnits
+ }
+ qDescUnits := qrDescUnits
+ if qDescUnits != "" {
+ if err := r.SetQueryParam("desc_units", qDescUnits); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.FacilityID != nil {
+
+ // query param facility_id
+ var qrFacilityID string
+ if o.FacilityID != nil {
+ qrFacilityID = *o.FacilityID
+ }
+ qFacilityID := qrFacilityID
+ if qFacilityID != "" {
+ if err := r.SetQueryParam("facility_id", qFacilityID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Group != nil {
+
+ // query param group
+ var qrGroup string
+ if o.Group != nil {
+ qrGroup = *o.Group
+ }
+ qGroup := qrGroup
+ if qGroup != "" {
+ if err := r.SetQueryParam("group", qGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.GroupID != nil {
+
+ // query param group_id
+ var qrGroupID string
+ if o.GroupID != nil {
+ qrGroupID = *o.GroupID
+ }
+ qGroupID := qrGroupID
+ if qGroupID != "" {
+ if err := r.SetQueryParam("group_id", qGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Serial != nil {
+
+ // query param serial
+ var qrSerial string
+ if o.Serial != nil {
+ qrSerial = *o.Serial
+ }
+ qSerial := qrSerial
+ if qSerial != "" {
+ if err := r.SetQueryParam("serial", qSerial); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Type != nil {
+
+ // query param type
+ var qrType string
+ if o.Type != nil {
+ qrType = *o.Type
+ }
+ qType := qrType
+ if qType != "" {
+ if err := r.SetQueryParam("type", qType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.UHeight != nil {
+
+ // query param u_height
+ var qrUHeight float64
+ if o.UHeight != nil {
+ qrUHeight = *o.UHeight
+ }
+ qUHeight := swag.FormatFloat64(qrUHeight)
+ if qUHeight != "" {
+ if err := r.SetQueryParam("u_height", qUHeight); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Width != nil {
+
+ // query param width
+ var qrWidth string
+ if o.Width != nil {
+ qrWidth = *o.Width
+ }
+ qWidth := qrWidth
+ if qWidth != "" {
+ if err := r.SetQueryParam("width", qWidth); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go
new file mode 100644
index 0000000..a430743
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksListReader is a Reader for the DcimRacksList structure.
+type DcimRacksListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRacksListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksListOK creates a DcimRacksListOK with default headers values
+func NewDcimRacksListOK() *DcimRacksListOK {
+ return &DcimRacksListOK{}
+}
+
+/*DcimRacksListOK handles this case with default header values.
+
+DcimRacksListOK dcim racks list o k
+*/
+type DcimRacksListOK struct {
+ Payload *models.DcimRacksListOKBody
+}
+
+func (o *DcimRacksListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/racks/][%d] dcimRacksListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRacksListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimRacksListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_parameters.go
new file mode 100644
index 0000000..34da3d9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRacksPartialUpdateParams creates a new DcimRacksPartialUpdateParams object
+// with the default values initialized.
+func NewDcimRacksPartialUpdateParams() *DcimRacksPartialUpdateParams {
+ var ()
+ return &DcimRacksPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksPartialUpdateParamsWithTimeout creates a new DcimRacksPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimRacksPartialUpdateParams {
+ var ()
+ return &DcimRacksPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksPartialUpdateParamsWithContext creates a new DcimRacksPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksPartialUpdateParamsWithContext(ctx context.Context) *DcimRacksPartialUpdateParams {
+ var ()
+ return &DcimRacksPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksPartialUpdateParamsWithHTTPClient creates a new DcimRacksPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimRacksPartialUpdateParams {
+ var ()
+ return &DcimRacksPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim racks partial update operation typically these are written to a http.Request
+*/
+type DcimRacksPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRack
+ /*ID
+ A unique integer value identifying this rack.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimRacksPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) WithContext(ctx context.Context) *DcimRacksPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimRacksPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) WithData(data *models.WritableRack) *DcimRacksPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) SetData(data *models.WritableRack) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) WithID(id int64) *DcimRacksPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim racks partial update params
+func (o *DcimRacksPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go
new file mode 100644
index 0000000..ae7e1e3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksPartialUpdateReader is a Reader for the DcimRacksPartialUpdate structure.
+type DcimRacksPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRacksPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksPartialUpdateOK creates a DcimRacksPartialUpdateOK with default headers values
+func NewDcimRacksPartialUpdateOK() *DcimRacksPartialUpdateOK {
+ return &DcimRacksPartialUpdateOK{}
+}
+
+/*DcimRacksPartialUpdateOK handles this case with default header values.
+
+DcimRacksPartialUpdateOK dcim racks partial update o k
+*/
+type DcimRacksPartialUpdateOK struct {
+ Payload *models.WritableRack
+}
+
+func (o *DcimRacksPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/racks/{id}/][%d] dcimRacksPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRacksPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRack)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_parameters.go
new file mode 100644
index 0000000..e112d47
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRacksReadParams creates a new DcimRacksReadParams object
+// with the default values initialized.
+func NewDcimRacksReadParams() *DcimRacksReadParams {
+ var ()
+ return &DcimRacksReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksReadParamsWithTimeout creates a new DcimRacksReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksReadParamsWithTimeout(timeout time.Duration) *DcimRacksReadParams {
+ var ()
+ return &DcimRacksReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksReadParamsWithContext creates a new DcimRacksReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksReadParamsWithContext(ctx context.Context) *DcimRacksReadParams {
+ var ()
+ return &DcimRacksReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksReadParamsWithHTTPClient creates a new DcimRacksReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksReadParamsWithHTTPClient(client *http.Client) *DcimRacksReadParams {
+ var ()
+ return &DcimRacksReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksReadParams contains all the parameters to send to the API endpoint
+for the dcim racks read operation typically these are written to a http.Request
+*/
+type DcimRacksReadParams struct {
+
+ /*ID
+ A unique integer value identifying this rack.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks read params
+func (o *DcimRacksReadParams) WithTimeout(timeout time.Duration) *DcimRacksReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks read params
+func (o *DcimRacksReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks read params
+func (o *DcimRacksReadParams) WithContext(ctx context.Context) *DcimRacksReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks read params
+func (o *DcimRacksReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks read params
+func (o *DcimRacksReadParams) WithHTTPClient(client *http.Client) *DcimRacksReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks read params
+func (o *DcimRacksReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim racks read params
+func (o *DcimRacksReadParams) WithID(id int64) *DcimRacksReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim racks read params
+func (o *DcimRacksReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go
new file mode 100644
index 0000000..dc6d3a1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksReadReader is a Reader for the DcimRacksRead structure.
+type DcimRacksReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRacksReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksReadOK creates a DcimRacksReadOK with default headers values
+func NewDcimRacksReadOK() *DcimRacksReadOK {
+ return &DcimRacksReadOK{}
+}
+
+/*DcimRacksReadOK handles this case with default header values.
+
+DcimRacksReadOK dcim racks read o k
+*/
+type DcimRacksReadOK struct {
+ Payload *models.Rack
+}
+
+func (o *DcimRacksReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/racks/{id}/][%d] dcimRacksReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRacksReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Rack)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_parameters.go
new file mode 100644
index 0000000..19d8b25
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRacksUnitsParams creates a new DcimRacksUnitsParams object
+// with the default values initialized.
+func NewDcimRacksUnitsParams() *DcimRacksUnitsParams {
+ var ()
+ return &DcimRacksUnitsParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksUnitsParamsWithTimeout creates a new DcimRacksUnitsParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksUnitsParamsWithTimeout(timeout time.Duration) *DcimRacksUnitsParams {
+ var ()
+ return &DcimRacksUnitsParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksUnitsParamsWithContext creates a new DcimRacksUnitsParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksUnitsParamsWithContext(ctx context.Context) *DcimRacksUnitsParams {
+ var ()
+ return &DcimRacksUnitsParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksUnitsParamsWithHTTPClient creates a new DcimRacksUnitsParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksUnitsParamsWithHTTPClient(client *http.Client) *DcimRacksUnitsParams {
+ var ()
+ return &DcimRacksUnitsParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksUnitsParams contains all the parameters to send to the API endpoint
+for the dcim racks units operation typically these are written to a http.Request
+*/
+type DcimRacksUnitsParams struct {
+
+ /*ID
+ A unique integer value identifying this rack.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks units params
+func (o *DcimRacksUnitsParams) WithTimeout(timeout time.Duration) *DcimRacksUnitsParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks units params
+func (o *DcimRacksUnitsParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks units params
+func (o *DcimRacksUnitsParams) WithContext(ctx context.Context) *DcimRacksUnitsParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks units params
+func (o *DcimRacksUnitsParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks units params
+func (o *DcimRacksUnitsParams) WithHTTPClient(client *http.Client) *DcimRacksUnitsParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks units params
+func (o *DcimRacksUnitsParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim racks units params
+func (o *DcimRacksUnitsParams) WithID(id int64) *DcimRacksUnitsParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim racks units params
+func (o *DcimRacksUnitsParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksUnitsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_responses.go
new file mode 100644
index 0000000..c259e7a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_units_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksUnitsReader is a Reader for the DcimRacksUnits structure.
+type DcimRacksUnitsReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksUnitsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRacksUnitsOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksUnitsOK creates a DcimRacksUnitsOK with default headers values
+func NewDcimRacksUnitsOK() *DcimRacksUnitsOK {
+ return &DcimRacksUnitsOK{}
+}
+
+/*DcimRacksUnitsOK handles this case with default header values.
+
+DcimRacksUnitsOK dcim racks units o k
+*/
+type DcimRacksUnitsOK struct {
+ Payload *models.Rack
+}
+
+func (o *DcimRacksUnitsOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/racks/{id}/units/][%d] dcimRacksUnitsOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRacksUnitsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Rack)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_parameters.go
new file mode 100644
index 0000000..f9c8225
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRacksUpdateParams creates a new DcimRacksUpdateParams object
+// with the default values initialized.
+func NewDcimRacksUpdateParams() *DcimRacksUpdateParams {
+ var ()
+ return &DcimRacksUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRacksUpdateParamsWithTimeout creates a new DcimRacksUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRacksUpdateParamsWithTimeout(timeout time.Duration) *DcimRacksUpdateParams {
+ var ()
+ return &DcimRacksUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRacksUpdateParamsWithContext creates a new DcimRacksUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRacksUpdateParamsWithContext(ctx context.Context) *DcimRacksUpdateParams {
+ var ()
+ return &DcimRacksUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRacksUpdateParamsWithHTTPClient creates a new DcimRacksUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRacksUpdateParamsWithHTTPClient(client *http.Client) *DcimRacksUpdateParams {
+ var ()
+ return &DcimRacksUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRacksUpdateParams contains all the parameters to send to the API endpoint
+for the dcim racks update operation typically these are written to a http.Request
+*/
+type DcimRacksUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRack
+ /*ID
+ A unique integer value identifying this rack.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim racks update params
+func (o *DcimRacksUpdateParams) WithTimeout(timeout time.Duration) *DcimRacksUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim racks update params
+func (o *DcimRacksUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim racks update params
+func (o *DcimRacksUpdateParams) WithContext(ctx context.Context) *DcimRacksUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim racks update params
+func (o *DcimRacksUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim racks update params
+func (o *DcimRacksUpdateParams) WithHTTPClient(client *http.Client) *DcimRacksUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim racks update params
+func (o *DcimRacksUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim racks update params
+func (o *DcimRacksUpdateParams) WithData(data *models.WritableRack) *DcimRacksUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim racks update params
+func (o *DcimRacksUpdateParams) SetData(data *models.WritableRack) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim racks update params
+func (o *DcimRacksUpdateParams) WithID(id int64) *DcimRacksUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim racks update params
+func (o *DcimRacksUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRacksUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go
new file mode 100644
index 0000000..92f1eba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRacksUpdateReader is a Reader for the DcimRacksUpdate structure.
+type DcimRacksUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRacksUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRacksUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRacksUpdateOK creates a DcimRacksUpdateOK with default headers values
+func NewDcimRacksUpdateOK() *DcimRacksUpdateOK {
+ return &DcimRacksUpdateOK{}
+}
+
+/*DcimRacksUpdateOK handles this case with default header values.
+
+DcimRacksUpdateOK dcim racks update o k
+*/
+type DcimRacksUpdateOK struct {
+ Payload *models.WritableRack
+}
+
+func (o *DcimRacksUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/racks/{id}/][%d] dcimRacksUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRacksUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRack)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_parameters.go
new file mode 100644
index 0000000..e92d2bc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRegionsCreateParams creates a new DcimRegionsCreateParams object
+// with the default values initialized.
+func NewDcimRegionsCreateParams() *DcimRegionsCreateParams {
+ var ()
+ return &DcimRegionsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsCreateParamsWithTimeout creates a new DcimRegionsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsCreateParamsWithTimeout(timeout time.Duration) *DcimRegionsCreateParams {
+ var ()
+ return &DcimRegionsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsCreateParamsWithContext creates a new DcimRegionsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsCreateParamsWithContext(ctx context.Context) *DcimRegionsCreateParams {
+ var ()
+ return &DcimRegionsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsCreateParamsWithHTTPClient creates a new DcimRegionsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsCreateParamsWithHTTPClient(client *http.Client) *DcimRegionsCreateParams {
+ var ()
+ return &DcimRegionsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsCreateParams contains all the parameters to send to the API endpoint
+for the dcim regions create operation typically these are written to a http.Request
+*/
+type DcimRegionsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableRegion
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions create params
+func (o *DcimRegionsCreateParams) WithTimeout(timeout time.Duration) *DcimRegionsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions create params
+func (o *DcimRegionsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions create params
+func (o *DcimRegionsCreateParams) WithContext(ctx context.Context) *DcimRegionsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions create params
+func (o *DcimRegionsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions create params
+func (o *DcimRegionsCreateParams) WithHTTPClient(client *http.Client) *DcimRegionsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions create params
+func (o *DcimRegionsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim regions create params
+func (o *DcimRegionsCreateParams) WithData(data *models.WritableRegion) *DcimRegionsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim regions create params
+func (o *DcimRegionsCreateParams) SetData(data *models.WritableRegion) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go
new file mode 100644
index 0000000..b9e91f6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRegionsCreateReader is a Reader for the DcimRegionsCreate structure.
+type DcimRegionsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimRegionsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsCreateCreated creates a DcimRegionsCreateCreated with default headers values
+func NewDcimRegionsCreateCreated() *DcimRegionsCreateCreated {
+ return &DcimRegionsCreateCreated{}
+}
+
+/*DcimRegionsCreateCreated handles this case with default header values.
+
+DcimRegionsCreateCreated dcim regions create created
+*/
+type DcimRegionsCreateCreated struct {
+ Payload *models.WritableRegion
+}
+
+func (o *DcimRegionsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/regions/][%d] dcimRegionsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimRegionsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRegion)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_parameters.go
new file mode 100644
index 0000000..001cd00
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRegionsDeleteParams creates a new DcimRegionsDeleteParams object
+// with the default values initialized.
+func NewDcimRegionsDeleteParams() *DcimRegionsDeleteParams {
+ var ()
+ return &DcimRegionsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsDeleteParamsWithTimeout creates a new DcimRegionsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsDeleteParamsWithTimeout(timeout time.Duration) *DcimRegionsDeleteParams {
+ var ()
+ return &DcimRegionsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsDeleteParamsWithContext creates a new DcimRegionsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsDeleteParamsWithContext(ctx context.Context) *DcimRegionsDeleteParams {
+ var ()
+ return &DcimRegionsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsDeleteParamsWithHTTPClient creates a new DcimRegionsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsDeleteParamsWithHTTPClient(client *http.Client) *DcimRegionsDeleteParams {
+ var ()
+ return &DcimRegionsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsDeleteParams contains all the parameters to send to the API endpoint
+for the dcim regions delete operation typically these are written to a http.Request
+*/
+type DcimRegionsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this region.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) WithTimeout(timeout time.Duration) *DcimRegionsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) WithContext(ctx context.Context) *DcimRegionsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) WithHTTPClient(client *http.Client) *DcimRegionsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) WithID(id int64) *DcimRegionsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim regions delete params
+func (o *DcimRegionsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go
new file mode 100644
index 0000000..e69b706
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimRegionsDeleteReader is a Reader for the DcimRegionsDelete structure.
+type DcimRegionsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimRegionsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsDeleteNoContent creates a DcimRegionsDeleteNoContent with default headers values
+func NewDcimRegionsDeleteNoContent() *DcimRegionsDeleteNoContent {
+ return &DcimRegionsDeleteNoContent{}
+}
+
+/*DcimRegionsDeleteNoContent handles this case with default header values.
+
+DcimRegionsDeleteNoContent dcim regions delete no content
+*/
+type DcimRegionsDeleteNoContent struct {
+}
+
+func (o *DcimRegionsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/regions/{id}/][%d] dcimRegionsDeleteNoContent ", 204)
+}
+
+func (o *DcimRegionsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_parameters.go
new file mode 100644
index 0000000..af8bf62
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_parameters.go
@@ -0,0 +1,340 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRegionsListParams creates a new DcimRegionsListParams object
+// with the default values initialized.
+func NewDcimRegionsListParams() *DcimRegionsListParams {
+ var ()
+ return &DcimRegionsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsListParamsWithTimeout creates a new DcimRegionsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsListParamsWithTimeout(timeout time.Duration) *DcimRegionsListParams {
+ var ()
+ return &DcimRegionsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsListParamsWithContext creates a new DcimRegionsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsListParamsWithContext(ctx context.Context) *DcimRegionsListParams {
+ var ()
+ return &DcimRegionsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsListParamsWithHTTPClient creates a new DcimRegionsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsListParamsWithHTTPClient(client *http.Client) *DcimRegionsListParams {
+ var ()
+ return &DcimRegionsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsListParams contains all the parameters to send to the API endpoint
+for the dcim regions list operation typically these are written to a http.Request
+*/
+type DcimRegionsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Parent*/
+ Parent *string
+ /*ParentID*/
+ ParentID *string
+ /*Q*/
+ Q *string
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions list params
+func (o *DcimRegionsListParams) WithTimeout(timeout time.Duration) *DcimRegionsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions list params
+func (o *DcimRegionsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions list params
+func (o *DcimRegionsListParams) WithContext(ctx context.Context) *DcimRegionsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions list params
+func (o *DcimRegionsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions list params
+func (o *DcimRegionsListParams) WithHTTPClient(client *http.Client) *DcimRegionsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions list params
+func (o *DcimRegionsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the dcim regions list params
+func (o *DcimRegionsListParams) WithLimit(limit *int64) *DcimRegionsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim regions list params
+func (o *DcimRegionsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim regions list params
+func (o *DcimRegionsListParams) WithName(name *string) *DcimRegionsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim regions list params
+func (o *DcimRegionsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim regions list params
+func (o *DcimRegionsListParams) WithOffset(offset *int64) *DcimRegionsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim regions list params
+func (o *DcimRegionsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithParent adds the parent to the dcim regions list params
+func (o *DcimRegionsListParams) WithParent(parent *string) *DcimRegionsListParams {
+ o.SetParent(parent)
+ return o
+}
+
+// SetParent adds the parent to the dcim regions list params
+func (o *DcimRegionsListParams) SetParent(parent *string) {
+ o.Parent = parent
+}
+
+// WithParentID adds the parentID to the dcim regions list params
+func (o *DcimRegionsListParams) WithParentID(parentID *string) *DcimRegionsListParams {
+ o.SetParentID(parentID)
+ return o
+}
+
+// SetParentID adds the parentId to the dcim regions list params
+func (o *DcimRegionsListParams) SetParentID(parentID *string) {
+ o.ParentID = parentID
+}
+
+// WithQ adds the q to the dcim regions list params
+func (o *DcimRegionsListParams) WithQ(q *string) *DcimRegionsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim regions list params
+func (o *DcimRegionsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSlug adds the slug to the dcim regions list params
+func (o *DcimRegionsListParams) WithSlug(slug *string) *DcimRegionsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim regions list params
+func (o *DcimRegionsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Parent != nil {
+
+ // query param parent
+ var qrParent string
+ if o.Parent != nil {
+ qrParent = *o.Parent
+ }
+ qParent := qrParent
+ if qParent != "" {
+ if err := r.SetQueryParam("parent", qParent); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ParentID != nil {
+
+ // query param parent_id
+ var qrParentID string
+ if o.ParentID != nil {
+ qrParentID = *o.ParentID
+ }
+ qParentID := qrParentID
+ if qParentID != "" {
+ if err := r.SetQueryParam("parent_id", qParentID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go
new file mode 100644
index 0000000..c28c76c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRegionsListReader is a Reader for the DcimRegionsList structure.
+type DcimRegionsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRegionsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsListOK creates a DcimRegionsListOK with default headers values
+func NewDcimRegionsListOK() *DcimRegionsListOK {
+ return &DcimRegionsListOK{}
+}
+
+/*DcimRegionsListOK handles this case with default header values.
+
+DcimRegionsListOK dcim regions list o k
+*/
+type DcimRegionsListOK struct {
+ Payload *models.DcimRegionsListOKBody
+}
+
+func (o *DcimRegionsListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/regions/][%d] dcimRegionsListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRegionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimRegionsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_parameters.go
new file mode 100644
index 0000000..2746650
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRegionsPartialUpdateParams creates a new DcimRegionsPartialUpdateParams object
+// with the default values initialized.
+func NewDcimRegionsPartialUpdateParams() *DcimRegionsPartialUpdateParams {
+ var ()
+ return &DcimRegionsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsPartialUpdateParamsWithTimeout creates a new DcimRegionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimRegionsPartialUpdateParams {
+ var ()
+ return &DcimRegionsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsPartialUpdateParamsWithContext creates a new DcimRegionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsPartialUpdateParamsWithContext(ctx context.Context) *DcimRegionsPartialUpdateParams {
+ var ()
+ return &DcimRegionsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsPartialUpdateParamsWithHTTPClient creates a new DcimRegionsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimRegionsPartialUpdateParams {
+ var ()
+ return &DcimRegionsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim regions partial update operation typically these are written to a http.Request
+*/
+type DcimRegionsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRegion
+ /*ID
+ A unique integer value identifying this region.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimRegionsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) WithContext(ctx context.Context) *DcimRegionsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimRegionsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) WithData(data *models.WritableRegion) *DcimRegionsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) SetData(data *models.WritableRegion) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) WithID(id int64) *DcimRegionsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim regions partial update params
+func (o *DcimRegionsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go
new file mode 100644
index 0000000..fe2817d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRegionsPartialUpdateReader is a Reader for the DcimRegionsPartialUpdate structure.
+type DcimRegionsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRegionsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsPartialUpdateOK creates a DcimRegionsPartialUpdateOK with default headers values
+func NewDcimRegionsPartialUpdateOK() *DcimRegionsPartialUpdateOK {
+ return &DcimRegionsPartialUpdateOK{}
+}
+
+/*DcimRegionsPartialUpdateOK handles this case with default header values.
+
+DcimRegionsPartialUpdateOK dcim regions partial update o k
+*/
+type DcimRegionsPartialUpdateOK struct {
+ Payload *models.WritableRegion
+}
+
+func (o *DcimRegionsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/regions/{id}/][%d] dcimRegionsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRegionsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRegion)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_parameters.go
new file mode 100644
index 0000000..090efe6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimRegionsReadParams creates a new DcimRegionsReadParams object
+// with the default values initialized.
+func NewDcimRegionsReadParams() *DcimRegionsReadParams {
+ var ()
+ return &DcimRegionsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsReadParamsWithTimeout creates a new DcimRegionsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsReadParamsWithTimeout(timeout time.Duration) *DcimRegionsReadParams {
+ var ()
+ return &DcimRegionsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsReadParamsWithContext creates a new DcimRegionsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsReadParamsWithContext(ctx context.Context) *DcimRegionsReadParams {
+ var ()
+ return &DcimRegionsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsReadParamsWithHTTPClient creates a new DcimRegionsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsReadParamsWithHTTPClient(client *http.Client) *DcimRegionsReadParams {
+ var ()
+ return &DcimRegionsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsReadParams contains all the parameters to send to the API endpoint
+for the dcim regions read operation typically these are written to a http.Request
+*/
+type DcimRegionsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this region.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions read params
+func (o *DcimRegionsReadParams) WithTimeout(timeout time.Duration) *DcimRegionsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions read params
+func (o *DcimRegionsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions read params
+func (o *DcimRegionsReadParams) WithContext(ctx context.Context) *DcimRegionsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions read params
+func (o *DcimRegionsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions read params
+func (o *DcimRegionsReadParams) WithHTTPClient(client *http.Client) *DcimRegionsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions read params
+func (o *DcimRegionsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim regions read params
+func (o *DcimRegionsReadParams) WithID(id int64) *DcimRegionsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim regions read params
+func (o *DcimRegionsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go
new file mode 100644
index 0000000..48ef939
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRegionsReadReader is a Reader for the DcimRegionsRead structure.
+type DcimRegionsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRegionsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsReadOK creates a DcimRegionsReadOK with default headers values
+func NewDcimRegionsReadOK() *DcimRegionsReadOK {
+ return &DcimRegionsReadOK{}
+}
+
+/*DcimRegionsReadOK handles this case with default header values.
+
+DcimRegionsReadOK dcim regions read o k
+*/
+type DcimRegionsReadOK struct {
+ Payload *models.Region
+}
+
+func (o *DcimRegionsReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/regions/{id}/][%d] dcimRegionsReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRegionsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Region)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_parameters.go
new file mode 100644
index 0000000..18d5648
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimRegionsUpdateParams creates a new DcimRegionsUpdateParams object
+// with the default values initialized.
+func NewDcimRegionsUpdateParams() *DcimRegionsUpdateParams {
+ var ()
+ return &DcimRegionsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimRegionsUpdateParamsWithTimeout creates a new DcimRegionsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimRegionsUpdateParamsWithTimeout(timeout time.Duration) *DcimRegionsUpdateParams {
+ var ()
+ return &DcimRegionsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimRegionsUpdateParamsWithContext creates a new DcimRegionsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimRegionsUpdateParamsWithContext(ctx context.Context) *DcimRegionsUpdateParams {
+ var ()
+ return &DcimRegionsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimRegionsUpdateParamsWithHTTPClient creates a new DcimRegionsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimRegionsUpdateParamsWithHTTPClient(client *http.Client) *DcimRegionsUpdateParams {
+ var ()
+ return &DcimRegionsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimRegionsUpdateParams contains all the parameters to send to the API endpoint
+for the dcim regions update operation typically these are written to a http.Request
+*/
+type DcimRegionsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableRegion
+ /*ID
+ A unique integer value identifying this region.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim regions update params
+func (o *DcimRegionsUpdateParams) WithTimeout(timeout time.Duration) *DcimRegionsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim regions update params
+func (o *DcimRegionsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim regions update params
+func (o *DcimRegionsUpdateParams) WithContext(ctx context.Context) *DcimRegionsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim regions update params
+func (o *DcimRegionsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim regions update params
+func (o *DcimRegionsUpdateParams) WithHTTPClient(client *http.Client) *DcimRegionsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim regions update params
+func (o *DcimRegionsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim regions update params
+func (o *DcimRegionsUpdateParams) WithData(data *models.WritableRegion) *DcimRegionsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim regions update params
+func (o *DcimRegionsUpdateParams) SetData(data *models.WritableRegion) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim regions update params
+func (o *DcimRegionsUpdateParams) WithID(id int64) *DcimRegionsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim regions update params
+func (o *DcimRegionsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimRegionsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go
new file mode 100644
index 0000000..6c6f377
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimRegionsUpdateReader is a Reader for the DcimRegionsUpdate structure.
+type DcimRegionsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimRegionsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimRegionsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimRegionsUpdateOK creates a DcimRegionsUpdateOK with default headers values
+func NewDcimRegionsUpdateOK() *DcimRegionsUpdateOK {
+ return &DcimRegionsUpdateOK{}
+}
+
+/*DcimRegionsUpdateOK handles this case with default header values.
+
+DcimRegionsUpdateOK dcim regions update o k
+*/
+type DcimRegionsUpdateOK struct {
+ Payload *models.WritableRegion
+}
+
+func (o *DcimRegionsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/regions/{id}/][%d] dcimRegionsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimRegionsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableRegion)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_parameters.go
new file mode 100644
index 0000000..1af9f16
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimSitesCreateParams creates a new DcimSitesCreateParams object
+// with the default values initialized.
+func NewDcimSitesCreateParams() *DcimSitesCreateParams {
+ var ()
+ return &DcimSitesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesCreateParamsWithTimeout creates a new DcimSitesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesCreateParamsWithTimeout(timeout time.Duration) *DcimSitesCreateParams {
+ var ()
+ return &DcimSitesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesCreateParamsWithContext creates a new DcimSitesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesCreateParamsWithContext(ctx context.Context) *DcimSitesCreateParams {
+ var ()
+ return &DcimSitesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesCreateParamsWithHTTPClient creates a new DcimSitesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesCreateParamsWithHTTPClient(client *http.Client) *DcimSitesCreateParams {
+ var ()
+ return &DcimSitesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesCreateParams contains all the parameters to send to the API endpoint
+for the dcim sites create operation typically these are written to a http.Request
+*/
+type DcimSitesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableSite
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites create params
+func (o *DcimSitesCreateParams) WithTimeout(timeout time.Duration) *DcimSitesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites create params
+func (o *DcimSitesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites create params
+func (o *DcimSitesCreateParams) WithContext(ctx context.Context) *DcimSitesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites create params
+func (o *DcimSitesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites create params
+func (o *DcimSitesCreateParams) WithHTTPClient(client *http.Client) *DcimSitesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites create params
+func (o *DcimSitesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim sites create params
+func (o *DcimSitesCreateParams) WithData(data *models.WritableSite) *DcimSitesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim sites create params
+func (o *DcimSitesCreateParams) SetData(data *models.WritableSite) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go
new file mode 100644
index 0000000..9090ff9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesCreateReader is a Reader for the DcimSitesCreate structure.
+type DcimSitesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimSitesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesCreateCreated creates a DcimSitesCreateCreated with default headers values
+func NewDcimSitesCreateCreated() *DcimSitesCreateCreated {
+ return &DcimSitesCreateCreated{}
+}
+
+/*DcimSitesCreateCreated handles this case with default header values.
+
+DcimSitesCreateCreated dcim sites create created
+*/
+type DcimSitesCreateCreated struct {
+ Payload *models.WritableSite
+}
+
+func (o *DcimSitesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/sites/][%d] dcimSitesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimSitesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSite)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_parameters.go
new file mode 100644
index 0000000..a486741
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimSitesDeleteParams creates a new DcimSitesDeleteParams object
+// with the default values initialized.
+func NewDcimSitesDeleteParams() *DcimSitesDeleteParams {
+ var ()
+ return &DcimSitesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesDeleteParamsWithTimeout creates a new DcimSitesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesDeleteParamsWithTimeout(timeout time.Duration) *DcimSitesDeleteParams {
+ var ()
+ return &DcimSitesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesDeleteParamsWithContext creates a new DcimSitesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesDeleteParamsWithContext(ctx context.Context) *DcimSitesDeleteParams {
+ var ()
+ return &DcimSitesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesDeleteParamsWithHTTPClient creates a new DcimSitesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesDeleteParamsWithHTTPClient(client *http.Client) *DcimSitesDeleteParams {
+ var ()
+ return &DcimSitesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesDeleteParams contains all the parameters to send to the API endpoint
+for the dcim sites delete operation typically these are written to a http.Request
+*/
+type DcimSitesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this site.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites delete params
+func (o *DcimSitesDeleteParams) WithTimeout(timeout time.Duration) *DcimSitesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites delete params
+func (o *DcimSitesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites delete params
+func (o *DcimSitesDeleteParams) WithContext(ctx context.Context) *DcimSitesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites delete params
+func (o *DcimSitesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites delete params
+func (o *DcimSitesDeleteParams) WithHTTPClient(client *http.Client) *DcimSitesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites delete params
+func (o *DcimSitesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim sites delete params
+func (o *DcimSitesDeleteParams) WithID(id int64) *DcimSitesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim sites delete params
+func (o *DcimSitesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go
new file mode 100644
index 0000000..93c0bf9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimSitesDeleteReader is a Reader for the DcimSitesDelete structure.
+type DcimSitesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimSitesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesDeleteNoContent creates a DcimSitesDeleteNoContent with default headers values
+func NewDcimSitesDeleteNoContent() *DcimSitesDeleteNoContent {
+ return &DcimSitesDeleteNoContent{}
+}
+
+/*DcimSitesDeleteNoContent handles this case with default header values.
+
+DcimSitesDeleteNoContent dcim sites delete no content
+*/
+type DcimSitesDeleteNoContent struct {
+}
+
+func (o *DcimSitesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/sites/{id}/][%d] dcimSitesDeleteNoContent ", 204)
+}
+
+func (o *DcimSitesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_parameters.go
new file mode 100644
index 0000000..29f2590
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimSitesGraphsParams creates a new DcimSitesGraphsParams object
+// with the default values initialized.
+func NewDcimSitesGraphsParams() *DcimSitesGraphsParams {
+ var ()
+ return &DcimSitesGraphsParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesGraphsParamsWithTimeout creates a new DcimSitesGraphsParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesGraphsParamsWithTimeout(timeout time.Duration) *DcimSitesGraphsParams {
+ var ()
+ return &DcimSitesGraphsParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesGraphsParamsWithContext creates a new DcimSitesGraphsParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesGraphsParamsWithContext(ctx context.Context) *DcimSitesGraphsParams {
+ var ()
+ return &DcimSitesGraphsParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesGraphsParamsWithHTTPClient creates a new DcimSitesGraphsParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesGraphsParamsWithHTTPClient(client *http.Client) *DcimSitesGraphsParams {
+ var ()
+ return &DcimSitesGraphsParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesGraphsParams contains all the parameters to send to the API endpoint
+for the dcim sites graphs operation typically these are written to a http.Request
+*/
+type DcimSitesGraphsParams struct {
+
+ /*ID
+ A unique integer value identifying this site.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) WithTimeout(timeout time.Duration) *DcimSitesGraphsParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) WithContext(ctx context.Context) *DcimSitesGraphsParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) WithHTTPClient(client *http.Client) *DcimSitesGraphsParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) WithID(id int64) *DcimSitesGraphsParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim sites graphs params
+func (o *DcimSitesGraphsParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesGraphsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go
new file mode 100644
index 0000000..1120bcb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesGraphsReader is a Reader for the DcimSitesGraphs structure.
+type DcimSitesGraphsReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesGraphsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimSitesGraphsOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesGraphsOK creates a DcimSitesGraphsOK with default headers values
+func NewDcimSitesGraphsOK() *DcimSitesGraphsOK {
+ return &DcimSitesGraphsOK{}
+}
+
+/*DcimSitesGraphsOK handles this case with default header values.
+
+DcimSitesGraphsOK dcim sites graphs o k
+*/
+type DcimSitesGraphsOK struct {
+ Payload *models.Site
+}
+
+func (o *DcimSitesGraphsOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/sites/{id}/graphs/][%d] dcimSitesGraphsOK %+v", 200, o.Payload)
+}
+
+func (o *DcimSitesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Site)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_parameters.go
new file mode 100644
index 0000000..0257a56
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_parameters.go
@@ -0,0 +1,604 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimSitesListParams creates a new DcimSitesListParams object
+// with the default values initialized.
+func NewDcimSitesListParams() *DcimSitesListParams {
+ var ()
+ return &DcimSitesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesListParamsWithTimeout creates a new DcimSitesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesListParamsWithTimeout(timeout time.Duration) *DcimSitesListParams {
+ var ()
+ return &DcimSitesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesListParamsWithContext creates a new DcimSitesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesListParamsWithContext(ctx context.Context) *DcimSitesListParams {
+ var ()
+ return &DcimSitesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesListParamsWithHTTPClient creates a new DcimSitesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesListParamsWithHTTPClient(client *http.Client) *DcimSitesListParams {
+ var ()
+ return &DcimSitesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesListParams contains all the parameters to send to the API endpoint
+for the dcim sites list operation typically these are written to a http.Request
+*/
+type DcimSitesListParams struct {
+
+ /*Asn*/
+ Asn *float64
+ /*ContactEmail*/
+ ContactEmail *string
+ /*ContactName*/
+ ContactName *string
+ /*ContactPhone*/
+ ContactPhone *string
+ /*Facility*/
+ Facility *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Region*/
+ Region *string
+ /*RegionID*/
+ RegionID *string
+ /*Slug*/
+ Slug *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites list params
+func (o *DcimSitesListParams) WithTimeout(timeout time.Duration) *DcimSitesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites list params
+func (o *DcimSitesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites list params
+func (o *DcimSitesListParams) WithContext(ctx context.Context) *DcimSitesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites list params
+func (o *DcimSitesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites list params
+func (o *DcimSitesListParams) WithHTTPClient(client *http.Client) *DcimSitesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites list params
+func (o *DcimSitesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithAsn adds the asn to the dcim sites list params
+func (o *DcimSitesListParams) WithAsn(asn *float64) *DcimSitesListParams {
+ o.SetAsn(asn)
+ return o
+}
+
+// SetAsn adds the asn to the dcim sites list params
+func (o *DcimSitesListParams) SetAsn(asn *float64) {
+ o.Asn = asn
+}
+
+// WithContactEmail adds the contactEmail to the dcim sites list params
+func (o *DcimSitesListParams) WithContactEmail(contactEmail *string) *DcimSitesListParams {
+ o.SetContactEmail(contactEmail)
+ return o
+}
+
+// SetContactEmail adds the contactEmail to the dcim sites list params
+func (o *DcimSitesListParams) SetContactEmail(contactEmail *string) {
+ o.ContactEmail = contactEmail
+}
+
+// WithContactName adds the contactName to the dcim sites list params
+func (o *DcimSitesListParams) WithContactName(contactName *string) *DcimSitesListParams {
+ o.SetContactName(contactName)
+ return o
+}
+
+// SetContactName adds the contactName to the dcim sites list params
+func (o *DcimSitesListParams) SetContactName(contactName *string) {
+ o.ContactName = contactName
+}
+
+// WithContactPhone adds the contactPhone to the dcim sites list params
+func (o *DcimSitesListParams) WithContactPhone(contactPhone *string) *DcimSitesListParams {
+ o.SetContactPhone(contactPhone)
+ return o
+}
+
+// SetContactPhone adds the contactPhone to the dcim sites list params
+func (o *DcimSitesListParams) SetContactPhone(contactPhone *string) {
+ o.ContactPhone = contactPhone
+}
+
+// WithFacility adds the facility to the dcim sites list params
+func (o *DcimSitesListParams) WithFacility(facility *string) *DcimSitesListParams {
+ o.SetFacility(facility)
+ return o
+}
+
+// SetFacility adds the facility to the dcim sites list params
+func (o *DcimSitesListParams) SetFacility(facility *string) {
+ o.Facility = facility
+}
+
+// WithIDIn adds the iDIn to the dcim sites list params
+func (o *DcimSitesListParams) WithIDIn(iDIn *string) *DcimSitesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the dcim sites list params
+func (o *DcimSitesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the dcim sites list params
+func (o *DcimSitesListParams) WithLimit(limit *int64) *DcimSitesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim sites list params
+func (o *DcimSitesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the dcim sites list params
+func (o *DcimSitesListParams) WithName(name *string) *DcimSitesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the dcim sites list params
+func (o *DcimSitesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the dcim sites list params
+func (o *DcimSitesListParams) WithOffset(offset *int64) *DcimSitesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim sites list params
+func (o *DcimSitesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the dcim sites list params
+func (o *DcimSitesListParams) WithQ(q *string) *DcimSitesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the dcim sites list params
+func (o *DcimSitesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRegion adds the region to the dcim sites list params
+func (o *DcimSitesListParams) WithRegion(region *string) *DcimSitesListParams {
+ o.SetRegion(region)
+ return o
+}
+
+// SetRegion adds the region to the dcim sites list params
+func (o *DcimSitesListParams) SetRegion(region *string) {
+ o.Region = region
+}
+
+// WithRegionID adds the regionID to the dcim sites list params
+func (o *DcimSitesListParams) WithRegionID(regionID *string) *DcimSitesListParams {
+ o.SetRegionID(regionID)
+ return o
+}
+
+// SetRegionID adds the regionId to the dcim sites list params
+func (o *DcimSitesListParams) SetRegionID(regionID *string) {
+ o.RegionID = regionID
+}
+
+// WithSlug adds the slug to the dcim sites list params
+func (o *DcimSitesListParams) WithSlug(slug *string) *DcimSitesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the dcim sites list params
+func (o *DcimSitesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WithStatus adds the status to the dcim sites list params
+func (o *DcimSitesListParams) WithStatus(status *string) *DcimSitesListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the dcim sites list params
+func (o *DcimSitesListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the dcim sites list params
+func (o *DcimSitesListParams) WithTenant(tenant *string) *DcimSitesListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the dcim sites list params
+func (o *DcimSitesListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the dcim sites list params
+func (o *DcimSitesListParams) WithTenantID(tenantID *string) *DcimSitesListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the dcim sites list params
+func (o *DcimSitesListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Asn != nil {
+
+ // query param asn
+ var qrAsn float64
+ if o.Asn != nil {
+ qrAsn = *o.Asn
+ }
+ qAsn := swag.FormatFloat64(qrAsn)
+ if qAsn != "" {
+ if err := r.SetQueryParam("asn", qAsn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ContactEmail != nil {
+
+ // query param contact_email
+ var qrContactEmail string
+ if o.ContactEmail != nil {
+ qrContactEmail = *o.ContactEmail
+ }
+ qContactEmail := qrContactEmail
+ if qContactEmail != "" {
+ if err := r.SetQueryParam("contact_email", qContactEmail); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ContactName != nil {
+
+ // query param contact_name
+ var qrContactName string
+ if o.ContactName != nil {
+ qrContactName = *o.ContactName
+ }
+ qContactName := qrContactName
+ if qContactName != "" {
+ if err := r.SetQueryParam("contact_name", qContactName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ContactPhone != nil {
+
+ // query param contact_phone
+ var qrContactPhone string
+ if o.ContactPhone != nil {
+ qrContactPhone = *o.ContactPhone
+ }
+ qContactPhone := qrContactPhone
+ if qContactPhone != "" {
+ if err := r.SetQueryParam("contact_phone", qContactPhone); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Facility != nil {
+
+ // query param facility
+ var qrFacility string
+ if o.Facility != nil {
+ qrFacility = *o.Facility
+ }
+ qFacility := qrFacility
+ if qFacility != "" {
+ if err := r.SetQueryParam("facility", qFacility); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Region != nil {
+
+ // query param region
+ var qrRegion string
+ if o.Region != nil {
+ qrRegion = *o.Region
+ }
+ qRegion := qrRegion
+ if qRegion != "" {
+ if err := r.SetQueryParam("region", qRegion); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RegionID != nil {
+
+ // query param region_id
+ var qrRegionID string
+ if o.RegionID != nil {
+ qrRegionID = *o.RegionID
+ }
+ qRegionID := qrRegionID
+ if qRegionID != "" {
+ if err := r.SetQueryParam("region_id", qRegionID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go
new file mode 100644
index 0000000..eb32561
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesListReader is a Reader for the DcimSitesList structure.
+type DcimSitesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimSitesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesListOK creates a DcimSitesListOK with default headers values
+func NewDcimSitesListOK() *DcimSitesListOK {
+ return &DcimSitesListOK{}
+}
+
+/*DcimSitesListOK handles this case with default header values.
+
+DcimSitesListOK dcim sites list o k
+*/
+type DcimSitesListOK struct {
+ Payload *models.DcimSitesListOKBody
+}
+
+func (o *DcimSitesListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/sites/][%d] dcimSitesListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimSitesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimSitesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_parameters.go
new file mode 100644
index 0000000..d5dc8db
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimSitesPartialUpdateParams creates a new DcimSitesPartialUpdateParams object
+// with the default values initialized.
+func NewDcimSitesPartialUpdateParams() *DcimSitesPartialUpdateParams {
+ var ()
+ return &DcimSitesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesPartialUpdateParamsWithTimeout creates a new DcimSitesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimSitesPartialUpdateParams {
+ var ()
+ return &DcimSitesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesPartialUpdateParamsWithContext creates a new DcimSitesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesPartialUpdateParamsWithContext(ctx context.Context) *DcimSitesPartialUpdateParams {
+ var ()
+ return &DcimSitesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesPartialUpdateParamsWithHTTPClient creates a new DcimSitesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimSitesPartialUpdateParams {
+ var ()
+ return &DcimSitesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim sites partial update operation typically these are written to a http.Request
+*/
+type DcimSitesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableSite
+ /*ID
+ A unique integer value identifying this site.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimSitesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) WithContext(ctx context.Context) *DcimSitesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimSitesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) WithData(data *models.WritableSite) *DcimSitesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) SetData(data *models.WritableSite) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) WithID(id int64) *DcimSitesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim sites partial update params
+func (o *DcimSitesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go
new file mode 100644
index 0000000..dedc6ab
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesPartialUpdateReader is a Reader for the DcimSitesPartialUpdate structure.
+type DcimSitesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimSitesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesPartialUpdateOK creates a DcimSitesPartialUpdateOK with default headers values
+func NewDcimSitesPartialUpdateOK() *DcimSitesPartialUpdateOK {
+ return &DcimSitesPartialUpdateOK{}
+}
+
+/*DcimSitesPartialUpdateOK handles this case with default header values.
+
+DcimSitesPartialUpdateOK dcim sites partial update o k
+*/
+type DcimSitesPartialUpdateOK struct {
+ Payload *models.WritableSite
+}
+
+func (o *DcimSitesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/sites/{id}/][%d] dcimSitesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimSitesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSite)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_parameters.go
new file mode 100644
index 0000000..a2c977b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimSitesReadParams creates a new DcimSitesReadParams object
+// with the default values initialized.
+func NewDcimSitesReadParams() *DcimSitesReadParams {
+ var ()
+ return &DcimSitesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesReadParamsWithTimeout creates a new DcimSitesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesReadParamsWithTimeout(timeout time.Duration) *DcimSitesReadParams {
+ var ()
+ return &DcimSitesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesReadParamsWithContext creates a new DcimSitesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesReadParamsWithContext(ctx context.Context) *DcimSitesReadParams {
+ var ()
+ return &DcimSitesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesReadParamsWithHTTPClient creates a new DcimSitesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesReadParamsWithHTTPClient(client *http.Client) *DcimSitesReadParams {
+ var ()
+ return &DcimSitesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesReadParams contains all the parameters to send to the API endpoint
+for the dcim sites read operation typically these are written to a http.Request
+*/
+type DcimSitesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this site.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites read params
+func (o *DcimSitesReadParams) WithTimeout(timeout time.Duration) *DcimSitesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites read params
+func (o *DcimSitesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites read params
+func (o *DcimSitesReadParams) WithContext(ctx context.Context) *DcimSitesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites read params
+func (o *DcimSitesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites read params
+func (o *DcimSitesReadParams) WithHTTPClient(client *http.Client) *DcimSitesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites read params
+func (o *DcimSitesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim sites read params
+func (o *DcimSitesReadParams) WithID(id int64) *DcimSitesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim sites read params
+func (o *DcimSitesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go
new file mode 100644
index 0000000..9802b56
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesReadReader is a Reader for the DcimSitesRead structure.
+type DcimSitesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimSitesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesReadOK creates a DcimSitesReadOK with default headers values
+func NewDcimSitesReadOK() *DcimSitesReadOK {
+ return &DcimSitesReadOK{}
+}
+
+/*DcimSitesReadOK handles this case with default header values.
+
+DcimSitesReadOK dcim sites read o k
+*/
+type DcimSitesReadOK struct {
+ Payload *models.Site
+}
+
+func (o *DcimSitesReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/sites/{id}/][%d] dcimSitesReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimSitesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Site)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_parameters.go
new file mode 100644
index 0000000..d029bf4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimSitesUpdateParams creates a new DcimSitesUpdateParams object
+// with the default values initialized.
+func NewDcimSitesUpdateParams() *DcimSitesUpdateParams {
+ var ()
+ return &DcimSitesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimSitesUpdateParamsWithTimeout creates a new DcimSitesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimSitesUpdateParamsWithTimeout(timeout time.Duration) *DcimSitesUpdateParams {
+ var ()
+ return &DcimSitesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimSitesUpdateParamsWithContext creates a new DcimSitesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimSitesUpdateParamsWithContext(ctx context.Context) *DcimSitesUpdateParams {
+ var ()
+ return &DcimSitesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimSitesUpdateParamsWithHTTPClient creates a new DcimSitesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimSitesUpdateParamsWithHTTPClient(client *http.Client) *DcimSitesUpdateParams {
+ var ()
+ return &DcimSitesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimSitesUpdateParams contains all the parameters to send to the API endpoint
+for the dcim sites update operation typically these are written to a http.Request
+*/
+type DcimSitesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableSite
+ /*ID
+ A unique integer value identifying this site.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim sites update params
+func (o *DcimSitesUpdateParams) WithTimeout(timeout time.Duration) *DcimSitesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim sites update params
+func (o *DcimSitesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim sites update params
+func (o *DcimSitesUpdateParams) WithContext(ctx context.Context) *DcimSitesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim sites update params
+func (o *DcimSitesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim sites update params
+func (o *DcimSitesUpdateParams) WithHTTPClient(client *http.Client) *DcimSitesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim sites update params
+func (o *DcimSitesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim sites update params
+func (o *DcimSitesUpdateParams) WithData(data *models.WritableSite) *DcimSitesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim sites update params
+func (o *DcimSitesUpdateParams) SetData(data *models.WritableSite) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim sites update params
+func (o *DcimSitesUpdateParams) WithID(id int64) *DcimSitesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim sites update params
+func (o *DcimSitesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimSitesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go
new file mode 100644
index 0000000..5859372
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimSitesUpdateReader is a Reader for the DcimSitesUpdate structure.
+type DcimSitesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimSitesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimSitesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimSitesUpdateOK creates a DcimSitesUpdateOK with default headers values
+func NewDcimSitesUpdateOK() *DcimSitesUpdateOK {
+ return &DcimSitesUpdateOK{}
+}
+
+/*DcimSitesUpdateOK handles this case with default header values.
+
+DcimSitesUpdateOK dcim sites update o k
+*/
+type DcimSitesUpdateOK struct {
+ Payload *models.WritableSite
+}
+
+func (o *DcimSitesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/sites/{id}/][%d] dcimSitesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimSitesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSite)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go
new file mode 100644
index 0000000..ad68090
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimVirtualChassisCreateParams creates a new DcimVirtualChassisCreateParams object
+// with the default values initialized.
+func NewDcimVirtualChassisCreateParams() *DcimVirtualChassisCreateParams {
+ var ()
+ return &DcimVirtualChassisCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisCreateParamsWithTimeout creates a new DcimVirtualChassisCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisCreateParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisCreateParams {
+ var ()
+ return &DcimVirtualChassisCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisCreateParamsWithContext creates a new DcimVirtualChassisCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisCreateParamsWithContext(ctx context.Context) *DcimVirtualChassisCreateParams {
+ var ()
+ return &DcimVirtualChassisCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisCreateParamsWithHTTPClient creates a new DcimVirtualChassisCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisCreateParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisCreateParams {
+ var ()
+ return &DcimVirtualChassisCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisCreateParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis create operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualChassis
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) WithContext(ctx context.Context) *DcimVirtualChassisCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) WithData(data *models.WritableVirtualChassis) *DcimVirtualChassisCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim virtual chassis create params
+func (o *DcimVirtualChassisCreateParams) SetData(data *models.WritableVirtualChassis) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go
new file mode 100644
index 0000000..4ce8a55
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimVirtualChassisCreateReader is a Reader for the DcimVirtualChassisCreate structure.
+type DcimVirtualChassisCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewDcimVirtualChassisCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisCreateCreated creates a DcimVirtualChassisCreateCreated with default headers values
+func NewDcimVirtualChassisCreateCreated() *DcimVirtualChassisCreateCreated {
+ return &DcimVirtualChassisCreateCreated{}
+}
+
+/*DcimVirtualChassisCreateCreated handles this case with default header values.
+
+DcimVirtualChassisCreateCreated dcim virtual chassis create created
+*/
+type DcimVirtualChassisCreateCreated struct {
+ Payload *models.WritableVirtualChassis
+}
+
+func (o *DcimVirtualChassisCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /dcim/virtual-chassis/][%d] dcimVirtualChassisCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *DcimVirtualChassisCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualChassis)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go
new file mode 100644
index 0000000..5040b2a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimVirtualChassisDeleteParams creates a new DcimVirtualChassisDeleteParams object
+// with the default values initialized.
+func NewDcimVirtualChassisDeleteParams() *DcimVirtualChassisDeleteParams {
+ var ()
+ return &DcimVirtualChassisDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisDeleteParamsWithTimeout creates a new DcimVirtualChassisDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisDeleteParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisDeleteParams {
+ var ()
+ return &DcimVirtualChassisDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisDeleteParamsWithContext creates a new DcimVirtualChassisDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisDeleteParamsWithContext(ctx context.Context) *DcimVirtualChassisDeleteParams {
+ var ()
+ return &DcimVirtualChassisDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisDeleteParamsWithHTTPClient creates a new DcimVirtualChassisDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisDeleteParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisDeleteParams {
+ var ()
+ return &DcimVirtualChassisDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisDeleteParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis delete operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this virtual chassis.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) WithContext(ctx context.Context) *DcimVirtualChassisDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) WithID(id int64) *DcimVirtualChassisDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim virtual chassis delete params
+func (o *DcimVirtualChassisDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go
new file mode 100644
index 0000000..83795c1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// DcimVirtualChassisDeleteReader is a Reader for the DcimVirtualChassisDelete structure.
+type DcimVirtualChassisDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewDcimVirtualChassisDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisDeleteNoContent creates a DcimVirtualChassisDeleteNoContent with default headers values
+func NewDcimVirtualChassisDeleteNoContent() *DcimVirtualChassisDeleteNoContent {
+ return &DcimVirtualChassisDeleteNoContent{}
+}
+
+/*DcimVirtualChassisDeleteNoContent handles this case with default header values.
+
+DcimVirtualChassisDeleteNoContent dcim virtual chassis delete no content
+*/
+type DcimVirtualChassisDeleteNoContent struct {
+}
+
+func (o *DcimVirtualChassisDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisDeleteNoContent ", 204)
+}
+
+func (o *DcimVirtualChassisDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go
new file mode 100644
index 0000000..58115c4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go
@@ -0,0 +1,195 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimVirtualChassisListParams creates a new DcimVirtualChassisListParams object
+// with the default values initialized.
+func NewDcimVirtualChassisListParams() *DcimVirtualChassisListParams {
+ var ()
+ return &DcimVirtualChassisListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisListParamsWithTimeout creates a new DcimVirtualChassisListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisListParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisListParams {
+ var ()
+ return &DcimVirtualChassisListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisListParamsWithContext creates a new DcimVirtualChassisListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisListParamsWithContext(ctx context.Context) *DcimVirtualChassisListParams {
+ var ()
+ return &DcimVirtualChassisListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisListParamsWithHTTPClient creates a new DcimVirtualChassisListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisListParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisListParams {
+ var ()
+ return &DcimVirtualChassisListParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisListParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis list operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) WithContext(ctx context.Context) *DcimVirtualChassisListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) WithLimit(limit *int64) *DcimVirtualChassisListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) WithOffset(offset *int64) *DcimVirtualChassisListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the dcim virtual chassis list params
+func (o *DcimVirtualChassisListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go
new file mode 100644
index 0000000..9e74783
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimVirtualChassisListReader is a Reader for the DcimVirtualChassisList structure.
+type DcimVirtualChassisListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimVirtualChassisListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisListOK creates a DcimVirtualChassisListOK with default headers values
+func NewDcimVirtualChassisListOK() *DcimVirtualChassisListOK {
+ return &DcimVirtualChassisListOK{}
+}
+
+/*DcimVirtualChassisListOK handles this case with default header values.
+
+DcimVirtualChassisListOK dcim virtual chassis list o k
+*/
+type DcimVirtualChassisListOK struct {
+ Payload *models.DcimVirtualChassisListOKBody
+}
+
+func (o *DcimVirtualChassisListOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/virtual-chassis/][%d] dcimVirtualChassisListOK %+v", 200, o.Payload)
+}
+
+func (o *DcimVirtualChassisListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.DcimVirtualChassisListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go
new file mode 100644
index 0000000..3a80e24
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimVirtualChassisPartialUpdateParams creates a new DcimVirtualChassisPartialUpdateParams object
+// with the default values initialized.
+func NewDcimVirtualChassisPartialUpdateParams() *DcimVirtualChassisPartialUpdateParams {
+ var ()
+ return &DcimVirtualChassisPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisPartialUpdateParamsWithTimeout creates a new DcimVirtualChassisPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisPartialUpdateParams {
+ var ()
+ return &DcimVirtualChassisPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisPartialUpdateParamsWithContext creates a new DcimVirtualChassisPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisPartialUpdateParamsWithContext(ctx context.Context) *DcimVirtualChassisPartialUpdateParams {
+ var ()
+ return &DcimVirtualChassisPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisPartialUpdateParamsWithHTTPClient creates a new DcimVirtualChassisPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisPartialUpdateParams {
+ var ()
+ return &DcimVirtualChassisPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisPartialUpdateParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis partial update operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualChassis
+ /*ID
+ A unique integer value identifying this virtual chassis.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) WithContext(ctx context.Context) *DcimVirtualChassisPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) WithData(data *models.WritableVirtualChassis) *DcimVirtualChassisPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) SetData(data *models.WritableVirtualChassis) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) WithID(id int64) *DcimVirtualChassisPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim virtual chassis partial update params
+func (o *DcimVirtualChassisPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go
new file mode 100644
index 0000000..632af09
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimVirtualChassisPartialUpdateReader is a Reader for the DcimVirtualChassisPartialUpdate structure.
+type DcimVirtualChassisPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimVirtualChassisPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisPartialUpdateOK creates a DcimVirtualChassisPartialUpdateOK with default headers values
+func NewDcimVirtualChassisPartialUpdateOK() *DcimVirtualChassisPartialUpdateOK {
+ return &DcimVirtualChassisPartialUpdateOK{}
+}
+
+/*DcimVirtualChassisPartialUpdateOK handles this case with default header values.
+
+DcimVirtualChassisPartialUpdateOK dcim virtual chassis partial update o k
+*/
+type DcimVirtualChassisPartialUpdateOK struct {
+ Payload *models.WritableVirtualChassis
+}
+
+func (o *DcimVirtualChassisPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimVirtualChassisPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualChassis)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go
new file mode 100644
index 0000000..b991ae0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewDcimVirtualChassisReadParams creates a new DcimVirtualChassisReadParams object
+// with the default values initialized.
+func NewDcimVirtualChassisReadParams() *DcimVirtualChassisReadParams {
+ var ()
+ return &DcimVirtualChassisReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisReadParamsWithTimeout creates a new DcimVirtualChassisReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisReadParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisReadParams {
+ var ()
+ return &DcimVirtualChassisReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisReadParamsWithContext creates a new DcimVirtualChassisReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisReadParamsWithContext(ctx context.Context) *DcimVirtualChassisReadParams {
+ var ()
+ return &DcimVirtualChassisReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisReadParamsWithHTTPClient creates a new DcimVirtualChassisReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisReadParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisReadParams {
+ var ()
+ return &DcimVirtualChassisReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisReadParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis read operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisReadParams struct {
+
+ /*ID
+ A unique integer value identifying this virtual chassis.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) WithContext(ctx context.Context) *DcimVirtualChassisReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) WithID(id int64) *DcimVirtualChassisReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim virtual chassis read params
+func (o *DcimVirtualChassisReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go
new file mode 100644
index 0000000..916f219
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimVirtualChassisReadReader is a Reader for the DcimVirtualChassisRead structure.
+type DcimVirtualChassisReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimVirtualChassisReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisReadOK creates a DcimVirtualChassisReadOK with default headers values
+func NewDcimVirtualChassisReadOK() *DcimVirtualChassisReadOK {
+ return &DcimVirtualChassisReadOK{}
+}
+
+/*DcimVirtualChassisReadOK handles this case with default header values.
+
+DcimVirtualChassisReadOK dcim virtual chassis read o k
+*/
+type DcimVirtualChassisReadOK struct {
+ Payload *models.VirtualChassis
+}
+
+func (o *DcimVirtualChassisReadOK) Error() string {
+ return fmt.Sprintf("[GET /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisReadOK %+v", 200, o.Payload)
+}
+
+func (o *DcimVirtualChassisReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualChassis)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go
new file mode 100644
index 0000000..659351a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewDcimVirtualChassisUpdateParams creates a new DcimVirtualChassisUpdateParams object
+// with the default values initialized.
+func NewDcimVirtualChassisUpdateParams() *DcimVirtualChassisUpdateParams {
+ var ()
+ return &DcimVirtualChassisUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewDcimVirtualChassisUpdateParamsWithTimeout creates a new DcimVirtualChassisUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewDcimVirtualChassisUpdateParamsWithTimeout(timeout time.Duration) *DcimVirtualChassisUpdateParams {
+ var ()
+ return &DcimVirtualChassisUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewDcimVirtualChassisUpdateParamsWithContext creates a new DcimVirtualChassisUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewDcimVirtualChassisUpdateParamsWithContext(ctx context.Context) *DcimVirtualChassisUpdateParams {
+ var ()
+ return &DcimVirtualChassisUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewDcimVirtualChassisUpdateParamsWithHTTPClient creates a new DcimVirtualChassisUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewDcimVirtualChassisUpdateParamsWithHTTPClient(client *http.Client) *DcimVirtualChassisUpdateParams {
+ var ()
+ return &DcimVirtualChassisUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*DcimVirtualChassisUpdateParams contains all the parameters to send to the API endpoint
+for the dcim virtual chassis update operation typically these are written to a http.Request
+*/
+type DcimVirtualChassisUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualChassis
+ /*ID
+ A unique integer value identifying this virtual chassis.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) WithTimeout(timeout time.Duration) *DcimVirtualChassisUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) WithContext(ctx context.Context) *DcimVirtualChassisUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) WithHTTPClient(client *http.Client) *DcimVirtualChassisUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) WithData(data *models.WritableVirtualChassis) *DcimVirtualChassisUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) SetData(data *models.WritableVirtualChassis) {
+ o.Data = data
+}
+
+// WithID adds the id to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) WithID(id int64) *DcimVirtualChassisUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the dcim virtual chassis update params
+func (o *DcimVirtualChassisUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *DcimVirtualChassisUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go
new file mode 100644
index 0000000..b6ef92f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package dcim
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// DcimVirtualChassisUpdateReader is a Reader for the DcimVirtualChassisUpdate structure.
+type DcimVirtualChassisUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *DcimVirtualChassisUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewDcimVirtualChassisUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewDcimVirtualChassisUpdateOK creates a DcimVirtualChassisUpdateOK with default headers values
+func NewDcimVirtualChassisUpdateOK() *DcimVirtualChassisUpdateOK {
+ return &DcimVirtualChassisUpdateOK{}
+}
+
+/*DcimVirtualChassisUpdateOK handles this case with default header values.
+
+DcimVirtualChassisUpdateOK dcim virtual chassis update o k
+*/
+type DcimVirtualChassisUpdateOK struct {
+ Payload *models.WritableVirtualChassis
+}
+
+func (o *DcimVirtualChassisUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /dcim/virtual-chassis/{id}/][%d] dcimVirtualChassisUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *DcimVirtualChassisUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualChassis)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_parameters.go
new file mode 100644
index 0000000..5451036
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasChoicesListParams creates a new ExtrasChoicesListParams object
+// with the default values initialized.
+func NewExtrasChoicesListParams() *ExtrasChoicesListParams {
+
+ return &ExtrasChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasChoicesListParamsWithTimeout creates a new ExtrasChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasChoicesListParamsWithTimeout(timeout time.Duration) *ExtrasChoicesListParams {
+
+ return &ExtrasChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasChoicesListParamsWithContext creates a new ExtrasChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasChoicesListParamsWithContext(ctx context.Context) *ExtrasChoicesListParams {
+
+ return &ExtrasChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasChoicesListParamsWithHTTPClient creates a new ExtrasChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasChoicesListParamsWithHTTPClient(client *http.Client) *ExtrasChoicesListParams {
+
+ return &ExtrasChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasChoicesListParams contains all the parameters to send to the API endpoint
+for the extras choices list operation typically these are written to a http.Request
+*/
+type ExtrasChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras choices list params
+func (o *ExtrasChoicesListParams) WithTimeout(timeout time.Duration) *ExtrasChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras choices list params
+func (o *ExtrasChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras choices list params
+func (o *ExtrasChoicesListParams) WithContext(ctx context.Context) *ExtrasChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras choices list params
+func (o *ExtrasChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras choices list params
+func (o *ExtrasChoicesListParams) WithHTTPClient(client *http.Client) *ExtrasChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras choices list params
+func (o *ExtrasChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_responses.go
new file mode 100644
index 0000000..c4305ab
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasChoicesListReader is a Reader for the ExtrasChoicesList structure.
+type ExtrasChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasChoicesListOK creates a ExtrasChoicesListOK with default headers values
+func NewExtrasChoicesListOK() *ExtrasChoicesListOK {
+ return &ExtrasChoicesListOK{}
+}
+
+/*ExtrasChoicesListOK handles this case with default header values.
+
+ExtrasChoicesListOK extras choices list o k
+*/
+type ExtrasChoicesListOK struct {
+}
+
+func (o *ExtrasChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/_choices/][%d] extrasChoicesListOK ", 200)
+}
+
+func (o *ExtrasChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_parameters.go
new file mode 100644
index 0000000..8ccd7a6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasChoicesReadParams creates a new ExtrasChoicesReadParams object
+// with the default values initialized.
+func NewExtrasChoicesReadParams() *ExtrasChoicesReadParams {
+ var ()
+ return &ExtrasChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasChoicesReadParamsWithTimeout creates a new ExtrasChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasChoicesReadParamsWithTimeout(timeout time.Duration) *ExtrasChoicesReadParams {
+ var ()
+ return &ExtrasChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasChoicesReadParamsWithContext creates a new ExtrasChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasChoicesReadParamsWithContext(ctx context.Context) *ExtrasChoicesReadParams {
+ var ()
+ return &ExtrasChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasChoicesReadParamsWithHTTPClient creates a new ExtrasChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasChoicesReadParamsWithHTTPClient(client *http.Client) *ExtrasChoicesReadParams {
+ var ()
+ return &ExtrasChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasChoicesReadParams contains all the parameters to send to the API endpoint
+for the extras choices read operation typically these are written to a http.Request
+*/
+type ExtrasChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras choices read params
+func (o *ExtrasChoicesReadParams) WithTimeout(timeout time.Duration) *ExtrasChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras choices read params
+func (o *ExtrasChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras choices read params
+func (o *ExtrasChoicesReadParams) WithContext(ctx context.Context) *ExtrasChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras choices read params
+func (o *ExtrasChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras choices read params
+func (o *ExtrasChoicesReadParams) WithHTTPClient(client *http.Client) *ExtrasChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras choices read params
+func (o *ExtrasChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras choices read params
+func (o *ExtrasChoicesReadParams) WithID(id string) *ExtrasChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras choices read params
+func (o *ExtrasChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_responses.go
new file mode 100644
index 0000000..52513cb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasChoicesReadReader is a Reader for the ExtrasChoicesRead structure.
+type ExtrasChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasChoicesReadOK creates a ExtrasChoicesReadOK with default headers values
+func NewExtrasChoicesReadOK() *ExtrasChoicesReadOK {
+ return &ExtrasChoicesReadOK{}
+}
+
+/*ExtrasChoicesReadOK handles this case with default header values.
+
+ExtrasChoicesReadOK extras choices read o k
+*/
+type ExtrasChoicesReadOK struct {
+}
+
+func (o *ExtrasChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/_choices/{id}/][%d] extrasChoicesReadOK ", 200)
+}
+
+func (o *ExtrasChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_client.go
new file mode 100644
index 0000000..b13df41
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_client.go
@@ -0,0 +1,885 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new extras API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for extras API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+ExtrasChoicesList extras choices list API
+*/
+func (a *Client) ExtrasChoicesList(params *ExtrasChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras__choices_list",
+ Method: "GET",
+ PathPattern: "/extras/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasChoicesListOK), nil
+
+}
+
+/*
+ExtrasChoicesRead extras choices read API
+*/
+func (a *Client) ExtrasChoicesRead(params *ExtrasChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras__choices_read",
+ Method: "GET",
+ PathPattern: "/extras/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasChoicesReadOK), nil
+
+}
+
+/*
+ExtrasExportTemplatesCreate extras export templates create API
+*/
+func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_create",
+ Method: "POST",
+ PathPattern: "/extras/export-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesCreateCreated), nil
+
+}
+
+/*
+ExtrasExportTemplatesDelete extras export templates delete API
+*/
+func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_delete",
+ Method: "DELETE",
+ PathPattern: "/extras/export-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesDeleteNoContent), nil
+
+}
+
+/*
+ExtrasExportTemplatesList extras export templates list API
+*/
+func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_list",
+ Method: "GET",
+ PathPattern: "/extras/export-templates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesListOK), nil
+
+}
+
+/*
+ExtrasExportTemplatesPartialUpdate extras export templates partial update API
+*/
+func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/extras/export-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesPartialUpdateOK), nil
+
+}
+
+/*
+ExtrasExportTemplatesRead extras export templates read API
+*/
+func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_read",
+ Method: "GET",
+ PathPattern: "/extras/export-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesReadOK), nil
+
+}
+
+/*
+ExtrasExportTemplatesUpdate extras export templates update API
+*/
+func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasExportTemplatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_export-templates_update",
+ Method: "PUT",
+ PathPattern: "/extras/export-templates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasExportTemplatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasExportTemplatesUpdateOK), nil
+
+}
+
+/*
+ExtrasGraphsCreate extras graphs create API
+*/
+func (a *Client) ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_create",
+ Method: "POST",
+ PathPattern: "/extras/graphs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsCreateCreated), nil
+
+}
+
+/*
+ExtrasGraphsDelete extras graphs delete API
+*/
+func (a *Client) ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_delete",
+ Method: "DELETE",
+ PathPattern: "/extras/graphs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsDeleteNoContent), nil
+
+}
+
+/*
+ExtrasGraphsList extras graphs list API
+*/
+func (a *Client) ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_list",
+ Method: "GET",
+ PathPattern: "/extras/graphs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsListOK), nil
+
+}
+
+/*
+ExtrasGraphsPartialUpdate extras graphs partial update API
+*/
+func (a *Client) ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_partial_update",
+ Method: "PATCH",
+ PathPattern: "/extras/graphs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsPartialUpdateOK), nil
+
+}
+
+/*
+ExtrasGraphsRead extras graphs read API
+*/
+func (a *Client) ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_read",
+ Method: "GET",
+ PathPattern: "/extras/graphs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsReadOK), nil
+
+}
+
+/*
+ExtrasGraphsUpdate extras graphs update API
+*/
+func (a *Client) ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasGraphsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_graphs_update",
+ Method: "PUT",
+ PathPattern: "/extras/graphs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasGraphsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasGraphsUpdateOK), nil
+
+}
+
+/*
+ExtrasImageAttachmentsCreate extras image attachments create API
+*/
+func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_create",
+ Method: "POST",
+ PathPattern: "/extras/image-attachments/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsCreateCreated), nil
+
+}
+
+/*
+ExtrasImageAttachmentsDelete extras image attachments delete API
+*/
+func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_delete",
+ Method: "DELETE",
+ PathPattern: "/extras/image-attachments/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsDeleteNoContent), nil
+
+}
+
+/*
+ExtrasImageAttachmentsList extras image attachments list API
+*/
+func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_list",
+ Method: "GET",
+ PathPattern: "/extras/image-attachments/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsListOK), nil
+
+}
+
+/*
+ExtrasImageAttachmentsPartialUpdate extras image attachments partial update API
+*/
+func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_partial_update",
+ Method: "PATCH",
+ PathPattern: "/extras/image-attachments/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsPartialUpdateOK), nil
+
+}
+
+/*
+ExtrasImageAttachmentsRead extras image attachments read API
+*/
+func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_read",
+ Method: "GET",
+ PathPattern: "/extras/image-attachments/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsReadOK), nil
+
+}
+
+/*
+ExtrasImageAttachmentsUpdate extras image attachments update API
+*/
+func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasImageAttachmentsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_image-attachments_update",
+ Method: "PUT",
+ PathPattern: "/extras/image-attachments/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasImageAttachmentsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasImageAttachmentsUpdateOK), nil
+
+}
+
+/*
+ExtrasRecentActivityList List all UserActions to provide a log of recent activity.
+*/
+func (a *Client) ExtrasRecentActivityList(params *ExtrasRecentActivityListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasRecentActivityListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasRecentActivityListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_recent-activity_list",
+ Method: "GET",
+ PathPattern: "/extras/recent-activity/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasRecentActivityListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasRecentActivityListOK), nil
+
+}
+
+/*
+ExtrasRecentActivityRead List all UserActions to provide a log of recent activity.
+*/
+func (a *Client) ExtrasRecentActivityRead(params *ExtrasRecentActivityReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasRecentActivityReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasRecentActivityReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_recent-activity_read",
+ Method: "GET",
+ PathPattern: "/extras/recent-activity/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasRecentActivityReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasRecentActivityReadOK), nil
+
+}
+
+/*
+ExtrasTopologyMapsCreate extras topology maps create API
+*/
+func (a *Client) ExtrasTopologyMapsCreate(params *ExtrasTopologyMapsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_create",
+ Method: "POST",
+ PathPattern: "/extras/topology-maps/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsCreateCreated), nil
+
+}
+
+/*
+ExtrasTopologyMapsDelete extras topology maps delete API
+*/
+func (a *Client) ExtrasTopologyMapsDelete(params *ExtrasTopologyMapsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_delete",
+ Method: "DELETE",
+ PathPattern: "/extras/topology-maps/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsDeleteNoContent), nil
+
+}
+
+/*
+ExtrasTopologyMapsList extras topology maps list API
+*/
+func (a *Client) ExtrasTopologyMapsList(params *ExtrasTopologyMapsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_list",
+ Method: "GET",
+ PathPattern: "/extras/topology-maps/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsListOK), nil
+
+}
+
+/*
+ExtrasTopologyMapsPartialUpdate extras topology maps partial update API
+*/
+func (a *Client) ExtrasTopologyMapsPartialUpdate(params *ExtrasTopologyMapsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_partial_update",
+ Method: "PATCH",
+ PathPattern: "/extras/topology-maps/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsPartialUpdateOK), nil
+
+}
+
+/*
+ExtrasTopologyMapsRead extras topology maps read API
+*/
+func (a *Client) ExtrasTopologyMapsRead(params *ExtrasTopologyMapsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_read",
+ Method: "GET",
+ PathPattern: "/extras/topology-maps/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsReadOK), nil
+
+}
+
+/*
+ExtrasTopologyMapsRender extras topology maps render API
+*/
+func (a *Client) ExtrasTopologyMapsRender(params *ExtrasTopologyMapsRenderParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsRenderOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsRenderParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_render",
+ Method: "GET",
+ PathPattern: "/extras/topology-maps/{id}/render/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsRenderReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsRenderOK), nil
+
+}
+
+/*
+ExtrasTopologyMapsUpdate extras topology maps update API
+*/
+func (a *Client) ExtrasTopologyMapsUpdate(params *ExtrasTopologyMapsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasTopologyMapsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewExtrasTopologyMapsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "extras_topology-maps_update",
+ Method: "PUT",
+ PathPattern: "/extras/topology-maps/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &ExtrasTopologyMapsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*ExtrasTopologyMapsUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_parameters.go
new file mode 100644
index 0000000..1ae7566
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasExportTemplatesCreateParams creates a new ExtrasExportTemplatesCreateParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesCreateParams() *ExtrasExportTemplatesCreateParams {
+ var ()
+ return &ExtrasExportTemplatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesCreateParamsWithTimeout creates a new ExtrasExportTemplatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesCreateParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesCreateParams {
+ var ()
+ return &ExtrasExportTemplatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesCreateParamsWithContext creates a new ExtrasExportTemplatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesCreateParamsWithContext(ctx context.Context) *ExtrasExportTemplatesCreateParams {
+ var ()
+ return &ExtrasExportTemplatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesCreateParamsWithHTTPClient creates a new ExtrasExportTemplatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesCreateParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesCreateParams {
+ var ()
+ return &ExtrasExportTemplatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesCreateParams contains all the parameters to send to the API endpoint
+for the extras export templates create operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesCreateParams struct {
+
+ /*Data*/
+ Data *models.ExportTemplate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) WithContext(ctx context.Context) *ExtrasExportTemplatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) WithData(data *models.ExportTemplate) *ExtrasExportTemplatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras export templates create params
+func (o *ExtrasExportTemplatesCreateParams) SetData(data *models.ExportTemplate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_responses.go
new file mode 100644
index 0000000..cab6205
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasExportTemplatesCreateReader is a Reader for the ExtrasExportTemplatesCreate structure.
+type ExtrasExportTemplatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewExtrasExportTemplatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesCreateCreated creates a ExtrasExportTemplatesCreateCreated with default headers values
+func NewExtrasExportTemplatesCreateCreated() *ExtrasExportTemplatesCreateCreated {
+ return &ExtrasExportTemplatesCreateCreated{}
+}
+
+/*ExtrasExportTemplatesCreateCreated handles this case with default header values.
+
+ExtrasExportTemplatesCreateCreated extras export templates create created
+*/
+type ExtrasExportTemplatesCreateCreated struct {
+ Payload *models.ExportTemplate
+}
+
+func (o *ExtrasExportTemplatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /extras/export-templates/][%d] extrasExportTemplatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *ExtrasExportTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExportTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_parameters.go
new file mode 100644
index 0000000..eed6f13
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasExportTemplatesDeleteParams creates a new ExtrasExportTemplatesDeleteParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesDeleteParams() *ExtrasExportTemplatesDeleteParams {
+ var ()
+ return &ExtrasExportTemplatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesDeleteParamsWithTimeout creates a new ExtrasExportTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesDeleteParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesDeleteParams {
+ var ()
+ return &ExtrasExportTemplatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesDeleteParamsWithContext creates a new ExtrasExportTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesDeleteParamsWithContext(ctx context.Context) *ExtrasExportTemplatesDeleteParams {
+ var ()
+ return &ExtrasExportTemplatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesDeleteParamsWithHTTPClient creates a new ExtrasExportTemplatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesDeleteParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesDeleteParams {
+ var ()
+ return &ExtrasExportTemplatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesDeleteParams contains all the parameters to send to the API endpoint
+for the extras export templates delete operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this export template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) WithContext(ctx context.Context) *ExtrasExportTemplatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) WithID(id int64) *ExtrasExportTemplatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras export templates delete params
+func (o *ExtrasExportTemplatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_responses.go
new file mode 100644
index 0000000..b8e60bb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasExportTemplatesDeleteReader is a Reader for the ExtrasExportTemplatesDelete structure.
+type ExtrasExportTemplatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewExtrasExportTemplatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesDeleteNoContent creates a ExtrasExportTemplatesDeleteNoContent with default headers values
+func NewExtrasExportTemplatesDeleteNoContent() *ExtrasExportTemplatesDeleteNoContent {
+ return &ExtrasExportTemplatesDeleteNoContent{}
+}
+
+/*ExtrasExportTemplatesDeleteNoContent handles this case with default header values.
+
+ExtrasExportTemplatesDeleteNoContent extras export templates delete no content
+*/
+type ExtrasExportTemplatesDeleteNoContent struct {
+}
+
+func (o *ExtrasExportTemplatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /extras/export-templates/{id}/][%d] extrasExportTemplatesDeleteNoContent ", 204)
+}
+
+func (o *ExtrasExportTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_parameters.go
new file mode 100644
index 0000000..cdd7e6b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasExportTemplatesListParams creates a new ExtrasExportTemplatesListParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesListParams() *ExtrasExportTemplatesListParams {
+ var ()
+ return &ExtrasExportTemplatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesListParamsWithTimeout creates a new ExtrasExportTemplatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesListParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesListParams {
+ var ()
+ return &ExtrasExportTemplatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesListParamsWithContext creates a new ExtrasExportTemplatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesListParamsWithContext(ctx context.Context) *ExtrasExportTemplatesListParams {
+ var ()
+ return &ExtrasExportTemplatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesListParamsWithHTTPClient creates a new ExtrasExportTemplatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesListParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesListParams {
+ var ()
+ return &ExtrasExportTemplatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesListParams contains all the parameters to send to the API endpoint
+for the extras export templates list operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesListParams struct {
+
+ /*ContentType*/
+ ContentType *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithContext(ctx context.Context) *ExtrasExportTemplatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithContentType adds the contentType to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithContentType(contentType *string) *ExtrasExportTemplatesListParams {
+ o.SetContentType(contentType)
+ return o
+}
+
+// SetContentType adds the contentType to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetContentType(contentType *string) {
+ o.ContentType = contentType
+}
+
+// WithLimit adds the limit to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithLimit(limit *int64) *ExtrasExportTemplatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithName(name *string) *ExtrasExportTemplatesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) WithOffset(offset *int64) *ExtrasExportTemplatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the extras export templates list params
+func (o *ExtrasExportTemplatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.ContentType != nil {
+
+ // query param content_type
+ var qrContentType string
+ if o.ContentType != nil {
+ qrContentType = *o.ContentType
+ }
+ qContentType := qrContentType
+ if qContentType != "" {
+ if err := r.SetQueryParam("content_type", qContentType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_responses.go
new file mode 100644
index 0000000..f75b54e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasExportTemplatesListReader is a Reader for the ExtrasExportTemplatesList structure.
+type ExtrasExportTemplatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasExportTemplatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesListOK creates a ExtrasExportTemplatesListOK with default headers values
+func NewExtrasExportTemplatesListOK() *ExtrasExportTemplatesListOK {
+ return &ExtrasExportTemplatesListOK{}
+}
+
+/*ExtrasExportTemplatesListOK handles this case with default header values.
+
+ExtrasExportTemplatesListOK extras export templates list o k
+*/
+type ExtrasExportTemplatesListOK struct {
+ Payload *models.ExtrasExportTemplatesListOKBody
+}
+
+func (o *ExtrasExportTemplatesListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/export-templates/][%d] extrasExportTemplatesListOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasExportTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExtrasExportTemplatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_parameters.go
new file mode 100644
index 0000000..558cdde
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasExportTemplatesPartialUpdateParams creates a new ExtrasExportTemplatesPartialUpdateParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesPartialUpdateParams() *ExtrasExportTemplatesPartialUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesPartialUpdateParamsWithTimeout creates a new ExtrasExportTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesPartialUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesPartialUpdateParamsWithContext creates a new ExtrasExportTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesPartialUpdateParamsWithContext(ctx context.Context) *ExtrasExportTemplatesPartialUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesPartialUpdateParamsWithHTTPClient creates a new ExtrasExportTemplatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesPartialUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the extras export templates partial update operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.ExportTemplate
+ /*ID
+ A unique integer value identifying this export template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) WithContext(ctx context.Context) *ExtrasExportTemplatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) WithData(data *models.ExportTemplate) *ExtrasExportTemplatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) SetData(data *models.ExportTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) WithID(id int64) *ExtrasExportTemplatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras export templates partial update params
+func (o *ExtrasExportTemplatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_responses.go
new file mode 100644
index 0000000..31a4c6d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasExportTemplatesPartialUpdateReader is a Reader for the ExtrasExportTemplatesPartialUpdate structure.
+type ExtrasExportTemplatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasExportTemplatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesPartialUpdateOK creates a ExtrasExportTemplatesPartialUpdateOK with default headers values
+func NewExtrasExportTemplatesPartialUpdateOK() *ExtrasExportTemplatesPartialUpdateOK {
+ return &ExtrasExportTemplatesPartialUpdateOK{}
+}
+
+/*ExtrasExportTemplatesPartialUpdateOK handles this case with default header values.
+
+ExtrasExportTemplatesPartialUpdateOK extras export templates partial update o k
+*/
+type ExtrasExportTemplatesPartialUpdateOK struct {
+ Payload *models.ExportTemplate
+}
+
+func (o *ExtrasExportTemplatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /extras/export-templates/{id}/][%d] extrasExportTemplatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasExportTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExportTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_parameters.go
new file mode 100644
index 0000000..cb93b03
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasExportTemplatesReadParams creates a new ExtrasExportTemplatesReadParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesReadParams() *ExtrasExportTemplatesReadParams {
+ var ()
+ return &ExtrasExportTemplatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesReadParamsWithTimeout creates a new ExtrasExportTemplatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesReadParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesReadParams {
+ var ()
+ return &ExtrasExportTemplatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesReadParamsWithContext creates a new ExtrasExportTemplatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesReadParamsWithContext(ctx context.Context) *ExtrasExportTemplatesReadParams {
+ var ()
+ return &ExtrasExportTemplatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesReadParamsWithHTTPClient creates a new ExtrasExportTemplatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesReadParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesReadParams {
+ var ()
+ return &ExtrasExportTemplatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesReadParams contains all the parameters to send to the API endpoint
+for the extras export templates read operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this export template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) WithContext(ctx context.Context) *ExtrasExportTemplatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) WithID(id int64) *ExtrasExportTemplatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras export templates read params
+func (o *ExtrasExportTemplatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_responses.go
new file mode 100644
index 0000000..1aab460
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasExportTemplatesReadReader is a Reader for the ExtrasExportTemplatesRead structure.
+type ExtrasExportTemplatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasExportTemplatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesReadOK creates a ExtrasExportTemplatesReadOK with default headers values
+func NewExtrasExportTemplatesReadOK() *ExtrasExportTemplatesReadOK {
+ return &ExtrasExportTemplatesReadOK{}
+}
+
+/*ExtrasExportTemplatesReadOK handles this case with default header values.
+
+ExtrasExportTemplatesReadOK extras export templates read o k
+*/
+type ExtrasExportTemplatesReadOK struct {
+ Payload *models.ExportTemplate
+}
+
+func (o *ExtrasExportTemplatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/export-templates/{id}/][%d] extrasExportTemplatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasExportTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExportTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_parameters.go
new file mode 100644
index 0000000..5ce990e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasExportTemplatesUpdateParams creates a new ExtrasExportTemplatesUpdateParams object
+// with the default values initialized.
+func NewExtrasExportTemplatesUpdateParams() *ExtrasExportTemplatesUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasExportTemplatesUpdateParamsWithTimeout creates a new ExtrasExportTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasExportTemplatesUpdateParamsWithTimeout(timeout time.Duration) *ExtrasExportTemplatesUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasExportTemplatesUpdateParamsWithContext creates a new ExtrasExportTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasExportTemplatesUpdateParamsWithContext(ctx context.Context) *ExtrasExportTemplatesUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasExportTemplatesUpdateParamsWithHTTPClient creates a new ExtrasExportTemplatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasExportTemplatesUpdateParamsWithHTTPClient(client *http.Client) *ExtrasExportTemplatesUpdateParams {
+ var ()
+ return &ExtrasExportTemplatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasExportTemplatesUpdateParams contains all the parameters to send to the API endpoint
+for the extras export templates update operation typically these are written to a http.Request
+*/
+type ExtrasExportTemplatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.ExportTemplate
+ /*ID
+ A unique integer value identifying this export template.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) WithTimeout(timeout time.Duration) *ExtrasExportTemplatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) WithContext(ctx context.Context) *ExtrasExportTemplatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) WithHTTPClient(client *http.Client) *ExtrasExportTemplatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) WithData(data *models.ExportTemplate) *ExtrasExportTemplatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) SetData(data *models.ExportTemplate) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) WithID(id int64) *ExtrasExportTemplatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras export templates update params
+func (o *ExtrasExportTemplatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasExportTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_responses.go
new file mode 100644
index 0000000..aae72f3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_export_templates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasExportTemplatesUpdateReader is a Reader for the ExtrasExportTemplatesUpdate structure.
+type ExtrasExportTemplatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasExportTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasExportTemplatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasExportTemplatesUpdateOK creates a ExtrasExportTemplatesUpdateOK with default headers values
+func NewExtrasExportTemplatesUpdateOK() *ExtrasExportTemplatesUpdateOK {
+ return &ExtrasExportTemplatesUpdateOK{}
+}
+
+/*ExtrasExportTemplatesUpdateOK handles this case with default header values.
+
+ExtrasExportTemplatesUpdateOK extras export templates update o k
+*/
+type ExtrasExportTemplatesUpdateOK struct {
+ Payload *models.ExportTemplate
+}
+
+func (o *ExtrasExportTemplatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /extras/export-templates/{id}/][%d] extrasExportTemplatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasExportTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExportTemplate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_parameters.go
new file mode 100644
index 0000000..7289ea4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasGraphsCreateParams creates a new ExtrasGraphsCreateParams object
+// with the default values initialized.
+func NewExtrasGraphsCreateParams() *ExtrasGraphsCreateParams {
+ var ()
+ return &ExtrasGraphsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsCreateParamsWithTimeout creates a new ExtrasGraphsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsCreateParamsWithTimeout(timeout time.Duration) *ExtrasGraphsCreateParams {
+ var ()
+ return &ExtrasGraphsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsCreateParamsWithContext creates a new ExtrasGraphsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsCreateParamsWithContext(ctx context.Context) *ExtrasGraphsCreateParams {
+ var ()
+ return &ExtrasGraphsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsCreateParamsWithHTTPClient creates a new ExtrasGraphsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsCreateParamsWithHTTPClient(client *http.Client) *ExtrasGraphsCreateParams {
+ var ()
+ return &ExtrasGraphsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsCreateParams contains all the parameters to send to the API endpoint
+for the extras graphs create operation typically these are written to a http.Request
+*/
+type ExtrasGraphsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableGraph
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) WithTimeout(timeout time.Duration) *ExtrasGraphsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) WithContext(ctx context.Context) *ExtrasGraphsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) WithHTTPClient(client *http.Client) *ExtrasGraphsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) WithData(data *models.WritableGraph) *ExtrasGraphsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras graphs create params
+func (o *ExtrasGraphsCreateParams) SetData(data *models.WritableGraph) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_responses.go
new file mode 100644
index 0000000..8b635f2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasGraphsCreateReader is a Reader for the ExtrasGraphsCreate structure.
+type ExtrasGraphsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewExtrasGraphsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsCreateCreated creates a ExtrasGraphsCreateCreated with default headers values
+func NewExtrasGraphsCreateCreated() *ExtrasGraphsCreateCreated {
+ return &ExtrasGraphsCreateCreated{}
+}
+
+/*ExtrasGraphsCreateCreated handles this case with default header values.
+
+ExtrasGraphsCreateCreated extras graphs create created
+*/
+type ExtrasGraphsCreateCreated struct {
+ Payload *models.WritableGraph
+}
+
+func (o *ExtrasGraphsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /extras/graphs/][%d] extrasGraphsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *ExtrasGraphsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableGraph)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_parameters.go
new file mode 100644
index 0000000..bb969f3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasGraphsDeleteParams creates a new ExtrasGraphsDeleteParams object
+// with the default values initialized.
+func NewExtrasGraphsDeleteParams() *ExtrasGraphsDeleteParams {
+ var ()
+ return &ExtrasGraphsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsDeleteParamsWithTimeout creates a new ExtrasGraphsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsDeleteParamsWithTimeout(timeout time.Duration) *ExtrasGraphsDeleteParams {
+ var ()
+ return &ExtrasGraphsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsDeleteParamsWithContext creates a new ExtrasGraphsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsDeleteParamsWithContext(ctx context.Context) *ExtrasGraphsDeleteParams {
+ var ()
+ return &ExtrasGraphsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsDeleteParamsWithHTTPClient creates a new ExtrasGraphsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsDeleteParamsWithHTTPClient(client *http.Client) *ExtrasGraphsDeleteParams {
+ var ()
+ return &ExtrasGraphsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsDeleteParams contains all the parameters to send to the API endpoint
+for the extras graphs delete operation typically these are written to a http.Request
+*/
+type ExtrasGraphsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this graph.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) WithTimeout(timeout time.Duration) *ExtrasGraphsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) WithContext(ctx context.Context) *ExtrasGraphsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) WithHTTPClient(client *http.Client) *ExtrasGraphsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) WithID(id int64) *ExtrasGraphsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras graphs delete params
+func (o *ExtrasGraphsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_responses.go
new file mode 100644
index 0000000..3033d7d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasGraphsDeleteReader is a Reader for the ExtrasGraphsDelete structure.
+type ExtrasGraphsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewExtrasGraphsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsDeleteNoContent creates a ExtrasGraphsDeleteNoContent with default headers values
+func NewExtrasGraphsDeleteNoContent() *ExtrasGraphsDeleteNoContent {
+ return &ExtrasGraphsDeleteNoContent{}
+}
+
+/*ExtrasGraphsDeleteNoContent handles this case with default header values.
+
+ExtrasGraphsDeleteNoContent extras graphs delete no content
+*/
+type ExtrasGraphsDeleteNoContent struct {
+}
+
+func (o *ExtrasGraphsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /extras/graphs/{id}/][%d] extrasGraphsDeleteNoContent ", 204)
+}
+
+func (o *ExtrasGraphsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_parameters.go
new file mode 100644
index 0000000..1e58184
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasGraphsListParams creates a new ExtrasGraphsListParams object
+// with the default values initialized.
+func NewExtrasGraphsListParams() *ExtrasGraphsListParams {
+ var ()
+ return &ExtrasGraphsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsListParamsWithTimeout creates a new ExtrasGraphsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsListParamsWithTimeout(timeout time.Duration) *ExtrasGraphsListParams {
+ var ()
+ return &ExtrasGraphsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsListParamsWithContext creates a new ExtrasGraphsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsListParamsWithContext(ctx context.Context) *ExtrasGraphsListParams {
+ var ()
+ return &ExtrasGraphsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsListParamsWithHTTPClient creates a new ExtrasGraphsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsListParamsWithHTTPClient(client *http.Client) *ExtrasGraphsListParams {
+ var ()
+ return &ExtrasGraphsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsListParams contains all the parameters to send to the API endpoint
+for the extras graphs list operation typically these are written to a http.Request
+*/
+type ExtrasGraphsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Type*/
+ Type *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithTimeout(timeout time.Duration) *ExtrasGraphsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithContext(ctx context.Context) *ExtrasGraphsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithHTTPClient(client *http.Client) *ExtrasGraphsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithLimit(limit *int64) *ExtrasGraphsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithName(name *string) *ExtrasGraphsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithOffset(offset *int64) *ExtrasGraphsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithType adds the typeVar to the extras graphs list params
+func (o *ExtrasGraphsListParams) WithType(typeVar *string) *ExtrasGraphsListParams {
+ o.SetType(typeVar)
+ return o
+}
+
+// SetType adds the type to the extras graphs list params
+func (o *ExtrasGraphsListParams) SetType(typeVar *string) {
+ o.Type = typeVar
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Type != nil {
+
+ // query param type
+ var qrType string
+ if o.Type != nil {
+ qrType = *o.Type
+ }
+ qType := qrType
+ if qType != "" {
+ if err := r.SetQueryParam("type", qType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_responses.go
new file mode 100644
index 0000000..193d5b4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasGraphsListReader is a Reader for the ExtrasGraphsList structure.
+type ExtrasGraphsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasGraphsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsListOK creates a ExtrasGraphsListOK with default headers values
+func NewExtrasGraphsListOK() *ExtrasGraphsListOK {
+ return &ExtrasGraphsListOK{}
+}
+
+/*ExtrasGraphsListOK handles this case with default header values.
+
+ExtrasGraphsListOK extras graphs list o k
+*/
+type ExtrasGraphsListOK struct {
+ Payload *models.ExtrasGraphsListOKBody
+}
+
+func (o *ExtrasGraphsListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/graphs/][%d] extrasGraphsListOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasGraphsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExtrasGraphsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_parameters.go
new file mode 100644
index 0000000..6af233d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasGraphsPartialUpdateParams creates a new ExtrasGraphsPartialUpdateParams object
+// with the default values initialized.
+func NewExtrasGraphsPartialUpdateParams() *ExtrasGraphsPartialUpdateParams {
+ var ()
+ return &ExtrasGraphsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsPartialUpdateParamsWithTimeout creates a new ExtrasGraphsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasGraphsPartialUpdateParams {
+ var ()
+ return &ExtrasGraphsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsPartialUpdateParamsWithContext creates a new ExtrasGraphsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsPartialUpdateParamsWithContext(ctx context.Context) *ExtrasGraphsPartialUpdateParams {
+ var ()
+ return &ExtrasGraphsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsPartialUpdateParamsWithHTTPClient creates a new ExtrasGraphsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasGraphsPartialUpdateParams {
+ var ()
+ return &ExtrasGraphsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the extras graphs partial update operation typically these are written to a http.Request
+*/
+type ExtrasGraphsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableGraph
+ /*ID
+ A unique integer value identifying this graph.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasGraphsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) WithContext(ctx context.Context) *ExtrasGraphsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasGraphsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) WithData(data *models.WritableGraph) *ExtrasGraphsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) SetData(data *models.WritableGraph) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) WithID(id int64) *ExtrasGraphsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras graphs partial update params
+func (o *ExtrasGraphsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_responses.go
new file mode 100644
index 0000000..c69cd4a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasGraphsPartialUpdateReader is a Reader for the ExtrasGraphsPartialUpdate structure.
+type ExtrasGraphsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasGraphsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsPartialUpdateOK creates a ExtrasGraphsPartialUpdateOK with default headers values
+func NewExtrasGraphsPartialUpdateOK() *ExtrasGraphsPartialUpdateOK {
+ return &ExtrasGraphsPartialUpdateOK{}
+}
+
+/*ExtrasGraphsPartialUpdateOK handles this case with default header values.
+
+ExtrasGraphsPartialUpdateOK extras graphs partial update o k
+*/
+type ExtrasGraphsPartialUpdateOK struct {
+ Payload *models.WritableGraph
+}
+
+func (o *ExtrasGraphsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /extras/graphs/{id}/][%d] extrasGraphsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasGraphsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableGraph)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_parameters.go
new file mode 100644
index 0000000..d01b844
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasGraphsReadParams creates a new ExtrasGraphsReadParams object
+// with the default values initialized.
+func NewExtrasGraphsReadParams() *ExtrasGraphsReadParams {
+ var ()
+ return &ExtrasGraphsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsReadParamsWithTimeout creates a new ExtrasGraphsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsReadParamsWithTimeout(timeout time.Duration) *ExtrasGraphsReadParams {
+ var ()
+ return &ExtrasGraphsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsReadParamsWithContext creates a new ExtrasGraphsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsReadParamsWithContext(ctx context.Context) *ExtrasGraphsReadParams {
+ var ()
+ return &ExtrasGraphsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsReadParamsWithHTTPClient creates a new ExtrasGraphsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsReadParamsWithHTTPClient(client *http.Client) *ExtrasGraphsReadParams {
+ var ()
+ return &ExtrasGraphsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsReadParams contains all the parameters to send to the API endpoint
+for the extras graphs read operation typically these are written to a http.Request
+*/
+type ExtrasGraphsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this graph.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs read params
+func (o *ExtrasGraphsReadParams) WithTimeout(timeout time.Duration) *ExtrasGraphsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs read params
+func (o *ExtrasGraphsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs read params
+func (o *ExtrasGraphsReadParams) WithContext(ctx context.Context) *ExtrasGraphsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs read params
+func (o *ExtrasGraphsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs read params
+func (o *ExtrasGraphsReadParams) WithHTTPClient(client *http.Client) *ExtrasGraphsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs read params
+func (o *ExtrasGraphsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras graphs read params
+func (o *ExtrasGraphsReadParams) WithID(id int64) *ExtrasGraphsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras graphs read params
+func (o *ExtrasGraphsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_responses.go
new file mode 100644
index 0000000..be6ad49
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasGraphsReadReader is a Reader for the ExtrasGraphsRead structure.
+type ExtrasGraphsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasGraphsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsReadOK creates a ExtrasGraphsReadOK with default headers values
+func NewExtrasGraphsReadOK() *ExtrasGraphsReadOK {
+ return &ExtrasGraphsReadOK{}
+}
+
+/*ExtrasGraphsReadOK handles this case with default header values.
+
+ExtrasGraphsReadOK extras graphs read o k
+*/
+type ExtrasGraphsReadOK struct {
+ Payload *models.Graph
+}
+
+func (o *ExtrasGraphsReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/graphs/{id}/][%d] extrasGraphsReadOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasGraphsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Graph)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_parameters.go
new file mode 100644
index 0000000..e7979ba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasGraphsUpdateParams creates a new ExtrasGraphsUpdateParams object
+// with the default values initialized.
+func NewExtrasGraphsUpdateParams() *ExtrasGraphsUpdateParams {
+ var ()
+ return &ExtrasGraphsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasGraphsUpdateParamsWithTimeout creates a new ExtrasGraphsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasGraphsUpdateParamsWithTimeout(timeout time.Duration) *ExtrasGraphsUpdateParams {
+ var ()
+ return &ExtrasGraphsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasGraphsUpdateParamsWithContext creates a new ExtrasGraphsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasGraphsUpdateParamsWithContext(ctx context.Context) *ExtrasGraphsUpdateParams {
+ var ()
+ return &ExtrasGraphsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasGraphsUpdateParamsWithHTTPClient creates a new ExtrasGraphsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasGraphsUpdateParamsWithHTTPClient(client *http.Client) *ExtrasGraphsUpdateParams {
+ var ()
+ return &ExtrasGraphsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasGraphsUpdateParams contains all the parameters to send to the API endpoint
+for the extras graphs update operation typically these are written to a http.Request
+*/
+type ExtrasGraphsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableGraph
+ /*ID
+ A unique integer value identifying this graph.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) WithTimeout(timeout time.Duration) *ExtrasGraphsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) WithContext(ctx context.Context) *ExtrasGraphsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) WithHTTPClient(client *http.Client) *ExtrasGraphsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) WithData(data *models.WritableGraph) *ExtrasGraphsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) SetData(data *models.WritableGraph) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) WithID(id int64) *ExtrasGraphsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras graphs update params
+func (o *ExtrasGraphsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasGraphsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_responses.go
new file mode 100644
index 0000000..b35e3e0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_graphs_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasGraphsUpdateReader is a Reader for the ExtrasGraphsUpdate structure.
+type ExtrasGraphsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasGraphsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasGraphsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasGraphsUpdateOK creates a ExtrasGraphsUpdateOK with default headers values
+func NewExtrasGraphsUpdateOK() *ExtrasGraphsUpdateOK {
+ return &ExtrasGraphsUpdateOK{}
+}
+
+/*ExtrasGraphsUpdateOK handles this case with default header values.
+
+ExtrasGraphsUpdateOK extras graphs update o k
+*/
+type ExtrasGraphsUpdateOK struct {
+ Payload *models.WritableGraph
+}
+
+func (o *ExtrasGraphsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /extras/graphs/{id}/][%d] extrasGraphsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasGraphsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableGraph)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_parameters.go
new file mode 100644
index 0000000..bf1ba48
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasImageAttachmentsCreateParams creates a new ExtrasImageAttachmentsCreateParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsCreateParams() *ExtrasImageAttachmentsCreateParams {
+ var ()
+ return &ExtrasImageAttachmentsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsCreateParamsWithTimeout creates a new ExtrasImageAttachmentsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsCreateParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsCreateParams {
+ var ()
+ return &ExtrasImageAttachmentsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsCreateParamsWithContext creates a new ExtrasImageAttachmentsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsCreateParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsCreateParams {
+ var ()
+ return &ExtrasImageAttachmentsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsCreateParamsWithHTTPClient creates a new ExtrasImageAttachmentsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsCreateParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsCreateParams {
+ var ()
+ return &ExtrasImageAttachmentsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsCreateParams contains all the parameters to send to the API endpoint
+for the extras image attachments create operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableImageAttachment
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) WithData(data *models.WritableImageAttachment) *ExtrasImageAttachmentsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras image attachments create params
+func (o *ExtrasImageAttachmentsCreateParams) SetData(data *models.WritableImageAttachment) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_responses.go
new file mode 100644
index 0000000..844cd7e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasImageAttachmentsCreateReader is a Reader for the ExtrasImageAttachmentsCreate structure.
+type ExtrasImageAttachmentsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewExtrasImageAttachmentsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsCreateCreated creates a ExtrasImageAttachmentsCreateCreated with default headers values
+func NewExtrasImageAttachmentsCreateCreated() *ExtrasImageAttachmentsCreateCreated {
+ return &ExtrasImageAttachmentsCreateCreated{}
+}
+
+/*ExtrasImageAttachmentsCreateCreated handles this case with default header values.
+
+ExtrasImageAttachmentsCreateCreated extras image attachments create created
+*/
+type ExtrasImageAttachmentsCreateCreated struct {
+ Payload *models.WritableImageAttachment
+}
+
+func (o *ExtrasImageAttachmentsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /extras/image-attachments/][%d] extrasImageAttachmentsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *ExtrasImageAttachmentsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableImageAttachment)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_parameters.go
new file mode 100644
index 0000000..11046c6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasImageAttachmentsDeleteParams creates a new ExtrasImageAttachmentsDeleteParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsDeleteParams() *ExtrasImageAttachmentsDeleteParams {
+ var ()
+ return &ExtrasImageAttachmentsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsDeleteParamsWithTimeout creates a new ExtrasImageAttachmentsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsDeleteParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsDeleteParams {
+ var ()
+ return &ExtrasImageAttachmentsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsDeleteParamsWithContext creates a new ExtrasImageAttachmentsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsDeleteParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsDeleteParams {
+ var ()
+ return &ExtrasImageAttachmentsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsDeleteParamsWithHTTPClient creates a new ExtrasImageAttachmentsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsDeleteParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsDeleteParams {
+ var ()
+ return &ExtrasImageAttachmentsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsDeleteParams contains all the parameters to send to the API endpoint
+for the extras image attachments delete operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this image attachment.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) WithID(id int64) *ExtrasImageAttachmentsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras image attachments delete params
+func (o *ExtrasImageAttachmentsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_responses.go
new file mode 100644
index 0000000..97c2ea0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasImageAttachmentsDeleteReader is a Reader for the ExtrasImageAttachmentsDelete structure.
+type ExtrasImageAttachmentsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewExtrasImageAttachmentsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsDeleteNoContent creates a ExtrasImageAttachmentsDeleteNoContent with default headers values
+func NewExtrasImageAttachmentsDeleteNoContent() *ExtrasImageAttachmentsDeleteNoContent {
+ return &ExtrasImageAttachmentsDeleteNoContent{}
+}
+
+/*ExtrasImageAttachmentsDeleteNoContent handles this case with default header values.
+
+ExtrasImageAttachmentsDeleteNoContent extras image attachments delete no content
+*/
+type ExtrasImageAttachmentsDeleteNoContent struct {
+}
+
+func (o *ExtrasImageAttachmentsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /extras/image-attachments/{id}/][%d] extrasImageAttachmentsDeleteNoContent ", 204)
+}
+
+func (o *ExtrasImageAttachmentsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_parameters.go
new file mode 100644
index 0000000..93db4f9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_parameters.go
@@ -0,0 +1,195 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasImageAttachmentsListParams creates a new ExtrasImageAttachmentsListParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsListParams() *ExtrasImageAttachmentsListParams {
+ var ()
+ return &ExtrasImageAttachmentsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsListParamsWithTimeout creates a new ExtrasImageAttachmentsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsListParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsListParams {
+ var ()
+ return &ExtrasImageAttachmentsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsListParamsWithContext creates a new ExtrasImageAttachmentsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsListParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsListParams {
+ var ()
+ return &ExtrasImageAttachmentsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsListParamsWithHTTPClient creates a new ExtrasImageAttachmentsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsListParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsListParams {
+ var ()
+ return &ExtrasImageAttachmentsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsListParams contains all the parameters to send to the API endpoint
+for the extras image attachments list operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) WithLimit(limit *int64) *ExtrasImageAttachmentsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) WithOffset(offset *int64) *ExtrasImageAttachmentsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the extras image attachments list params
+func (o *ExtrasImageAttachmentsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_responses.go
new file mode 100644
index 0000000..4448134
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasImageAttachmentsListReader is a Reader for the ExtrasImageAttachmentsList structure.
+type ExtrasImageAttachmentsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasImageAttachmentsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsListOK creates a ExtrasImageAttachmentsListOK with default headers values
+func NewExtrasImageAttachmentsListOK() *ExtrasImageAttachmentsListOK {
+ return &ExtrasImageAttachmentsListOK{}
+}
+
+/*ExtrasImageAttachmentsListOK handles this case with default header values.
+
+ExtrasImageAttachmentsListOK extras image attachments list o k
+*/
+type ExtrasImageAttachmentsListOK struct {
+ Payload *models.ExtrasImageAttachmentsListOKBody
+}
+
+func (o *ExtrasImageAttachmentsListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/image-attachments/][%d] extrasImageAttachmentsListOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasImageAttachmentsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExtrasImageAttachmentsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_parameters.go
new file mode 100644
index 0000000..ff257c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasImageAttachmentsPartialUpdateParams creates a new ExtrasImageAttachmentsPartialUpdateParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsPartialUpdateParams() *ExtrasImageAttachmentsPartialUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsPartialUpdateParamsWithTimeout creates a new ExtrasImageAttachmentsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsPartialUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsPartialUpdateParamsWithContext creates a new ExtrasImageAttachmentsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsPartialUpdateParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsPartialUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsPartialUpdateParamsWithHTTPClient creates a new ExtrasImageAttachmentsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsPartialUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the extras image attachments partial update operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableImageAttachment
+ /*ID
+ A unique integer value identifying this image attachment.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WithData(data *models.WritableImageAttachment) *ExtrasImageAttachmentsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) SetData(data *models.WritableImageAttachment) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WithID(id int64) *ExtrasImageAttachmentsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras image attachments partial update params
+func (o *ExtrasImageAttachmentsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_responses.go
new file mode 100644
index 0000000..241f597
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasImageAttachmentsPartialUpdateReader is a Reader for the ExtrasImageAttachmentsPartialUpdate structure.
+type ExtrasImageAttachmentsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasImageAttachmentsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsPartialUpdateOK creates a ExtrasImageAttachmentsPartialUpdateOK with default headers values
+func NewExtrasImageAttachmentsPartialUpdateOK() *ExtrasImageAttachmentsPartialUpdateOK {
+ return &ExtrasImageAttachmentsPartialUpdateOK{}
+}
+
+/*ExtrasImageAttachmentsPartialUpdateOK handles this case with default header values.
+
+ExtrasImageAttachmentsPartialUpdateOK extras image attachments partial update o k
+*/
+type ExtrasImageAttachmentsPartialUpdateOK struct {
+ Payload *models.WritableImageAttachment
+}
+
+func (o *ExtrasImageAttachmentsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /extras/image-attachments/{id}/][%d] extrasImageAttachmentsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasImageAttachmentsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableImageAttachment)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_parameters.go
new file mode 100644
index 0000000..57fab5b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasImageAttachmentsReadParams creates a new ExtrasImageAttachmentsReadParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsReadParams() *ExtrasImageAttachmentsReadParams {
+ var ()
+ return &ExtrasImageAttachmentsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsReadParamsWithTimeout creates a new ExtrasImageAttachmentsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsReadParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsReadParams {
+ var ()
+ return &ExtrasImageAttachmentsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsReadParamsWithContext creates a new ExtrasImageAttachmentsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsReadParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsReadParams {
+ var ()
+ return &ExtrasImageAttachmentsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsReadParamsWithHTTPClient creates a new ExtrasImageAttachmentsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsReadParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsReadParams {
+ var ()
+ return &ExtrasImageAttachmentsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsReadParams contains all the parameters to send to the API endpoint
+for the extras image attachments read operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this image attachment.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) WithID(id int64) *ExtrasImageAttachmentsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras image attachments read params
+func (o *ExtrasImageAttachmentsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_responses.go
new file mode 100644
index 0000000..5c57259
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasImageAttachmentsReadReader is a Reader for the ExtrasImageAttachmentsRead structure.
+type ExtrasImageAttachmentsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasImageAttachmentsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsReadOK creates a ExtrasImageAttachmentsReadOK with default headers values
+func NewExtrasImageAttachmentsReadOK() *ExtrasImageAttachmentsReadOK {
+ return &ExtrasImageAttachmentsReadOK{}
+}
+
+/*ExtrasImageAttachmentsReadOK handles this case with default header values.
+
+ExtrasImageAttachmentsReadOK extras image attachments read o k
+*/
+type ExtrasImageAttachmentsReadOK struct {
+ Payload *models.ImageAttachment
+}
+
+func (o *ExtrasImageAttachmentsReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/image-attachments/{id}/][%d] extrasImageAttachmentsReadOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasImageAttachmentsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ImageAttachment)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_parameters.go
new file mode 100644
index 0000000..2e68d13
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasImageAttachmentsUpdateParams creates a new ExtrasImageAttachmentsUpdateParams object
+// with the default values initialized.
+func NewExtrasImageAttachmentsUpdateParams() *ExtrasImageAttachmentsUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasImageAttachmentsUpdateParamsWithTimeout creates a new ExtrasImageAttachmentsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasImageAttachmentsUpdateParamsWithTimeout(timeout time.Duration) *ExtrasImageAttachmentsUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasImageAttachmentsUpdateParamsWithContext creates a new ExtrasImageAttachmentsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasImageAttachmentsUpdateParamsWithContext(ctx context.Context) *ExtrasImageAttachmentsUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasImageAttachmentsUpdateParamsWithHTTPClient creates a new ExtrasImageAttachmentsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasImageAttachmentsUpdateParamsWithHTTPClient(client *http.Client) *ExtrasImageAttachmentsUpdateParams {
+ var ()
+ return &ExtrasImageAttachmentsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasImageAttachmentsUpdateParams contains all the parameters to send to the API endpoint
+for the extras image attachments update operation typically these are written to a http.Request
+*/
+type ExtrasImageAttachmentsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableImageAttachment
+ /*ID
+ A unique integer value identifying this image attachment.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) WithTimeout(timeout time.Duration) *ExtrasImageAttachmentsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) WithContext(ctx context.Context) *ExtrasImageAttachmentsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) WithHTTPClient(client *http.Client) *ExtrasImageAttachmentsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) WithData(data *models.WritableImageAttachment) *ExtrasImageAttachmentsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) SetData(data *models.WritableImageAttachment) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) WithID(id int64) *ExtrasImageAttachmentsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras image attachments update params
+func (o *ExtrasImageAttachmentsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasImageAttachmentsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_responses.go
new file mode 100644
index 0000000..bfd348d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_image_attachments_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasImageAttachmentsUpdateReader is a Reader for the ExtrasImageAttachmentsUpdate structure.
+type ExtrasImageAttachmentsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasImageAttachmentsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasImageAttachmentsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasImageAttachmentsUpdateOK creates a ExtrasImageAttachmentsUpdateOK with default headers values
+func NewExtrasImageAttachmentsUpdateOK() *ExtrasImageAttachmentsUpdateOK {
+ return &ExtrasImageAttachmentsUpdateOK{}
+}
+
+/*ExtrasImageAttachmentsUpdateOK handles this case with default header values.
+
+ExtrasImageAttachmentsUpdateOK extras image attachments update o k
+*/
+type ExtrasImageAttachmentsUpdateOK struct {
+ Payload *models.WritableImageAttachment
+}
+
+func (o *ExtrasImageAttachmentsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /extras/image-attachments/{id}/][%d] extrasImageAttachmentsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasImageAttachmentsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableImageAttachment)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_parameters.go
new file mode 100644
index 0000000..151f40a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasRecentActivityListParams creates a new ExtrasRecentActivityListParams object
+// with the default values initialized.
+func NewExtrasRecentActivityListParams() *ExtrasRecentActivityListParams {
+ var ()
+ return &ExtrasRecentActivityListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasRecentActivityListParamsWithTimeout creates a new ExtrasRecentActivityListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasRecentActivityListParamsWithTimeout(timeout time.Duration) *ExtrasRecentActivityListParams {
+ var ()
+ return &ExtrasRecentActivityListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasRecentActivityListParamsWithContext creates a new ExtrasRecentActivityListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasRecentActivityListParamsWithContext(ctx context.Context) *ExtrasRecentActivityListParams {
+ var ()
+ return &ExtrasRecentActivityListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasRecentActivityListParamsWithHTTPClient creates a new ExtrasRecentActivityListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasRecentActivityListParamsWithHTTPClient(client *http.Client) *ExtrasRecentActivityListParams {
+ var ()
+ return &ExtrasRecentActivityListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasRecentActivityListParams contains all the parameters to send to the API endpoint
+for the extras recent activity list operation typically these are written to a http.Request
+*/
+type ExtrasRecentActivityListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*User*/
+ User *string
+ /*Username*/
+ Username *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithTimeout(timeout time.Duration) *ExtrasRecentActivityListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithContext(ctx context.Context) *ExtrasRecentActivityListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithHTTPClient(client *http.Client) *ExtrasRecentActivityListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithLimit(limit *int64) *ExtrasRecentActivityListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithOffset(offset *int64) *ExtrasRecentActivityListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithUser adds the user to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithUser(user *string) *ExtrasRecentActivityListParams {
+ o.SetUser(user)
+ return o
+}
+
+// SetUser adds the user to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetUser(user *string) {
+ o.User = user
+}
+
+// WithUsername adds the username to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) WithUsername(username *string) *ExtrasRecentActivityListParams {
+ o.SetUsername(username)
+ return o
+}
+
+// SetUsername adds the username to the extras recent activity list params
+func (o *ExtrasRecentActivityListParams) SetUsername(username *string) {
+ o.Username = username
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasRecentActivityListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.User != nil {
+
+ // query param user
+ var qrUser string
+ if o.User != nil {
+ qrUser = *o.User
+ }
+ qUser := qrUser
+ if qUser != "" {
+ if err := r.SetQueryParam("user", qUser); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Username != nil {
+
+ // query param username
+ var qrUsername string
+ if o.Username != nil {
+ qrUsername = *o.Username
+ }
+ qUsername := qrUsername
+ if qUsername != "" {
+ if err := r.SetQueryParam("username", qUsername); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_responses.go
new file mode 100644
index 0000000..39b2e3c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasRecentActivityListReader is a Reader for the ExtrasRecentActivityList structure.
+type ExtrasRecentActivityListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasRecentActivityListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasRecentActivityListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasRecentActivityListOK creates a ExtrasRecentActivityListOK with default headers values
+func NewExtrasRecentActivityListOK() *ExtrasRecentActivityListOK {
+ return &ExtrasRecentActivityListOK{}
+}
+
+/*ExtrasRecentActivityListOK handles this case with default header values.
+
+ExtrasRecentActivityListOK extras recent activity list o k
+*/
+type ExtrasRecentActivityListOK struct {
+ Payload *models.ExtrasRecentActivityListOKBody
+}
+
+func (o *ExtrasRecentActivityListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/recent-activity/][%d] extrasRecentActivityListOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasRecentActivityListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExtrasRecentActivityListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_parameters.go
new file mode 100644
index 0000000..036a5df
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasRecentActivityReadParams creates a new ExtrasRecentActivityReadParams object
+// with the default values initialized.
+func NewExtrasRecentActivityReadParams() *ExtrasRecentActivityReadParams {
+ var ()
+ return &ExtrasRecentActivityReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasRecentActivityReadParamsWithTimeout creates a new ExtrasRecentActivityReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasRecentActivityReadParamsWithTimeout(timeout time.Duration) *ExtrasRecentActivityReadParams {
+ var ()
+ return &ExtrasRecentActivityReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasRecentActivityReadParamsWithContext creates a new ExtrasRecentActivityReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasRecentActivityReadParamsWithContext(ctx context.Context) *ExtrasRecentActivityReadParams {
+ var ()
+ return &ExtrasRecentActivityReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasRecentActivityReadParamsWithHTTPClient creates a new ExtrasRecentActivityReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasRecentActivityReadParamsWithHTTPClient(client *http.Client) *ExtrasRecentActivityReadParams {
+ var ()
+ return &ExtrasRecentActivityReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasRecentActivityReadParams contains all the parameters to send to the API endpoint
+for the extras recent activity read operation typically these are written to a http.Request
+*/
+type ExtrasRecentActivityReadParams struct {
+
+ /*ID
+ A unique integer value identifying this user action.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) WithTimeout(timeout time.Duration) *ExtrasRecentActivityReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) WithContext(ctx context.Context) *ExtrasRecentActivityReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) WithHTTPClient(client *http.Client) *ExtrasRecentActivityReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) WithID(id int64) *ExtrasRecentActivityReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras recent activity read params
+func (o *ExtrasRecentActivityReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasRecentActivityReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_responses.go
new file mode 100644
index 0000000..9efb16a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_recent_activity_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasRecentActivityReadReader is a Reader for the ExtrasRecentActivityRead structure.
+type ExtrasRecentActivityReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasRecentActivityReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasRecentActivityReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasRecentActivityReadOK creates a ExtrasRecentActivityReadOK with default headers values
+func NewExtrasRecentActivityReadOK() *ExtrasRecentActivityReadOK {
+ return &ExtrasRecentActivityReadOK{}
+}
+
+/*ExtrasRecentActivityReadOK handles this case with default header values.
+
+ExtrasRecentActivityReadOK extras recent activity read o k
+*/
+type ExtrasRecentActivityReadOK struct {
+ Payload *models.UserAction
+}
+
+func (o *ExtrasRecentActivityReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/recent-activity/{id}/][%d] extrasRecentActivityReadOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasRecentActivityReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.UserAction)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_parameters.go
new file mode 100644
index 0000000..0935c06
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasTopologyMapsCreateParams creates a new ExtrasTopologyMapsCreateParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsCreateParams() *ExtrasTopologyMapsCreateParams {
+ var ()
+ return &ExtrasTopologyMapsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsCreateParamsWithTimeout creates a new ExtrasTopologyMapsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsCreateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsCreateParams {
+ var ()
+ return &ExtrasTopologyMapsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsCreateParamsWithContext creates a new ExtrasTopologyMapsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsCreateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsCreateParams {
+ var ()
+ return &ExtrasTopologyMapsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsCreateParamsWithHTTPClient creates a new ExtrasTopologyMapsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsCreateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsCreateParams {
+ var ()
+ return &ExtrasTopologyMapsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsCreateParams contains all the parameters to send to the API endpoint
+for the extras topology maps create operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableTopologyMap
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras topology maps create params
+func (o *ExtrasTopologyMapsCreateParams) SetData(data *models.WritableTopologyMap) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_responses.go
new file mode 100644
index 0000000..a1b92be
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsCreateReader is a Reader for the ExtrasTopologyMapsCreate structure.
+type ExtrasTopologyMapsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewExtrasTopologyMapsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsCreateCreated creates a ExtrasTopologyMapsCreateCreated with default headers values
+func NewExtrasTopologyMapsCreateCreated() *ExtrasTopologyMapsCreateCreated {
+ return &ExtrasTopologyMapsCreateCreated{}
+}
+
+/*ExtrasTopologyMapsCreateCreated handles this case with default header values.
+
+ExtrasTopologyMapsCreateCreated extras topology maps create created
+*/
+type ExtrasTopologyMapsCreateCreated struct {
+ Payload *models.WritableTopologyMap
+}
+
+func (o *ExtrasTopologyMapsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /extras/topology-maps/][%d] extrasTopologyMapsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTopologyMap)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_parameters.go
new file mode 100644
index 0000000..ddb6ea4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasTopologyMapsDeleteParams creates a new ExtrasTopologyMapsDeleteParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsDeleteParams() *ExtrasTopologyMapsDeleteParams {
+ var ()
+ return &ExtrasTopologyMapsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsDeleteParamsWithTimeout creates a new ExtrasTopologyMapsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsDeleteParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsDeleteParams {
+ var ()
+ return &ExtrasTopologyMapsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsDeleteParamsWithContext creates a new ExtrasTopologyMapsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsDeleteParamsWithContext(ctx context.Context) *ExtrasTopologyMapsDeleteParams {
+ var ()
+ return &ExtrasTopologyMapsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsDeleteParamsWithHTTPClient creates a new ExtrasTopologyMapsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsDeleteParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsDeleteParams {
+ var ()
+ return &ExtrasTopologyMapsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsDeleteParams contains all the parameters to send to the API endpoint
+for the extras topology maps delete operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this topology map.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) WithContext(ctx context.Context) *ExtrasTopologyMapsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) WithID(id int64) *ExtrasTopologyMapsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras topology maps delete params
+func (o *ExtrasTopologyMapsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_responses.go
new file mode 100644
index 0000000..460e489
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// ExtrasTopologyMapsDeleteReader is a Reader for the ExtrasTopologyMapsDelete structure.
+type ExtrasTopologyMapsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewExtrasTopologyMapsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsDeleteNoContent creates a ExtrasTopologyMapsDeleteNoContent with default headers values
+func NewExtrasTopologyMapsDeleteNoContent() *ExtrasTopologyMapsDeleteNoContent {
+ return &ExtrasTopologyMapsDeleteNoContent{}
+}
+
+/*ExtrasTopologyMapsDeleteNoContent handles this case with default header values.
+
+ExtrasTopologyMapsDeleteNoContent extras topology maps delete no content
+*/
+type ExtrasTopologyMapsDeleteNoContent struct {
+}
+
+func (o *ExtrasTopologyMapsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /extras/topology-maps/{id}/][%d] extrasTopologyMapsDeleteNoContent ", 204)
+}
+
+func (o *ExtrasTopologyMapsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_parameters.go
new file mode 100644
index 0000000..45c0274
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasTopologyMapsListParams creates a new ExtrasTopologyMapsListParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsListParams() *ExtrasTopologyMapsListParams {
+ var ()
+ return &ExtrasTopologyMapsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsListParamsWithTimeout creates a new ExtrasTopologyMapsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsListParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsListParams {
+ var ()
+ return &ExtrasTopologyMapsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsListParamsWithContext creates a new ExtrasTopologyMapsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsListParamsWithContext(ctx context.Context) *ExtrasTopologyMapsListParams {
+ var ()
+ return &ExtrasTopologyMapsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsListParamsWithHTTPClient creates a new ExtrasTopologyMapsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsListParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsListParams {
+ var ()
+ return &ExtrasTopologyMapsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsListParams contains all the parameters to send to the API endpoint
+for the extras topology maps list operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithContext(ctx context.Context) *ExtrasTopologyMapsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithLimit(limit *int64) *ExtrasTopologyMapsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithName(name *string) *ExtrasTopologyMapsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithOffset(offset *int64) *ExtrasTopologyMapsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithSite(site *string) *ExtrasTopologyMapsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithSiteID(siteID *string) *ExtrasTopologyMapsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithSlug adds the slug to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) WithSlug(slug *string) *ExtrasTopologyMapsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the extras topology maps list params
+func (o *ExtrasTopologyMapsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_responses.go
new file mode 100644
index 0000000..3ae731d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsListReader is a Reader for the ExtrasTopologyMapsList structure.
+type ExtrasTopologyMapsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasTopologyMapsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsListOK creates a ExtrasTopologyMapsListOK with default headers values
+func NewExtrasTopologyMapsListOK() *ExtrasTopologyMapsListOK {
+ return &ExtrasTopologyMapsListOK{}
+}
+
+/*ExtrasTopologyMapsListOK handles this case with default header values.
+
+ExtrasTopologyMapsListOK extras topology maps list o k
+*/
+type ExtrasTopologyMapsListOK struct {
+ Payload *models.ExtrasTopologyMapsListOKBody
+}
+
+func (o *ExtrasTopologyMapsListOK) Error() string {
+ return fmt.Sprintf("[GET /extras/topology-maps/][%d] extrasTopologyMapsListOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ExtrasTopologyMapsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_parameters.go
new file mode 100644
index 0000000..9aa8287
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasTopologyMapsPartialUpdateParams creates a new ExtrasTopologyMapsPartialUpdateParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsPartialUpdateParams() *ExtrasTopologyMapsPartialUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsPartialUpdateParamsWithTimeout creates a new ExtrasTopologyMapsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsPartialUpdateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsPartialUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsPartialUpdateParamsWithContext creates a new ExtrasTopologyMapsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsPartialUpdateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsPartialUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsPartialUpdateParamsWithHTTPClient creates a new ExtrasTopologyMapsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsPartialUpdateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsPartialUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the extras topology maps partial update operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableTopologyMap
+ /*ID
+ A unique integer value identifying this topology map.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) SetData(data *models.WritableTopologyMap) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) WithID(id int64) *ExtrasTopologyMapsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras topology maps partial update params
+func (o *ExtrasTopologyMapsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_responses.go
new file mode 100644
index 0000000..848f860
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsPartialUpdateReader is a Reader for the ExtrasTopologyMapsPartialUpdate structure.
+type ExtrasTopologyMapsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasTopologyMapsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsPartialUpdateOK creates a ExtrasTopologyMapsPartialUpdateOK with default headers values
+func NewExtrasTopologyMapsPartialUpdateOK() *ExtrasTopologyMapsPartialUpdateOK {
+ return &ExtrasTopologyMapsPartialUpdateOK{}
+}
+
+/*ExtrasTopologyMapsPartialUpdateOK handles this case with default header values.
+
+ExtrasTopologyMapsPartialUpdateOK extras topology maps partial update o k
+*/
+type ExtrasTopologyMapsPartialUpdateOK struct {
+ Payload *models.WritableTopologyMap
+}
+
+func (o *ExtrasTopologyMapsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /extras/topology-maps/{id}/][%d] extrasTopologyMapsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTopologyMap)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_parameters.go
new file mode 100644
index 0000000..5e91d09
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasTopologyMapsReadParams creates a new ExtrasTopologyMapsReadParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsReadParams() *ExtrasTopologyMapsReadParams {
+ var ()
+ return &ExtrasTopologyMapsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsReadParamsWithTimeout creates a new ExtrasTopologyMapsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsReadParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsReadParams {
+ var ()
+ return &ExtrasTopologyMapsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsReadParamsWithContext creates a new ExtrasTopologyMapsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsReadParamsWithContext(ctx context.Context) *ExtrasTopologyMapsReadParams {
+ var ()
+ return &ExtrasTopologyMapsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsReadParamsWithHTTPClient creates a new ExtrasTopologyMapsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsReadParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsReadParams {
+ var ()
+ return &ExtrasTopologyMapsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsReadParams contains all the parameters to send to the API endpoint
+for the extras topology maps read operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this topology map.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) WithContext(ctx context.Context) *ExtrasTopologyMapsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) WithID(id int64) *ExtrasTopologyMapsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras topology maps read params
+func (o *ExtrasTopologyMapsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_responses.go
new file mode 100644
index 0000000..c9a95f4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsReadReader is a Reader for the ExtrasTopologyMapsRead structure.
+type ExtrasTopologyMapsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasTopologyMapsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsReadOK creates a ExtrasTopologyMapsReadOK with default headers values
+func NewExtrasTopologyMapsReadOK() *ExtrasTopologyMapsReadOK {
+ return &ExtrasTopologyMapsReadOK{}
+}
+
+/*ExtrasTopologyMapsReadOK handles this case with default header values.
+
+ExtrasTopologyMapsReadOK extras topology maps read o k
+*/
+type ExtrasTopologyMapsReadOK struct {
+ Payload *models.TopologyMap
+}
+
+func (o *ExtrasTopologyMapsReadOK) Error() string {
+ return fmt.Sprintf("[GET /extras/topology-maps/{id}/][%d] extrasTopologyMapsReadOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TopologyMap)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_parameters.go
new file mode 100644
index 0000000..fd22e4e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewExtrasTopologyMapsRenderParams creates a new ExtrasTopologyMapsRenderParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsRenderParams() *ExtrasTopologyMapsRenderParams {
+ var ()
+ return &ExtrasTopologyMapsRenderParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsRenderParamsWithTimeout creates a new ExtrasTopologyMapsRenderParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsRenderParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsRenderParams {
+ var ()
+ return &ExtrasTopologyMapsRenderParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsRenderParamsWithContext creates a new ExtrasTopologyMapsRenderParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsRenderParamsWithContext(ctx context.Context) *ExtrasTopologyMapsRenderParams {
+ var ()
+ return &ExtrasTopologyMapsRenderParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsRenderParamsWithHTTPClient creates a new ExtrasTopologyMapsRenderParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsRenderParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsRenderParams {
+ var ()
+ return &ExtrasTopologyMapsRenderParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsRenderParams contains all the parameters to send to the API endpoint
+for the extras topology maps render operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsRenderParams struct {
+
+ /*ID
+ A unique integer value identifying this topology map.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsRenderParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) WithContext(ctx context.Context) *ExtrasTopologyMapsRenderParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsRenderParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) WithID(id int64) *ExtrasTopologyMapsRenderParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras topology maps render params
+func (o *ExtrasTopologyMapsRenderParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsRenderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_responses.go
new file mode 100644
index 0000000..6d7ebdf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_render_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsRenderReader is a Reader for the ExtrasTopologyMapsRender structure.
+type ExtrasTopologyMapsRenderReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsRenderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasTopologyMapsRenderOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsRenderOK creates a ExtrasTopologyMapsRenderOK with default headers values
+func NewExtrasTopologyMapsRenderOK() *ExtrasTopologyMapsRenderOK {
+ return &ExtrasTopologyMapsRenderOK{}
+}
+
+/*ExtrasTopologyMapsRenderOK handles this case with default header values.
+
+ExtrasTopologyMapsRenderOK extras topology maps render o k
+*/
+type ExtrasTopologyMapsRenderOK struct {
+ Payload *models.TopologyMap
+}
+
+func (o *ExtrasTopologyMapsRenderOK) Error() string {
+ return fmt.Sprintf("[GET /extras/topology-maps/{id}/render/][%d] extrasTopologyMapsRenderOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsRenderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TopologyMap)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_parameters.go
new file mode 100644
index 0000000..f671e0f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewExtrasTopologyMapsUpdateParams creates a new ExtrasTopologyMapsUpdateParams object
+// with the default values initialized.
+func NewExtrasTopologyMapsUpdateParams() *ExtrasTopologyMapsUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewExtrasTopologyMapsUpdateParamsWithTimeout creates a new ExtrasTopologyMapsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewExtrasTopologyMapsUpdateParamsWithTimeout(timeout time.Duration) *ExtrasTopologyMapsUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewExtrasTopologyMapsUpdateParamsWithContext creates a new ExtrasTopologyMapsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewExtrasTopologyMapsUpdateParamsWithContext(ctx context.Context) *ExtrasTopologyMapsUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewExtrasTopologyMapsUpdateParamsWithHTTPClient creates a new ExtrasTopologyMapsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewExtrasTopologyMapsUpdateParamsWithHTTPClient(client *http.Client) *ExtrasTopologyMapsUpdateParams {
+ var ()
+ return &ExtrasTopologyMapsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*ExtrasTopologyMapsUpdateParams contains all the parameters to send to the API endpoint
+for the extras topology maps update operation typically these are written to a http.Request
+*/
+type ExtrasTopologyMapsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableTopologyMap
+ /*ID
+ A unique integer value identifying this topology map.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) WithTimeout(timeout time.Duration) *ExtrasTopologyMapsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) WithContext(ctx context.Context) *ExtrasTopologyMapsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) WithHTTPClient(client *http.Client) *ExtrasTopologyMapsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) WithData(data *models.WritableTopologyMap) *ExtrasTopologyMapsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) SetData(data *models.WritableTopologyMap) {
+ o.Data = data
+}
+
+// WithID adds the id to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) WithID(id int64) *ExtrasTopologyMapsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the extras topology maps update params
+func (o *ExtrasTopologyMapsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *ExtrasTopologyMapsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_responses.go
new file mode 100644
index 0000000..167ae82
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/extras/extras_topology_maps_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package extras
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// ExtrasTopologyMapsUpdateReader is a Reader for the ExtrasTopologyMapsUpdate structure.
+type ExtrasTopologyMapsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *ExtrasTopologyMapsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewExtrasTopologyMapsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewExtrasTopologyMapsUpdateOK creates a ExtrasTopologyMapsUpdateOK with default headers values
+func NewExtrasTopologyMapsUpdateOK() *ExtrasTopologyMapsUpdateOK {
+ return &ExtrasTopologyMapsUpdateOK{}
+}
+
+/*ExtrasTopologyMapsUpdateOK handles this case with default header values.
+
+ExtrasTopologyMapsUpdateOK extras topology maps update o k
+*/
+type ExtrasTopologyMapsUpdateOK struct {
+ Payload *models.WritableTopologyMap
+}
+
+func (o *ExtrasTopologyMapsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /extras/topology-maps/{id}/][%d] extrasTopologyMapsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *ExtrasTopologyMapsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTopologyMap)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_am_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_am_client.go
new file mode 100644
index 0000000..a3a36f4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_am_client.go
@@ -0,0 +1,1788 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new ipam API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for ipam API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+IPAMChoicesList ipam choices list API
+*/
+func (a *Client) IPAMChoicesList(params *IPAMChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam__choices_list",
+ Method: "GET",
+ PathPattern: "/ipam/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMChoicesListOK), nil
+
+}
+
+/*
+IPAMChoicesRead ipam choices read API
+*/
+func (a *Client) IPAMChoicesRead(params *IPAMChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam__choices_read",
+ Method: "GET",
+ PathPattern: "/ipam/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMChoicesReadOK), nil
+
+}
+
+/*
+IPAMAggregatesCreate ipam aggregates create API
+*/
+func (a *Client) IPAMAggregatesCreate(params *IPAMAggregatesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_create",
+ Method: "POST",
+ PathPattern: "/ipam/aggregates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesCreateCreated), nil
+
+}
+
+/*
+IPAMAggregatesDelete ipam aggregates delete API
+*/
+func (a *Client) IPAMAggregatesDelete(params *IPAMAggregatesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/aggregates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesDeleteNoContent), nil
+
+}
+
+/*
+IPAMAggregatesList ipam aggregates list API
+*/
+func (a *Client) IPAMAggregatesList(params *IPAMAggregatesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_list",
+ Method: "GET",
+ PathPattern: "/ipam/aggregates/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesListOK), nil
+
+}
+
+/*
+IPAMAggregatesPartialUpdate ipam aggregates partial update API
+*/
+func (a *Client) IPAMAggregatesPartialUpdate(params *IPAMAggregatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/aggregates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesPartialUpdateOK), nil
+
+}
+
+/*
+IPAMAggregatesRead ipam aggregates read API
+*/
+func (a *Client) IPAMAggregatesRead(params *IPAMAggregatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_read",
+ Method: "GET",
+ PathPattern: "/ipam/aggregates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesReadOK), nil
+
+}
+
+/*
+IPAMAggregatesUpdate ipam aggregates update API
+*/
+func (a *Client) IPAMAggregatesUpdate(params *IPAMAggregatesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMAggregatesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMAggregatesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_aggregates_update",
+ Method: "PUT",
+ PathPattern: "/ipam/aggregates/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMAggregatesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMAggregatesUpdateOK), nil
+
+}
+
+/*
+IPAMIPAddressesCreate ipam ip addresses create API
+*/
+func (a *Client) IPAMIPAddressesCreate(params *IPAMIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_create",
+ Method: "POST",
+ PathPattern: "/ipam/ip-addresses/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesCreateCreated), nil
+
+}
+
+/*
+IPAMIPAddressesDelete ipam ip addresses delete API
+*/
+func (a *Client) IPAMIPAddressesDelete(params *IPAMIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/ip-addresses/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesDeleteNoContent), nil
+
+}
+
+/*
+IPAMIPAddressesList ipam ip addresses list API
+*/
+func (a *Client) IPAMIPAddressesList(params *IPAMIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_list",
+ Method: "GET",
+ PathPattern: "/ipam/ip-addresses/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesListOK), nil
+
+}
+
+/*
+IPAMIPAddressesPartialUpdate ipam ip addresses partial update API
+*/
+func (a *Client) IPAMIPAddressesPartialUpdate(params *IPAMIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/ip-addresses/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesPartialUpdateOK), nil
+
+}
+
+/*
+IPAMIPAddressesRead ipam ip addresses read API
+*/
+func (a *Client) IPAMIPAddressesRead(params *IPAMIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_read",
+ Method: "GET",
+ PathPattern: "/ipam/ip-addresses/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesReadOK), nil
+
+}
+
+/*
+IPAMIPAddressesUpdate ipam ip addresses update API
+*/
+func (a *Client) IPAMIPAddressesUpdate(params *IPAMIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMIPAddressesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMIPAddressesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_ip-addresses_update",
+ Method: "PUT",
+ PathPattern: "/ipam/ip-addresses/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMIPAddressesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMIPAddressesUpdateOK), nil
+
+}
+
+/*
+IPAMPrefixesAvailableIpsCreate A convenience method for returning available IP addresses within a prefix. By default, the number of IPs
+returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,
+however results will not be paginated.
+*/
+func (a *Client) IPAMPrefixesAvailableIpsCreate(params *IPAMPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailableIpsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesAvailableIpsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_available-ips_create",
+ Method: "POST",
+ PathPattern: "/ipam/prefixes/{id}/available-ips/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesAvailableIpsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesAvailableIpsCreateCreated), nil
+
+}
+
+/*
+IPAMPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a prefix. By default, the number of IPs
+returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed,
+however results will not be paginated.
+*/
+func (a *Client) IPAMPrefixesAvailableIpsRead(params *IPAMPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailableIpsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesAvailableIpsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_available-ips_read",
+ Method: "GET",
+ PathPattern: "/ipam/prefixes/{id}/available-ips/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesAvailableIpsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesAvailableIpsReadOK), nil
+
+}
+
+/*
+IPAMPrefixesAvailablePrefixesCreate A convenience method for returning available child prefixes within a parent.
+*/
+func (a *Client) IPAMPrefixesAvailablePrefixesCreate(params *IPAMPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailablePrefixesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesAvailablePrefixesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_available-prefixes_create",
+ Method: "POST",
+ PathPattern: "/ipam/prefixes/{id}/available-prefixes/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesAvailablePrefixesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesAvailablePrefixesCreateCreated), nil
+
+}
+
+/*
+IPAMPrefixesAvailablePrefixesRead A convenience method for returning available child prefixes within a parent.
+*/
+func (a *Client) IPAMPrefixesAvailablePrefixesRead(params *IPAMPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesAvailablePrefixesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesAvailablePrefixesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_available-prefixes_read",
+ Method: "GET",
+ PathPattern: "/ipam/prefixes/{id}/available-prefixes/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesAvailablePrefixesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesAvailablePrefixesReadOK), nil
+
+}
+
+/*
+IPAMPrefixesCreate ipam prefixes create API
+*/
+func (a *Client) IPAMPrefixesCreate(params *IPAMPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_create",
+ Method: "POST",
+ PathPattern: "/ipam/prefixes/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesCreateCreated), nil
+
+}
+
+/*
+IPAMPrefixesDelete ipam prefixes delete API
+*/
+func (a *Client) IPAMPrefixesDelete(params *IPAMPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/prefixes/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesDeleteNoContent), nil
+
+}
+
+/*
+IPAMPrefixesList ipam prefixes list API
+*/
+func (a *Client) IPAMPrefixesList(params *IPAMPrefixesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_list",
+ Method: "GET",
+ PathPattern: "/ipam/prefixes/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesListOK), nil
+
+}
+
+/*
+IPAMPrefixesPartialUpdate ipam prefixes partial update API
+*/
+func (a *Client) IPAMPrefixesPartialUpdate(params *IPAMPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/prefixes/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesPartialUpdateOK), nil
+
+}
+
+/*
+IPAMPrefixesRead ipam prefixes read API
+*/
+func (a *Client) IPAMPrefixesRead(params *IPAMPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_read",
+ Method: "GET",
+ PathPattern: "/ipam/prefixes/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesReadOK), nil
+
+}
+
+/*
+IPAMPrefixesUpdate ipam prefixes update API
+*/
+func (a *Client) IPAMPrefixesUpdate(params *IPAMPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMPrefixesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMPrefixesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_prefixes_update",
+ Method: "PUT",
+ PathPattern: "/ipam/prefixes/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMPrefixesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMPrefixesUpdateOK), nil
+
+}
+
+/*
+IPAMRirsCreate ipam rirs create API
+*/
+func (a *Client) IPAMRirsCreate(params *IPAMRirsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_create",
+ Method: "POST",
+ PathPattern: "/ipam/rirs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsCreateCreated), nil
+
+}
+
+/*
+IPAMRirsDelete ipam rirs delete API
+*/
+func (a *Client) IPAMRirsDelete(params *IPAMRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/rirs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsDeleteNoContent), nil
+
+}
+
+/*
+IPAMRirsList ipam rirs list API
+*/
+func (a *Client) IPAMRirsList(params *IPAMRirsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_list",
+ Method: "GET",
+ PathPattern: "/ipam/rirs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsListOK), nil
+
+}
+
+/*
+IPAMRirsPartialUpdate ipam rirs partial update API
+*/
+func (a *Client) IPAMRirsPartialUpdate(params *IPAMRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/rirs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsPartialUpdateOK), nil
+
+}
+
+/*
+IPAMRirsRead ipam rirs read API
+*/
+func (a *Client) IPAMRirsRead(params *IPAMRirsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_read",
+ Method: "GET",
+ PathPattern: "/ipam/rirs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsReadOK), nil
+
+}
+
+/*
+IPAMRirsUpdate ipam rirs update API
+*/
+func (a *Client) IPAMRirsUpdate(params *IPAMRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRirsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRirsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_rirs_update",
+ Method: "PUT",
+ PathPattern: "/ipam/rirs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRirsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRirsUpdateOK), nil
+
+}
+
+/*
+IPAMRolesCreate ipam roles create API
+*/
+func (a *Client) IPAMRolesCreate(params *IPAMRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_create",
+ Method: "POST",
+ PathPattern: "/ipam/roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesCreateCreated), nil
+
+}
+
+/*
+IPAMRolesDelete ipam roles delete API
+*/
+func (a *Client) IPAMRolesDelete(params *IPAMRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesDeleteNoContent), nil
+
+}
+
+/*
+IPAMRolesList ipam roles list API
+*/
+func (a *Client) IPAMRolesList(params *IPAMRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_list",
+ Method: "GET",
+ PathPattern: "/ipam/roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesListOK), nil
+
+}
+
+/*
+IPAMRolesPartialUpdate ipam roles partial update API
+*/
+func (a *Client) IPAMRolesPartialUpdate(params *IPAMRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesPartialUpdateOK), nil
+
+}
+
+/*
+IPAMRolesRead ipam roles read API
+*/
+func (a *Client) IPAMRolesRead(params *IPAMRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_read",
+ Method: "GET",
+ PathPattern: "/ipam/roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesReadOK), nil
+
+}
+
+/*
+IPAMRolesUpdate ipam roles update API
+*/
+func (a *Client) IPAMRolesUpdate(params *IPAMRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMRolesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMRolesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_roles_update",
+ Method: "PUT",
+ PathPattern: "/ipam/roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMRolesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMRolesUpdateOK), nil
+
+}
+
+/*
+IPAMServicesCreate ipam services create API
+*/
+func (a *Client) IPAMServicesCreate(params *IPAMServicesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_create",
+ Method: "POST",
+ PathPattern: "/ipam/services/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesCreateCreated), nil
+
+}
+
+/*
+IPAMServicesDelete ipam services delete API
+*/
+func (a *Client) IPAMServicesDelete(params *IPAMServicesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/services/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesDeleteNoContent), nil
+
+}
+
+/*
+IPAMServicesList ipam services list API
+*/
+func (a *Client) IPAMServicesList(params *IPAMServicesListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_list",
+ Method: "GET",
+ PathPattern: "/ipam/services/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesListOK), nil
+
+}
+
+/*
+IPAMServicesPartialUpdate ipam services partial update API
+*/
+func (a *Client) IPAMServicesPartialUpdate(params *IPAMServicesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/services/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesPartialUpdateOK), nil
+
+}
+
+/*
+IPAMServicesRead ipam services read API
+*/
+func (a *Client) IPAMServicesRead(params *IPAMServicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_read",
+ Method: "GET",
+ PathPattern: "/ipam/services/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesReadOK), nil
+
+}
+
+/*
+IPAMServicesUpdate ipam services update API
+*/
+func (a *Client) IPAMServicesUpdate(params *IPAMServicesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMServicesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMServicesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_services_update",
+ Method: "PUT",
+ PathPattern: "/ipam/services/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMServicesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMServicesUpdateOK), nil
+
+}
+
+/*
+IPAMVlanGroupsCreate ipam vlan groups create API
+*/
+func (a *Client) IPAMVlanGroupsCreate(params *IPAMVlanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_create",
+ Method: "POST",
+ PathPattern: "/ipam/vlan-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsCreateCreated), nil
+
+}
+
+/*
+IPAMVlanGroupsDelete ipam vlan groups delete API
+*/
+func (a *Client) IPAMVlanGroupsDelete(params *IPAMVlanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/vlan-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsDeleteNoContent), nil
+
+}
+
+/*
+IPAMVlanGroupsList ipam vlan groups list API
+*/
+func (a *Client) IPAMVlanGroupsList(params *IPAMVlanGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_list",
+ Method: "GET",
+ PathPattern: "/ipam/vlan-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsListOK), nil
+
+}
+
+/*
+IPAMVlanGroupsPartialUpdate ipam vlan groups partial update API
+*/
+func (a *Client) IPAMVlanGroupsPartialUpdate(params *IPAMVlanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/vlan-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsPartialUpdateOK), nil
+
+}
+
+/*
+IPAMVlanGroupsRead ipam vlan groups read API
+*/
+func (a *Client) IPAMVlanGroupsRead(params *IPAMVlanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_read",
+ Method: "GET",
+ PathPattern: "/ipam/vlan-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsReadOK), nil
+
+}
+
+/*
+IPAMVlanGroupsUpdate ipam vlan groups update API
+*/
+func (a *Client) IPAMVlanGroupsUpdate(params *IPAMVlanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlanGroupsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlanGroupsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlan-groups_update",
+ Method: "PUT",
+ PathPattern: "/ipam/vlan-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlanGroupsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlanGroupsUpdateOK), nil
+
+}
+
+/*
+IPAMVlansCreate ipam vlans create API
+*/
+func (a *Client) IPAMVlansCreate(params *IPAMVlansCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_create",
+ Method: "POST",
+ PathPattern: "/ipam/vlans/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansCreateCreated), nil
+
+}
+
+/*
+IPAMVlansDelete ipam vlans delete API
+*/
+func (a *Client) IPAMVlansDelete(params *IPAMVlansDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/vlans/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansDeleteNoContent), nil
+
+}
+
+/*
+IPAMVlansList ipam vlans list API
+*/
+func (a *Client) IPAMVlansList(params *IPAMVlansListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_list",
+ Method: "GET",
+ PathPattern: "/ipam/vlans/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansListOK), nil
+
+}
+
+/*
+IPAMVlansPartialUpdate ipam vlans partial update API
+*/
+func (a *Client) IPAMVlansPartialUpdate(params *IPAMVlansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/vlans/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansPartialUpdateOK), nil
+
+}
+
+/*
+IPAMVlansRead ipam vlans read API
+*/
+func (a *Client) IPAMVlansRead(params *IPAMVlansReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_read",
+ Method: "GET",
+ PathPattern: "/ipam/vlans/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansReadOK), nil
+
+}
+
+/*
+IPAMVlansUpdate ipam vlans update API
+*/
+func (a *Client) IPAMVlansUpdate(params *IPAMVlansUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVlansUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVlansUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vlans_update",
+ Method: "PUT",
+ PathPattern: "/ipam/vlans/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVlansUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVlansUpdateOK), nil
+
+}
+
+/*
+IPAMVrfsCreate ipam vrfs create API
+*/
+func (a *Client) IPAMVrfsCreate(params *IPAMVrfsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_create",
+ Method: "POST",
+ PathPattern: "/ipam/vrfs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsCreateCreated), nil
+
+}
+
+/*
+IPAMVrfsDelete ipam vrfs delete API
+*/
+func (a *Client) IPAMVrfsDelete(params *IPAMVrfsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_delete",
+ Method: "DELETE",
+ PathPattern: "/ipam/vrfs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsDeleteNoContent), nil
+
+}
+
+/*
+IPAMVrfsList ipam vrfs list API
+*/
+func (a *Client) IPAMVrfsList(params *IPAMVrfsListParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_list",
+ Method: "GET",
+ PathPattern: "/ipam/vrfs/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsListOK), nil
+
+}
+
+/*
+IPAMVrfsPartialUpdate ipam vrfs partial update API
+*/
+func (a *Client) IPAMVrfsPartialUpdate(params *IPAMVrfsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_partial_update",
+ Method: "PATCH",
+ PathPattern: "/ipam/vrfs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsPartialUpdateOK), nil
+
+}
+
+/*
+IPAMVrfsRead ipam vrfs read API
+*/
+func (a *Client) IPAMVrfsRead(params *IPAMVrfsReadParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_read",
+ Method: "GET",
+ PathPattern: "/ipam/vrfs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsReadOK), nil
+
+}
+
+/*
+IPAMVrfsUpdate ipam vrfs update API
+*/
+func (a *Client) IPAMVrfsUpdate(params *IPAMVrfsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*IPAMVrfsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewIPAMVrfsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "ipam_vrfs_update",
+ Method: "PUT",
+ PathPattern: "/ipam/vrfs/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &IPAMVrfsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*IPAMVrfsUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_parameters.go
new file mode 100644
index 0000000..15d9788
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMAggregatesCreateParams creates a new IPAMAggregatesCreateParams object
+// with the default values initialized.
+func NewIPAMAggregatesCreateParams() *IPAMAggregatesCreateParams {
+ var ()
+ return &IPAMAggregatesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesCreateParamsWithTimeout creates a new IPAMAggregatesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesCreateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesCreateParams {
+ var ()
+ return &IPAMAggregatesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesCreateParamsWithContext creates a new IPAMAggregatesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesCreateParamsWithContext(ctx context.Context) *IPAMAggregatesCreateParams {
+ var ()
+ return &IPAMAggregatesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesCreateParamsWithHTTPClient creates a new IPAMAggregatesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesCreateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesCreateParams {
+ var ()
+ return &IPAMAggregatesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesCreateParams contains all the parameters to send to the API endpoint
+for the ipam aggregates create operation typically these are written to a http.Request
+*/
+type IPAMAggregatesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableAggregate
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) WithContext(ctx context.Context) *IPAMAggregatesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam aggregates create params
+func (o *IPAMAggregatesCreateParams) SetData(data *models.WritableAggregate) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_responses.go
new file mode 100644
index 0000000..c4f82dd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMAggregatesCreateReader is a Reader for the IPAMAggregatesCreate structure.
+type IPAMAggregatesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMAggregatesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesCreateCreated creates a IPAMAggregatesCreateCreated with default headers values
+func NewIPAMAggregatesCreateCreated() *IPAMAggregatesCreateCreated {
+ return &IPAMAggregatesCreateCreated{}
+}
+
+/*IPAMAggregatesCreateCreated handles this case with default header values.
+
+IPAMAggregatesCreateCreated ipam aggregates create created
+*/
+type IPAMAggregatesCreateCreated struct {
+ Payload *models.WritableAggregate
+}
+
+func (o *IPAMAggregatesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/aggregates/][%d] ipamAggregatesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMAggregatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableAggregate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_parameters.go
new file mode 100644
index 0000000..da25171
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMAggregatesDeleteParams creates a new IPAMAggregatesDeleteParams object
+// with the default values initialized.
+func NewIPAMAggregatesDeleteParams() *IPAMAggregatesDeleteParams {
+ var ()
+ return &IPAMAggregatesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesDeleteParamsWithTimeout creates a new IPAMAggregatesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesDeleteParamsWithTimeout(timeout time.Duration) *IPAMAggregatesDeleteParams {
+ var ()
+ return &IPAMAggregatesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesDeleteParamsWithContext creates a new IPAMAggregatesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesDeleteParamsWithContext(ctx context.Context) *IPAMAggregatesDeleteParams {
+ var ()
+ return &IPAMAggregatesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesDeleteParamsWithHTTPClient creates a new IPAMAggregatesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesDeleteParamsWithHTTPClient(client *http.Client) *IPAMAggregatesDeleteParams {
+ var ()
+ return &IPAMAggregatesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesDeleteParams contains all the parameters to send to the API endpoint
+for the ipam aggregates delete operation typically these are written to a http.Request
+*/
+type IPAMAggregatesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this aggregate.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) WithTimeout(timeout time.Duration) *IPAMAggregatesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) WithContext(ctx context.Context) *IPAMAggregatesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) WithHTTPClient(client *http.Client) *IPAMAggregatesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) WithID(id int64) *IPAMAggregatesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam aggregates delete params
+func (o *IPAMAggregatesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_responses.go
new file mode 100644
index 0000000..32812e1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMAggregatesDeleteReader is a Reader for the IPAMAggregatesDelete structure.
+type IPAMAggregatesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMAggregatesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesDeleteNoContent creates a IPAMAggregatesDeleteNoContent with default headers values
+func NewIPAMAggregatesDeleteNoContent() *IPAMAggregatesDeleteNoContent {
+ return &IPAMAggregatesDeleteNoContent{}
+}
+
+/*IPAMAggregatesDeleteNoContent handles this case with default header values.
+
+IPAMAggregatesDeleteNoContent ipam aggregates delete no content
+*/
+type IPAMAggregatesDeleteNoContent struct {
+}
+
+func (o *IPAMAggregatesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/aggregates/{id}/][%d] ipamAggregatesDeleteNoContent ", 204)
+}
+
+func (o *IPAMAggregatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_parameters.go
new file mode 100644
index 0000000..9a574db
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_parameters.go
@@ -0,0 +1,372 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMAggregatesListParams creates a new IPAMAggregatesListParams object
+// with the default values initialized.
+func NewIPAMAggregatesListParams() *IPAMAggregatesListParams {
+ var ()
+ return &IPAMAggregatesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesListParamsWithTimeout creates a new IPAMAggregatesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesListParamsWithTimeout(timeout time.Duration) *IPAMAggregatesListParams {
+ var ()
+ return &IPAMAggregatesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesListParamsWithContext creates a new IPAMAggregatesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesListParamsWithContext(ctx context.Context) *IPAMAggregatesListParams {
+ var ()
+ return &IPAMAggregatesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesListParamsWithHTTPClient creates a new IPAMAggregatesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesListParamsWithHTTPClient(client *http.Client) *IPAMAggregatesListParams {
+ var ()
+ return &IPAMAggregatesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesListParams contains all the parameters to send to the API endpoint
+for the ipam aggregates list operation typically these are written to a http.Request
+*/
+type IPAMAggregatesListParams struct {
+
+ /*DateAdded*/
+ DateAdded *string
+ /*Family*/
+ Family *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Rir*/
+ Rir *string
+ /*RirID*/
+ RirID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithTimeout(timeout time.Duration) *IPAMAggregatesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithContext(ctx context.Context) *IPAMAggregatesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithHTTPClient(client *http.Client) *IPAMAggregatesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDateAdded adds the dateAdded to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithDateAdded(dateAdded *string) *IPAMAggregatesListParams {
+ o.SetDateAdded(dateAdded)
+ return o
+}
+
+// SetDateAdded adds the dateAdded to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetDateAdded(dateAdded *string) {
+ o.DateAdded = dateAdded
+}
+
+// WithFamily adds the family to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithFamily(family *string) *IPAMAggregatesListParams {
+ o.SetFamily(family)
+ return o
+}
+
+// SetFamily adds the family to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetFamily(family *string) {
+ o.Family = family
+}
+
+// WithIDIn adds the iDIn to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithIDIn(iDIn *string) *IPAMAggregatesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithLimit(limit *int64) *IPAMAggregatesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithOffset adds the offset to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithOffset(offset *int64) *IPAMAggregatesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithQ(q *string) *IPAMAggregatesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRir adds the rir to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithRir(rir *string) *IPAMAggregatesListParams {
+ o.SetRir(rir)
+ return o
+}
+
+// SetRir adds the rir to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetRir(rir *string) {
+ o.Rir = rir
+}
+
+// WithRirID adds the rirID to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) WithRirID(rirID *string) *IPAMAggregatesListParams {
+ o.SetRirID(rirID)
+ return o
+}
+
+// SetRirID adds the rirId to the ipam aggregates list params
+func (o *IPAMAggregatesListParams) SetRirID(rirID *string) {
+ o.RirID = rirID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.DateAdded != nil {
+
+ // query param date_added
+ var qrDateAdded string
+ if o.DateAdded != nil {
+ qrDateAdded = *o.DateAdded
+ }
+ qDateAdded := qrDateAdded
+ if qDateAdded != "" {
+ if err := r.SetQueryParam("date_added", qDateAdded); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Family != nil {
+
+ // query param family
+ var qrFamily string
+ if o.Family != nil {
+ qrFamily = *o.Family
+ }
+ qFamily := qrFamily
+ if qFamily != "" {
+ if err := r.SetQueryParam("family", qFamily); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Rir != nil {
+
+ // query param rir
+ var qrRir string
+ if o.Rir != nil {
+ qrRir = *o.Rir
+ }
+ qRir := qrRir
+ if qRir != "" {
+ if err := r.SetQueryParam("rir", qRir); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RirID != nil {
+
+ // query param rir_id
+ var qrRirID string
+ if o.RirID != nil {
+ qrRirID = *o.RirID
+ }
+ qRirID := qrRirID
+ if qRirID != "" {
+ if err := r.SetQueryParam("rir_id", qRirID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_responses.go
new file mode 100644
index 0000000..e5d8eb7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMAggregatesListReader is a Reader for the IPAMAggregatesList structure.
+type IPAMAggregatesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMAggregatesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesListOK creates a IPAMAggregatesListOK with default headers values
+func NewIPAMAggregatesListOK() *IPAMAggregatesListOK {
+ return &IPAMAggregatesListOK{}
+}
+
+/*IPAMAggregatesListOK handles this case with default header values.
+
+IPAMAggregatesListOK ipam aggregates list o k
+*/
+type IPAMAggregatesListOK struct {
+ Payload *models.IPAMAggregatesListOKBody
+}
+
+func (o *IPAMAggregatesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/aggregates/][%d] ipamAggregatesListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMAggregatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMAggregatesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_parameters.go
new file mode 100644
index 0000000..b256992
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMAggregatesPartialUpdateParams creates a new IPAMAggregatesPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMAggregatesPartialUpdateParams() *IPAMAggregatesPartialUpdateParams {
+ var ()
+ return &IPAMAggregatesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesPartialUpdateParamsWithTimeout creates a new IPAMAggregatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesPartialUpdateParams {
+ var ()
+ return &IPAMAggregatesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesPartialUpdateParamsWithContext creates a new IPAMAggregatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesPartialUpdateParamsWithContext(ctx context.Context) *IPAMAggregatesPartialUpdateParams {
+ var ()
+ return &IPAMAggregatesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesPartialUpdateParamsWithHTTPClient creates a new IPAMAggregatesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesPartialUpdateParams {
+ var ()
+ return &IPAMAggregatesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam aggregates partial update operation typically these are written to a http.Request
+*/
+type IPAMAggregatesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableAggregate
+ /*ID
+ A unique integer value identifying this aggregate.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) WithContext(ctx context.Context) *IPAMAggregatesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) SetData(data *models.WritableAggregate) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) WithID(id int64) *IPAMAggregatesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam aggregates partial update params
+func (o *IPAMAggregatesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_responses.go
new file mode 100644
index 0000000..294692b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMAggregatesPartialUpdateReader is a Reader for the IPAMAggregatesPartialUpdate structure.
+type IPAMAggregatesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMAggregatesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesPartialUpdateOK creates a IPAMAggregatesPartialUpdateOK with default headers values
+func NewIPAMAggregatesPartialUpdateOK() *IPAMAggregatesPartialUpdateOK {
+ return &IPAMAggregatesPartialUpdateOK{}
+}
+
+/*IPAMAggregatesPartialUpdateOK handles this case with default header values.
+
+IPAMAggregatesPartialUpdateOK ipam aggregates partial update o k
+*/
+type IPAMAggregatesPartialUpdateOK struct {
+ Payload *models.WritableAggregate
+}
+
+func (o *IPAMAggregatesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/aggregates/{id}/][%d] ipamAggregatesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMAggregatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableAggregate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_parameters.go
new file mode 100644
index 0000000..627f725
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMAggregatesReadParams creates a new IPAMAggregatesReadParams object
+// with the default values initialized.
+func NewIPAMAggregatesReadParams() *IPAMAggregatesReadParams {
+ var ()
+ return &IPAMAggregatesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesReadParamsWithTimeout creates a new IPAMAggregatesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesReadParamsWithTimeout(timeout time.Duration) *IPAMAggregatesReadParams {
+ var ()
+ return &IPAMAggregatesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesReadParamsWithContext creates a new IPAMAggregatesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesReadParamsWithContext(ctx context.Context) *IPAMAggregatesReadParams {
+ var ()
+ return &IPAMAggregatesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesReadParamsWithHTTPClient creates a new IPAMAggregatesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesReadParamsWithHTTPClient(client *http.Client) *IPAMAggregatesReadParams {
+ var ()
+ return &IPAMAggregatesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesReadParams contains all the parameters to send to the API endpoint
+for the ipam aggregates read operation typically these are written to a http.Request
+*/
+type IPAMAggregatesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this aggregate.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) WithTimeout(timeout time.Duration) *IPAMAggregatesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) WithContext(ctx context.Context) *IPAMAggregatesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) WithHTTPClient(client *http.Client) *IPAMAggregatesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) WithID(id int64) *IPAMAggregatesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam aggregates read params
+func (o *IPAMAggregatesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_responses.go
new file mode 100644
index 0000000..0d23dd8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMAggregatesReadReader is a Reader for the IPAMAggregatesRead structure.
+type IPAMAggregatesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMAggregatesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesReadOK creates a IPAMAggregatesReadOK with default headers values
+func NewIPAMAggregatesReadOK() *IPAMAggregatesReadOK {
+ return &IPAMAggregatesReadOK{}
+}
+
+/*IPAMAggregatesReadOK handles this case with default header values.
+
+IPAMAggregatesReadOK ipam aggregates read o k
+*/
+type IPAMAggregatesReadOK struct {
+ Payload *models.Aggregate
+}
+
+func (o *IPAMAggregatesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/aggregates/{id}/][%d] ipamAggregatesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMAggregatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Aggregate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_parameters.go
new file mode 100644
index 0000000..b3fa043
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMAggregatesUpdateParams creates a new IPAMAggregatesUpdateParams object
+// with the default values initialized.
+func NewIPAMAggregatesUpdateParams() *IPAMAggregatesUpdateParams {
+ var ()
+ return &IPAMAggregatesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMAggregatesUpdateParamsWithTimeout creates a new IPAMAggregatesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMAggregatesUpdateParamsWithTimeout(timeout time.Duration) *IPAMAggregatesUpdateParams {
+ var ()
+ return &IPAMAggregatesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMAggregatesUpdateParamsWithContext creates a new IPAMAggregatesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMAggregatesUpdateParamsWithContext(ctx context.Context) *IPAMAggregatesUpdateParams {
+ var ()
+ return &IPAMAggregatesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMAggregatesUpdateParamsWithHTTPClient creates a new IPAMAggregatesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMAggregatesUpdateParamsWithHTTPClient(client *http.Client) *IPAMAggregatesUpdateParams {
+ var ()
+ return &IPAMAggregatesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMAggregatesUpdateParams contains all the parameters to send to the API endpoint
+for the ipam aggregates update operation typically these are written to a http.Request
+*/
+type IPAMAggregatesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableAggregate
+ /*ID
+ A unique integer value identifying this aggregate.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) WithTimeout(timeout time.Duration) *IPAMAggregatesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) WithContext(ctx context.Context) *IPAMAggregatesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) WithHTTPClient(client *http.Client) *IPAMAggregatesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) WithData(data *models.WritableAggregate) *IPAMAggregatesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) SetData(data *models.WritableAggregate) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) WithID(id int64) *IPAMAggregatesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam aggregates update params
+func (o *IPAMAggregatesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMAggregatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_responses.go
new file mode 100644
index 0000000..205b88c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amaggregates_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMAggregatesUpdateReader is a Reader for the IPAMAggregatesUpdate structure.
+type IPAMAggregatesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMAggregatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMAggregatesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMAggregatesUpdateOK creates a IPAMAggregatesUpdateOK with default headers values
+func NewIPAMAggregatesUpdateOK() *IPAMAggregatesUpdateOK {
+ return &IPAMAggregatesUpdateOK{}
+}
+
+/*IPAMAggregatesUpdateOK handles this case with default header values.
+
+IPAMAggregatesUpdateOK ipam aggregates update o k
+*/
+type IPAMAggregatesUpdateOK struct {
+ Payload *models.WritableAggregate
+}
+
+func (o *IPAMAggregatesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/aggregates/{id}/][%d] ipamAggregatesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMAggregatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableAggregate)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_parameters.go
new file mode 100644
index 0000000..9c2378f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMChoicesListParams creates a new IPAMChoicesListParams object
+// with the default values initialized.
+func NewIPAMChoicesListParams() *IPAMChoicesListParams {
+
+ return &IPAMChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMChoicesListParamsWithTimeout creates a new IPAMChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMChoicesListParamsWithTimeout(timeout time.Duration) *IPAMChoicesListParams {
+
+ return &IPAMChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMChoicesListParamsWithContext creates a new IPAMChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMChoicesListParamsWithContext(ctx context.Context) *IPAMChoicesListParams {
+
+ return &IPAMChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMChoicesListParamsWithHTTPClient creates a new IPAMChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMChoicesListParamsWithHTTPClient(client *http.Client) *IPAMChoicesListParams {
+
+ return &IPAMChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMChoicesListParams contains all the parameters to send to the API endpoint
+for the ipam choices list operation typically these are written to a http.Request
+*/
+type IPAMChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam choices list params
+func (o *IPAMChoicesListParams) WithTimeout(timeout time.Duration) *IPAMChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam choices list params
+func (o *IPAMChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam choices list params
+func (o *IPAMChoicesListParams) WithContext(ctx context.Context) *IPAMChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam choices list params
+func (o *IPAMChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam choices list params
+func (o *IPAMChoicesListParams) WithHTTPClient(client *http.Client) *IPAMChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam choices list params
+func (o *IPAMChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_responses.go
new file mode 100644
index 0000000..e3a500a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMChoicesListReader is a Reader for the IPAMChoicesList structure.
+type IPAMChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMChoicesListOK creates a IPAMChoicesListOK with default headers values
+func NewIPAMChoicesListOK() *IPAMChoicesListOK {
+ return &IPAMChoicesListOK{}
+}
+
+/*IPAMChoicesListOK handles this case with default header values.
+
+IPAMChoicesListOK ipam choices list o k
+*/
+type IPAMChoicesListOK struct {
+}
+
+func (o *IPAMChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/_choices/][%d] ipamChoicesListOK ", 200)
+}
+
+func (o *IPAMChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_parameters.go
new file mode 100644
index 0000000..834c1a3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMChoicesReadParams creates a new IPAMChoicesReadParams object
+// with the default values initialized.
+func NewIPAMChoicesReadParams() *IPAMChoicesReadParams {
+ var ()
+ return &IPAMChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMChoicesReadParamsWithTimeout creates a new IPAMChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMChoicesReadParamsWithTimeout(timeout time.Duration) *IPAMChoicesReadParams {
+ var ()
+ return &IPAMChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMChoicesReadParamsWithContext creates a new IPAMChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMChoicesReadParamsWithContext(ctx context.Context) *IPAMChoicesReadParams {
+ var ()
+ return &IPAMChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMChoicesReadParamsWithHTTPClient creates a new IPAMChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMChoicesReadParamsWithHTTPClient(client *http.Client) *IPAMChoicesReadParams {
+ var ()
+ return &IPAMChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMChoicesReadParams contains all the parameters to send to the API endpoint
+for the ipam choices read operation typically these are written to a http.Request
+*/
+type IPAMChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam choices read params
+func (o *IPAMChoicesReadParams) WithTimeout(timeout time.Duration) *IPAMChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam choices read params
+func (o *IPAMChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam choices read params
+func (o *IPAMChoicesReadParams) WithContext(ctx context.Context) *IPAMChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam choices read params
+func (o *IPAMChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam choices read params
+func (o *IPAMChoicesReadParams) WithHTTPClient(client *http.Client) *IPAMChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam choices read params
+func (o *IPAMChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam choices read params
+func (o *IPAMChoicesReadParams) WithID(id string) *IPAMChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam choices read params
+func (o *IPAMChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_responses.go
new file mode 100644
index 0000000..bee4187
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amchoices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMChoicesReadReader is a Reader for the IPAMChoicesRead structure.
+type IPAMChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMChoicesReadOK creates a IPAMChoicesReadOK with default headers values
+func NewIPAMChoicesReadOK() *IPAMChoicesReadOK {
+ return &IPAMChoicesReadOK{}
+}
+
+/*IPAMChoicesReadOK handles this case with default header values.
+
+IPAMChoicesReadOK ipam choices read o k
+*/
+type IPAMChoicesReadOK struct {
+}
+
+func (o *IPAMChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/_choices/{id}/][%d] ipamChoicesReadOK ", 200)
+}
+
+func (o *IPAMChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_parameters.go
new file mode 100644
index 0000000..90ef06e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMIPAddressesCreateParams creates a new IPAMIPAddressesCreateParams object
+// with the default values initialized.
+func NewIPAMIPAddressesCreateParams() *IPAMIPAddressesCreateParams {
+ var ()
+ return &IPAMIPAddressesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesCreateParamsWithTimeout creates a new IPAMIPAddressesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesCreateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesCreateParams {
+ var ()
+ return &IPAMIPAddressesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesCreateParamsWithContext creates a new IPAMIPAddressesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesCreateParamsWithContext(ctx context.Context) *IPAMIPAddressesCreateParams {
+ var ()
+ return &IPAMIPAddressesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesCreateParamsWithHTTPClient creates a new IPAMIPAddressesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesCreateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesCreateParams {
+ var ()
+ return &IPAMIPAddressesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesCreateParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses create operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableIPAddress
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) WithContext(ctx context.Context) *IPAMIPAddressesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam ip addresses create params
+func (o *IPAMIPAddressesCreateParams) SetData(data *models.WritableIPAddress) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_responses.go
new file mode 100644
index 0000000..05729de
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMIPAddressesCreateReader is a Reader for the IPAMIPAddressesCreate structure.
+type IPAMIPAddressesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMIPAddressesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesCreateCreated creates a IPAMIPAddressesCreateCreated with default headers values
+func NewIPAMIPAddressesCreateCreated() *IPAMIPAddressesCreateCreated {
+ return &IPAMIPAddressesCreateCreated{}
+}
+
+/*IPAMIPAddressesCreateCreated handles this case with default header values.
+
+IPAMIPAddressesCreateCreated ipam Ip addresses create created
+*/
+type IPAMIPAddressesCreateCreated struct {
+ Payload *models.WritableIPAddress
+}
+
+func (o *IPAMIPAddressesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/ip-addresses/][%d] ipamIpAddressesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMIPAddressesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableIPAddress)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_parameters.go
new file mode 100644
index 0000000..8d4f9d1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMIPAddressesDeleteParams creates a new IPAMIPAddressesDeleteParams object
+// with the default values initialized.
+func NewIPAMIPAddressesDeleteParams() *IPAMIPAddressesDeleteParams {
+ var ()
+ return &IPAMIPAddressesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesDeleteParamsWithTimeout creates a new IPAMIPAddressesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesDeleteParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesDeleteParams {
+ var ()
+ return &IPAMIPAddressesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesDeleteParamsWithContext creates a new IPAMIPAddressesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesDeleteParamsWithContext(ctx context.Context) *IPAMIPAddressesDeleteParams {
+ var ()
+ return &IPAMIPAddressesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesDeleteParamsWithHTTPClient creates a new IPAMIPAddressesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesDeleteParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesDeleteParams {
+ var ()
+ return &IPAMIPAddressesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesDeleteParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses delete operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this IP address.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) WithContext(ctx context.Context) *IPAMIPAddressesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) WithID(id int64) *IPAMIPAddressesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam ip addresses delete params
+func (o *IPAMIPAddressesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_responses.go
new file mode 100644
index 0000000..b05cb8c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMIPAddressesDeleteReader is a Reader for the IPAMIPAddressesDelete structure.
+type IPAMIPAddressesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMIPAddressesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesDeleteNoContent creates a IPAMIPAddressesDeleteNoContent with default headers values
+func NewIPAMIPAddressesDeleteNoContent() *IPAMIPAddressesDeleteNoContent {
+ return &IPAMIPAddressesDeleteNoContent{}
+}
+
+/*IPAMIPAddressesDeleteNoContent handles this case with default header values.
+
+IPAMIPAddressesDeleteNoContent ipam Ip addresses delete no content
+*/
+type IPAMIPAddressesDeleteNoContent struct {
+}
+
+func (o *IPAMIPAddressesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/ip-addresses/{id}/][%d] ipamIpAddressesDeleteNoContent ", 204)
+}
+
+func (o *IPAMIPAddressesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_parameters.go
new file mode 100644
index 0000000..2a03ebd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_parameters.go
@@ -0,0 +1,662 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMIPAddressesListParams creates a new IPAMIPAddressesListParams object
+// with the default values initialized.
+func NewIPAMIPAddressesListParams() *IPAMIPAddressesListParams {
+ var ()
+ return &IPAMIPAddressesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesListParamsWithTimeout creates a new IPAMIPAddressesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesListParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesListParams {
+ var ()
+ return &IPAMIPAddressesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesListParamsWithContext creates a new IPAMIPAddressesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesListParamsWithContext(ctx context.Context) *IPAMIPAddressesListParams {
+ var ()
+ return &IPAMIPAddressesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesListParamsWithHTTPClient creates a new IPAMIPAddressesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesListParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesListParams {
+ var ()
+ return &IPAMIPAddressesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesListParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses list operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *float64
+ /*Family*/
+ Family *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*InterfaceID*/
+ InterfaceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MaskLength*/
+ MaskLength *float64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Parent*/
+ Parent *string
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*VirtualMachine*/
+ VirtualMachine *string
+ /*VirtualMachineID*/
+ VirtualMachineID *string
+ /*Vrf*/
+ Vrf *string
+ /*VrfID*/
+ VrfID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithContext(ctx context.Context) *IPAMIPAddressesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithDevice(device *string) *IPAMIPAddressesListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithDeviceID(deviceID *float64) *IPAMIPAddressesListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetDeviceID(deviceID *float64) {
+ o.DeviceID = deviceID
+}
+
+// WithFamily adds the family to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithFamily(family *string) *IPAMIPAddressesListParams {
+ o.SetFamily(family)
+ return o
+}
+
+// SetFamily adds the family to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetFamily(family *string) {
+ o.Family = family
+}
+
+// WithIDIn adds the iDIn to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithIDIn(iDIn *string) *IPAMIPAddressesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithInterfaceID adds the interfaceID to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithInterfaceID(interfaceID *string) *IPAMIPAddressesListParams {
+ o.SetInterfaceID(interfaceID)
+ return o
+}
+
+// SetInterfaceID adds the interfaceId to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetInterfaceID(interfaceID *string) {
+ o.InterfaceID = interfaceID
+}
+
+// WithLimit adds the limit to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithLimit(limit *int64) *IPAMIPAddressesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMaskLength adds the maskLength to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithMaskLength(maskLength *float64) *IPAMIPAddressesListParams {
+ o.SetMaskLength(maskLength)
+ return o
+}
+
+// SetMaskLength adds the maskLength to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetMaskLength(maskLength *float64) {
+ o.MaskLength = maskLength
+}
+
+// WithOffset adds the offset to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithOffset(offset *int64) *IPAMIPAddressesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithParent adds the parent to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithParent(parent *string) *IPAMIPAddressesListParams {
+ o.SetParent(parent)
+ return o
+}
+
+// SetParent adds the parent to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetParent(parent *string) {
+ o.Parent = parent
+}
+
+// WithQ adds the q to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithQ(q *string) *IPAMIPAddressesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithRole(role *string) *IPAMIPAddressesListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithStatus adds the status to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithStatus(status *string) *IPAMIPAddressesListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithTenant(tenant *string) *IPAMIPAddressesListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithTenantID(tenantID *string) *IPAMIPAddressesListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithVirtualMachine adds the virtualMachine to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithVirtualMachine(virtualMachine *string) *IPAMIPAddressesListParams {
+ o.SetVirtualMachine(virtualMachine)
+ return o
+}
+
+// SetVirtualMachine adds the virtualMachine to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetVirtualMachine(virtualMachine *string) {
+ o.VirtualMachine = virtualMachine
+}
+
+// WithVirtualMachineID adds the virtualMachineID to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithVirtualMachineID(virtualMachineID *string) *IPAMIPAddressesListParams {
+ o.SetVirtualMachineID(virtualMachineID)
+ return o
+}
+
+// SetVirtualMachineID adds the virtualMachineId to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetVirtualMachineID(virtualMachineID *string) {
+ o.VirtualMachineID = virtualMachineID
+}
+
+// WithVrf adds the vrf to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithVrf(vrf *string) *IPAMIPAddressesListParams {
+ o.SetVrf(vrf)
+ return o
+}
+
+// SetVrf adds the vrf to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetVrf(vrf *string) {
+ o.Vrf = vrf
+}
+
+// WithVrfID adds the vrfID to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) WithVrfID(vrfID *string) *IPAMIPAddressesListParams {
+ o.SetVrfID(vrfID)
+ return o
+}
+
+// SetVrfID adds the vrfId to the ipam ip addresses list params
+func (o *IPAMIPAddressesListParams) SetVrfID(vrfID *string) {
+ o.VrfID = vrfID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID float64
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := swag.FormatFloat64(qrDeviceID)
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Family != nil {
+
+ // query param family
+ var qrFamily string
+ if o.Family != nil {
+ qrFamily = *o.Family
+ }
+ qFamily := qrFamily
+ if qFamily != "" {
+ if err := r.SetQueryParam("family", qFamily); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.InterfaceID != nil {
+
+ // query param interface_id
+ var qrInterfaceID string
+ if o.InterfaceID != nil {
+ qrInterfaceID = *o.InterfaceID
+ }
+ qInterfaceID := qrInterfaceID
+ if qInterfaceID != "" {
+ if err := r.SetQueryParam("interface_id", qInterfaceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MaskLength != nil {
+
+ // query param mask_length
+ var qrMaskLength float64
+ if o.MaskLength != nil {
+ qrMaskLength = *o.MaskLength
+ }
+ qMaskLength := swag.FormatFloat64(qrMaskLength)
+ if qMaskLength != "" {
+ if err := r.SetQueryParam("mask_length", qMaskLength); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Parent != nil {
+
+ // query param parent
+ var qrParent string
+ if o.Parent != nil {
+ qrParent = *o.Parent
+ }
+ qParent := qrParent
+ if qParent != "" {
+ if err := r.SetQueryParam("parent", qParent); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachine != nil {
+
+ // query param virtual_machine
+ var qrVirtualMachine string
+ if o.VirtualMachine != nil {
+ qrVirtualMachine = *o.VirtualMachine
+ }
+ qVirtualMachine := qrVirtualMachine
+ if qVirtualMachine != "" {
+ if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachineID != nil {
+
+ // query param virtual_machine_id
+ var qrVirtualMachineID string
+ if o.VirtualMachineID != nil {
+ qrVirtualMachineID = *o.VirtualMachineID
+ }
+ qVirtualMachineID := qrVirtualMachineID
+ if qVirtualMachineID != "" {
+ if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Vrf != nil {
+
+ // query param vrf
+ var qrVrf string
+ if o.Vrf != nil {
+ qrVrf = *o.Vrf
+ }
+ qVrf := qrVrf
+ if qVrf != "" {
+ if err := r.SetQueryParam("vrf", qVrf); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VrfID != nil {
+
+ // query param vrf_id
+ var qrVrfID string
+ if o.VrfID != nil {
+ qrVrfID = *o.VrfID
+ }
+ qVrfID := qrVrfID
+ if qVrfID != "" {
+ if err := r.SetQueryParam("vrf_id", qVrfID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_responses.go
new file mode 100644
index 0000000..6d9a024
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMIPAddressesListReader is a Reader for the IPAMIPAddressesList structure.
+type IPAMIPAddressesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMIPAddressesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesListOK creates a IPAMIPAddressesListOK with default headers values
+func NewIPAMIPAddressesListOK() *IPAMIPAddressesListOK {
+ return &IPAMIPAddressesListOK{}
+}
+
+/*IPAMIPAddressesListOK handles this case with default header values.
+
+IPAMIPAddressesListOK ipam Ip addresses list o k
+*/
+type IPAMIPAddressesListOK struct {
+ Payload *models.IPAMIPAddressesListOKBody
+}
+
+func (o *IPAMIPAddressesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/ip-addresses/][%d] ipamIpAddressesListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMIPAddressesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMIPAddressesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_parameters.go
new file mode 100644
index 0000000..eb480f9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMIPAddressesPartialUpdateParams creates a new IPAMIPAddressesPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMIPAddressesPartialUpdateParams() *IPAMIPAddressesPartialUpdateParams {
+ var ()
+ return &IPAMIPAddressesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesPartialUpdateParamsWithTimeout creates a new IPAMIPAddressesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesPartialUpdateParams {
+ var ()
+ return &IPAMIPAddressesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesPartialUpdateParamsWithContext creates a new IPAMIPAddressesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesPartialUpdateParamsWithContext(ctx context.Context) *IPAMIPAddressesPartialUpdateParams {
+ var ()
+ return &IPAMIPAddressesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesPartialUpdateParamsWithHTTPClient creates a new IPAMIPAddressesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesPartialUpdateParams {
+ var ()
+ return &IPAMIPAddressesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses partial update operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableIPAddress
+ /*ID
+ A unique integer value identifying this IP address.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) WithContext(ctx context.Context) *IPAMIPAddressesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) SetData(data *models.WritableIPAddress) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) WithID(id int64) *IPAMIPAddressesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam ip addresses partial update params
+func (o *IPAMIPAddressesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_responses.go
new file mode 100644
index 0000000..59770b2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMIPAddressesPartialUpdateReader is a Reader for the IPAMIPAddressesPartialUpdate structure.
+type IPAMIPAddressesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMIPAddressesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesPartialUpdateOK creates a IPAMIPAddressesPartialUpdateOK with default headers values
+func NewIPAMIPAddressesPartialUpdateOK() *IPAMIPAddressesPartialUpdateOK {
+ return &IPAMIPAddressesPartialUpdateOK{}
+}
+
+/*IPAMIPAddressesPartialUpdateOK handles this case with default header values.
+
+IPAMIPAddressesPartialUpdateOK ipam Ip addresses partial update o k
+*/
+type IPAMIPAddressesPartialUpdateOK struct {
+ Payload *models.WritableIPAddress
+}
+
+func (o *IPAMIPAddressesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/ip-addresses/{id}/][%d] ipamIpAddressesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMIPAddressesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableIPAddress)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_parameters.go
new file mode 100644
index 0000000..b326478
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMIPAddressesReadParams creates a new IPAMIPAddressesReadParams object
+// with the default values initialized.
+func NewIPAMIPAddressesReadParams() *IPAMIPAddressesReadParams {
+ var ()
+ return &IPAMIPAddressesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesReadParamsWithTimeout creates a new IPAMIPAddressesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesReadParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesReadParams {
+ var ()
+ return &IPAMIPAddressesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesReadParamsWithContext creates a new IPAMIPAddressesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesReadParamsWithContext(ctx context.Context) *IPAMIPAddressesReadParams {
+ var ()
+ return &IPAMIPAddressesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesReadParamsWithHTTPClient creates a new IPAMIPAddressesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesReadParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesReadParams {
+ var ()
+ return &IPAMIPAddressesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesReadParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses read operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this IP address.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) WithContext(ctx context.Context) *IPAMIPAddressesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) WithID(id int64) *IPAMIPAddressesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam ip addresses read params
+func (o *IPAMIPAddressesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_responses.go
new file mode 100644
index 0000000..b9b8d10
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMIPAddressesReadReader is a Reader for the IPAMIPAddressesRead structure.
+type IPAMIPAddressesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMIPAddressesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesReadOK creates a IPAMIPAddressesReadOK with default headers values
+func NewIPAMIPAddressesReadOK() *IPAMIPAddressesReadOK {
+ return &IPAMIPAddressesReadOK{}
+}
+
+/*IPAMIPAddressesReadOK handles this case with default header values.
+
+IPAMIPAddressesReadOK ipam Ip addresses read o k
+*/
+type IPAMIPAddressesReadOK struct {
+ Payload *models.IPAddress
+}
+
+func (o *IPAMIPAddressesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/ip-addresses/{id}/][%d] ipamIpAddressesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMIPAddressesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAddress)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_parameters.go
new file mode 100644
index 0000000..54b097e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMIPAddressesUpdateParams creates a new IPAMIPAddressesUpdateParams object
+// with the default values initialized.
+func NewIPAMIPAddressesUpdateParams() *IPAMIPAddressesUpdateParams {
+ var ()
+ return &IPAMIPAddressesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMIPAddressesUpdateParamsWithTimeout creates a new IPAMIPAddressesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMIPAddressesUpdateParamsWithTimeout(timeout time.Duration) *IPAMIPAddressesUpdateParams {
+ var ()
+ return &IPAMIPAddressesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMIPAddressesUpdateParamsWithContext creates a new IPAMIPAddressesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMIPAddressesUpdateParamsWithContext(ctx context.Context) *IPAMIPAddressesUpdateParams {
+ var ()
+ return &IPAMIPAddressesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMIPAddressesUpdateParamsWithHTTPClient creates a new IPAMIPAddressesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMIPAddressesUpdateParamsWithHTTPClient(client *http.Client) *IPAMIPAddressesUpdateParams {
+ var ()
+ return &IPAMIPAddressesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMIPAddressesUpdateParams contains all the parameters to send to the API endpoint
+for the ipam ip addresses update operation typically these are written to a http.Request
+*/
+type IPAMIPAddressesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableIPAddress
+ /*ID
+ A unique integer value identifying this IP address.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) WithTimeout(timeout time.Duration) *IPAMIPAddressesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) WithContext(ctx context.Context) *IPAMIPAddressesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) WithHTTPClient(client *http.Client) *IPAMIPAddressesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) WithData(data *models.WritableIPAddress) *IPAMIPAddressesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) SetData(data *models.WritableIPAddress) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) WithID(id int64) *IPAMIPAddressesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam ip addresses update params
+func (o *IPAMIPAddressesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMIPAddressesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_responses.go
new file mode 100644
index 0000000..c9e917b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amip_addresses_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMIPAddressesUpdateReader is a Reader for the IPAMIPAddressesUpdate structure.
+type IPAMIPAddressesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMIPAddressesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMIPAddressesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMIPAddressesUpdateOK creates a IPAMIPAddressesUpdateOK with default headers values
+func NewIPAMIPAddressesUpdateOK() *IPAMIPAddressesUpdateOK {
+ return &IPAMIPAddressesUpdateOK{}
+}
+
+/*IPAMIPAddressesUpdateOK handles this case with default header values.
+
+IPAMIPAddressesUpdateOK ipam Ip addresses update o k
+*/
+type IPAMIPAddressesUpdateOK struct {
+ Payload *models.WritableIPAddress
+}
+
+func (o *IPAMIPAddressesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/ip-addresses/{id}/][%d] ipamIpAddressesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMIPAddressesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableIPAddress)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_parameters.go
new file mode 100644
index 0000000..b16acd4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMPrefixesAvailableIpsCreateParams creates a new IPAMPrefixesAvailableIpsCreateParams object
+// with the default values initialized.
+func NewIPAMPrefixesAvailableIpsCreateParams() *IPAMPrefixesAvailableIpsCreateParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsCreateParamsWithTimeout creates a new IPAMPrefixesAvailableIpsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesAvailableIpsCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsCreateParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsCreateParamsWithContext creates a new IPAMPrefixesAvailableIpsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesAvailableIpsCreateParamsWithContext(ctx context.Context) *IPAMPrefixesAvailableIpsCreateParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsCreateParamsWithHTTPClient creates a new IPAMPrefixesAvailableIpsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsCreateParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesAvailableIpsCreateParams contains all the parameters to send to the API endpoint
+for the ipam prefixes available ips create operation typically these are written to a http.Request
+*/
+type IPAMPrefixesAvailableIpsCreateParams struct {
+
+ /*Data*/
+ Data *models.Prefix
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) WithContext(ctx context.Context) *IPAMPrefixesAvailableIpsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) WithData(data *models.Prefix) *IPAMPrefixesAvailableIpsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) SetData(data *models.Prefix) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) WithID(id int64) *IPAMPrefixesAvailableIpsCreateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes available ips create params
+func (o *IPAMPrefixesAvailableIpsCreateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesAvailableIpsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_responses.go
new file mode 100644
index 0000000..088dc49
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesAvailableIpsCreateReader is a Reader for the IPAMPrefixesAvailableIpsCreate structure.
+type IPAMPrefixesAvailableIpsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesAvailableIpsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMPrefixesAvailableIpsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsCreateCreated creates a IPAMPrefixesAvailableIpsCreateCreated with default headers values
+func NewIPAMPrefixesAvailableIpsCreateCreated() *IPAMPrefixesAvailableIpsCreateCreated {
+ return &IPAMPrefixesAvailableIpsCreateCreated{}
+}
+
+/*IPAMPrefixesAvailableIpsCreateCreated handles this case with default header values.
+
+IPAMPrefixesAvailableIpsCreateCreated ipam prefixes available ips create created
+*/
+type IPAMPrefixesAvailableIpsCreateCreated struct {
+ Payload *models.Prefix
+}
+
+func (o *IPAMPrefixesAvailableIpsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMPrefixesAvailableIpsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Prefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_parameters.go
new file mode 100644
index 0000000..95da2ec
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMPrefixesAvailableIpsReadParams creates a new IPAMPrefixesAvailableIpsReadParams object
+// with the default values initialized.
+func NewIPAMPrefixesAvailableIpsReadParams() *IPAMPrefixesAvailableIpsReadParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsReadParamsWithTimeout creates a new IPAMPrefixesAvailableIpsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsReadParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsReadParamsWithContext creates a new IPAMPrefixesAvailableIpsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesAvailableIpsReadParamsWithContext(ctx context.Context) *IPAMPrefixesAvailableIpsReadParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsReadParamsWithHTTPClient creates a new IPAMPrefixesAvailableIpsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsReadParams {
+ var ()
+ return &IPAMPrefixesAvailableIpsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesAvailableIpsReadParams contains all the parameters to send to the API endpoint
+for the ipam prefixes available ips read operation typically these are written to a http.Request
+*/
+type IPAMPrefixesAvailableIpsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailableIpsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) WithContext(ctx context.Context) *IPAMPrefixesAvailableIpsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailableIpsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) WithID(id int64) *IPAMPrefixesAvailableIpsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes available ips read params
+func (o *IPAMPrefixesAvailableIpsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesAvailableIpsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_responses.go
new file mode 100644
index 0000000..c358354
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_ips_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesAvailableIpsReadReader is a Reader for the IPAMPrefixesAvailableIpsRead structure.
+type IPAMPrefixesAvailableIpsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesAvailableIpsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesAvailableIpsReadOK creates a IPAMPrefixesAvailableIpsReadOK with default headers values
+func NewIPAMPrefixesAvailableIpsReadOK() *IPAMPrefixesAvailableIpsReadOK {
+ return &IPAMPrefixesAvailableIpsReadOK{}
+}
+
+/*IPAMPrefixesAvailableIpsReadOK handles this case with default header values.
+
+IPAMPrefixesAvailableIpsReadOK ipam prefixes available ips read o k
+*/
+type IPAMPrefixesAvailableIpsReadOK struct {
+ Payload *models.Prefix
+}
+
+func (o *IPAMPrefixesAvailableIpsReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Prefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_parameters.go
new file mode 100644
index 0000000..7864c07
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMPrefixesAvailablePrefixesCreateParams creates a new IPAMPrefixesAvailablePrefixesCreateParams object
+// with the default values initialized.
+func NewIPAMPrefixesAvailablePrefixesCreateParams() *IPAMPrefixesAvailablePrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesCreateParamsWithTimeout creates a new IPAMPrefixesAvailablePrefixesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesAvailablePrefixesCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesCreateParamsWithContext creates a new IPAMPrefixesAvailablePrefixesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesAvailablePrefixesCreateParamsWithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesCreateParamsWithHTTPClient creates a new IPAMPrefixesAvailablePrefixesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesAvailablePrefixesCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesAvailablePrefixesCreateParams contains all the parameters to send to the API endpoint
+for the ipam prefixes available prefixes create operation typically these are written to a http.Request
+*/
+type IPAMPrefixesAvailablePrefixesCreateParams struct {
+
+ /*Data*/
+ Data *models.Prefix
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithData(data *models.Prefix) *IPAMPrefixesAvailablePrefixesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetData(data *models.Prefix) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WithID(id int64) *IPAMPrefixesAvailablePrefixesCreateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes available prefixes create params
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesAvailablePrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_responses.go
new file mode 100644
index 0000000..c34039f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesAvailablePrefixesCreateReader is a Reader for the IPAMPrefixesAvailablePrefixesCreate structure.
+type IPAMPrefixesAvailablePrefixesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesAvailablePrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMPrefixesAvailablePrefixesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesCreateCreated creates a IPAMPrefixesAvailablePrefixesCreateCreated with default headers values
+func NewIPAMPrefixesAvailablePrefixesCreateCreated() *IPAMPrefixesAvailablePrefixesCreateCreated {
+ return &IPAMPrefixesAvailablePrefixesCreateCreated{}
+}
+
+/*IPAMPrefixesAvailablePrefixesCreateCreated handles this case with default header values.
+
+IPAMPrefixesAvailablePrefixesCreateCreated ipam prefixes available prefixes create created
+*/
+type IPAMPrefixesAvailablePrefixesCreateCreated struct {
+ Payload *models.Prefix
+}
+
+func (o *IPAMPrefixesAvailablePrefixesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMPrefixesAvailablePrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Prefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_parameters.go
new file mode 100644
index 0000000..ffe2c3c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMPrefixesAvailablePrefixesReadParams creates a new IPAMPrefixesAvailablePrefixesReadParams object
+// with the default values initialized.
+func NewIPAMPrefixesAvailablePrefixesReadParams() *IPAMPrefixesAvailablePrefixesReadParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesReadParamsWithTimeout creates a new IPAMPrefixesAvailablePrefixesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesAvailablePrefixesReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesReadParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesReadParamsWithContext creates a new IPAMPrefixesAvailablePrefixesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesAvailablePrefixesReadParamsWithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesReadParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesReadParamsWithHTTPClient creates a new IPAMPrefixesAvailablePrefixesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesAvailablePrefixesReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesReadParams {
+ var ()
+ return &IPAMPrefixesAvailablePrefixesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesAvailablePrefixesReadParams contains all the parameters to send to the API endpoint
+for the ipam prefixes available prefixes read operation typically these are written to a http.Request
+*/
+type IPAMPrefixesAvailablePrefixesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesAvailablePrefixesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) WithContext(ctx context.Context) *IPAMPrefixesAvailablePrefixesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesAvailablePrefixesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) WithID(id int64) *IPAMPrefixesAvailablePrefixesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes available prefixes read params
+func (o *IPAMPrefixesAvailablePrefixesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesAvailablePrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_responses.go
new file mode 100644
index 0000000..4ae9449
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_available_prefixes_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesAvailablePrefixesReadReader is a Reader for the IPAMPrefixesAvailablePrefixesRead structure.
+type IPAMPrefixesAvailablePrefixesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesAvailablePrefixesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesAvailablePrefixesReadOK creates a IPAMPrefixesAvailablePrefixesReadOK with default headers values
+func NewIPAMPrefixesAvailablePrefixesReadOK() *IPAMPrefixesAvailablePrefixesReadOK {
+ return &IPAMPrefixesAvailablePrefixesReadOK{}
+}
+
+/*IPAMPrefixesAvailablePrefixesReadOK handles this case with default header values.
+
+IPAMPrefixesAvailablePrefixesReadOK ipam prefixes available prefixes read o k
+*/
+type IPAMPrefixesAvailablePrefixesReadOK struct {
+ Payload *models.Prefix
+}
+
+func (o *IPAMPrefixesAvailablePrefixesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesAvailablePrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Prefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_parameters.go
new file mode 100644
index 0000000..8eb3712
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMPrefixesCreateParams creates a new IPAMPrefixesCreateParams object
+// with the default values initialized.
+func NewIPAMPrefixesCreateParams() *IPAMPrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesCreateParamsWithTimeout creates a new IPAMPrefixesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesCreateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesCreateParamsWithContext creates a new IPAMPrefixesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesCreateParamsWithContext(ctx context.Context) *IPAMPrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesCreateParamsWithHTTPClient creates a new IPAMPrefixesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesCreateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesCreateParams {
+ var ()
+ return &IPAMPrefixesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesCreateParams contains all the parameters to send to the API endpoint
+for the ipam prefixes create operation typically these are written to a http.Request
+*/
+type IPAMPrefixesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritablePrefix
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) WithContext(ctx context.Context) *IPAMPrefixesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam prefixes create params
+func (o *IPAMPrefixesCreateParams) SetData(data *models.WritablePrefix) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_responses.go
new file mode 100644
index 0000000..744b7d2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesCreateReader is a Reader for the IPAMPrefixesCreate structure.
+type IPAMPrefixesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMPrefixesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesCreateCreated creates a IPAMPrefixesCreateCreated with default headers values
+func NewIPAMPrefixesCreateCreated() *IPAMPrefixesCreateCreated {
+ return &IPAMPrefixesCreateCreated{}
+}
+
+/*IPAMPrefixesCreateCreated handles this case with default header values.
+
+IPAMPrefixesCreateCreated ipam prefixes create created
+*/
+type IPAMPrefixesCreateCreated struct {
+ Payload *models.WritablePrefix
+}
+
+func (o *IPAMPrefixesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/prefixes/][%d] ipamPrefixesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMPrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePrefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_parameters.go
new file mode 100644
index 0000000..f3ca330
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMPrefixesDeleteParams creates a new IPAMPrefixesDeleteParams object
+// with the default values initialized.
+func NewIPAMPrefixesDeleteParams() *IPAMPrefixesDeleteParams {
+ var ()
+ return &IPAMPrefixesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesDeleteParamsWithTimeout creates a new IPAMPrefixesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesDeleteParamsWithTimeout(timeout time.Duration) *IPAMPrefixesDeleteParams {
+ var ()
+ return &IPAMPrefixesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesDeleteParamsWithContext creates a new IPAMPrefixesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesDeleteParamsWithContext(ctx context.Context) *IPAMPrefixesDeleteParams {
+ var ()
+ return &IPAMPrefixesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesDeleteParamsWithHTTPClient creates a new IPAMPrefixesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesDeleteParamsWithHTTPClient(client *http.Client) *IPAMPrefixesDeleteParams {
+ var ()
+ return &IPAMPrefixesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesDeleteParams contains all the parameters to send to the API endpoint
+for the ipam prefixes delete operation typically these are written to a http.Request
+*/
+type IPAMPrefixesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) WithTimeout(timeout time.Duration) *IPAMPrefixesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) WithContext(ctx context.Context) *IPAMPrefixesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) WithHTTPClient(client *http.Client) *IPAMPrefixesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) WithID(id int64) *IPAMPrefixesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes delete params
+func (o *IPAMPrefixesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_responses.go
new file mode 100644
index 0000000..c9668b8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMPrefixesDeleteReader is a Reader for the IPAMPrefixesDelete structure.
+type IPAMPrefixesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMPrefixesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesDeleteNoContent creates a IPAMPrefixesDeleteNoContent with default headers values
+func NewIPAMPrefixesDeleteNoContent() *IPAMPrefixesDeleteNoContent {
+ return &IPAMPrefixesDeleteNoContent{}
+}
+
+/*IPAMPrefixesDeleteNoContent handles this case with default header values.
+
+IPAMPrefixesDeleteNoContent ipam prefixes delete no content
+*/
+type IPAMPrefixesDeleteNoContent struct {
+}
+
+func (o *IPAMPrefixesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/prefixes/{id}/][%d] ipamPrefixesDeleteNoContent ", 204)
+}
+
+func (o *IPAMPrefixesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_parameters.go
new file mode 100644
index 0000000..2223c81
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_parameters.go
@@ -0,0 +1,749 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMPrefixesListParams creates a new IPAMPrefixesListParams object
+// with the default values initialized.
+func NewIPAMPrefixesListParams() *IPAMPrefixesListParams {
+ var ()
+ return &IPAMPrefixesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesListParamsWithTimeout creates a new IPAMPrefixesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesListParamsWithTimeout(timeout time.Duration) *IPAMPrefixesListParams {
+ var ()
+ return &IPAMPrefixesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesListParamsWithContext creates a new IPAMPrefixesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesListParamsWithContext(ctx context.Context) *IPAMPrefixesListParams {
+ var ()
+ return &IPAMPrefixesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesListParamsWithHTTPClient creates a new IPAMPrefixesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesListParamsWithHTTPClient(client *http.Client) *IPAMPrefixesListParams {
+ var ()
+ return &IPAMPrefixesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesListParams contains all the parameters to send to the API endpoint
+for the ipam prefixes list operation typically these are written to a http.Request
+*/
+type IPAMPrefixesListParams struct {
+
+ /*Contains*/
+ Contains *string
+ /*Family*/
+ Family *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*IsPool*/
+ IsPool *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MaskLength*/
+ MaskLength *float64
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*VlanID*/
+ VlanID *string
+ /*VlanVid*/
+ VlanVid *float64
+ /*Vrf*/
+ Vrf *string
+ /*VrfID*/
+ VrfID *string
+ /*Within*/
+ Within *string
+ /*WithinInclude*/
+ WithinInclude *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithTimeout(timeout time.Duration) *IPAMPrefixesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithContext(ctx context.Context) *IPAMPrefixesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithHTTPClient(client *http.Client) *IPAMPrefixesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithContains adds the contains to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithContains(contains *string) *IPAMPrefixesListParams {
+ o.SetContains(contains)
+ return o
+}
+
+// SetContains adds the contains to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetContains(contains *string) {
+ o.Contains = contains
+}
+
+// WithFamily adds the family to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithFamily(family *string) *IPAMPrefixesListParams {
+ o.SetFamily(family)
+ return o
+}
+
+// SetFamily adds the family to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetFamily(family *string) {
+ o.Family = family
+}
+
+// WithIDIn adds the iDIn to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithIDIn(iDIn *string) *IPAMPrefixesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithIsPool adds the isPool to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithIsPool(isPool *string) *IPAMPrefixesListParams {
+ o.SetIsPool(isPool)
+ return o
+}
+
+// SetIsPool adds the isPool to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetIsPool(isPool *string) {
+ o.IsPool = isPool
+}
+
+// WithLimit adds the limit to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithLimit(limit *int64) *IPAMPrefixesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMaskLength adds the maskLength to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithMaskLength(maskLength *float64) *IPAMPrefixesListParams {
+ o.SetMaskLength(maskLength)
+ return o
+}
+
+// SetMaskLength adds the maskLength to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetMaskLength(maskLength *float64) {
+ o.MaskLength = maskLength
+}
+
+// WithOffset adds the offset to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithOffset(offset *int64) *IPAMPrefixesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithQ(q *string) *IPAMPrefixesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithRole(role *string) *IPAMPrefixesListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithRoleID(roleID *string) *IPAMPrefixesListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WithSite adds the site to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithSite(site *string) *IPAMPrefixesListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithSiteID(siteID *string) *IPAMPrefixesListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithStatus adds the status to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithStatus(status *string) *IPAMPrefixesListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithTenant(tenant *string) *IPAMPrefixesListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithTenantID(tenantID *string) *IPAMPrefixesListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithVlanID adds the vlanID to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithVlanID(vlanID *string) *IPAMPrefixesListParams {
+ o.SetVlanID(vlanID)
+ return o
+}
+
+// SetVlanID adds the vlanId to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetVlanID(vlanID *string) {
+ o.VlanID = vlanID
+}
+
+// WithVlanVid adds the vlanVid to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithVlanVid(vlanVid *float64) *IPAMPrefixesListParams {
+ o.SetVlanVid(vlanVid)
+ return o
+}
+
+// SetVlanVid adds the vlanVid to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetVlanVid(vlanVid *float64) {
+ o.VlanVid = vlanVid
+}
+
+// WithVrf adds the vrf to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithVrf(vrf *string) *IPAMPrefixesListParams {
+ o.SetVrf(vrf)
+ return o
+}
+
+// SetVrf adds the vrf to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetVrf(vrf *string) {
+ o.Vrf = vrf
+}
+
+// WithVrfID adds the vrfID to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithVrfID(vrfID *string) *IPAMPrefixesListParams {
+ o.SetVrfID(vrfID)
+ return o
+}
+
+// SetVrfID adds the vrfId to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetVrfID(vrfID *string) {
+ o.VrfID = vrfID
+}
+
+// WithWithin adds the within to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithWithin(within *string) *IPAMPrefixesListParams {
+ o.SetWithin(within)
+ return o
+}
+
+// SetWithin adds the within to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetWithin(within *string) {
+ o.Within = within
+}
+
+// WithWithinInclude adds the withinInclude to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) WithWithinInclude(withinInclude *string) *IPAMPrefixesListParams {
+ o.SetWithinInclude(withinInclude)
+ return o
+}
+
+// SetWithinInclude adds the withinInclude to the ipam prefixes list params
+func (o *IPAMPrefixesListParams) SetWithinInclude(withinInclude *string) {
+ o.WithinInclude = withinInclude
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Contains != nil {
+
+ // query param contains
+ var qrContains string
+ if o.Contains != nil {
+ qrContains = *o.Contains
+ }
+ qContains := qrContains
+ if qContains != "" {
+ if err := r.SetQueryParam("contains", qContains); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Family != nil {
+
+ // query param family
+ var qrFamily string
+ if o.Family != nil {
+ qrFamily = *o.Family
+ }
+ qFamily := qrFamily
+ if qFamily != "" {
+ if err := r.SetQueryParam("family", qFamily); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsPool != nil {
+
+ // query param is_pool
+ var qrIsPool string
+ if o.IsPool != nil {
+ qrIsPool = *o.IsPool
+ }
+ qIsPool := qrIsPool
+ if qIsPool != "" {
+ if err := r.SetQueryParam("is_pool", qIsPool); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MaskLength != nil {
+
+ // query param mask_length
+ var qrMaskLength float64
+ if o.MaskLength != nil {
+ qrMaskLength = *o.MaskLength
+ }
+ qMaskLength := swag.FormatFloat64(qrMaskLength)
+ if qMaskLength != "" {
+ if err := r.SetQueryParam("mask_length", qMaskLength); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VlanID != nil {
+
+ // query param vlan_id
+ var qrVlanID string
+ if o.VlanID != nil {
+ qrVlanID = *o.VlanID
+ }
+ qVlanID := qrVlanID
+ if qVlanID != "" {
+ if err := r.SetQueryParam("vlan_id", qVlanID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VlanVid != nil {
+
+ // query param vlan_vid
+ var qrVlanVid float64
+ if o.VlanVid != nil {
+ qrVlanVid = *o.VlanVid
+ }
+ qVlanVid := swag.FormatFloat64(qrVlanVid)
+ if qVlanVid != "" {
+ if err := r.SetQueryParam("vlan_vid", qVlanVid); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Vrf != nil {
+
+ // query param vrf
+ var qrVrf string
+ if o.Vrf != nil {
+ qrVrf = *o.Vrf
+ }
+ qVrf := qrVrf
+ if qVrf != "" {
+ if err := r.SetQueryParam("vrf", qVrf); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VrfID != nil {
+
+ // query param vrf_id
+ var qrVrfID string
+ if o.VrfID != nil {
+ qrVrfID = *o.VrfID
+ }
+ qVrfID := qrVrfID
+ if qVrfID != "" {
+ if err := r.SetQueryParam("vrf_id", qVrfID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Within != nil {
+
+ // query param within
+ var qrWithin string
+ if o.Within != nil {
+ qrWithin = *o.Within
+ }
+ qWithin := qrWithin
+ if qWithin != "" {
+ if err := r.SetQueryParam("within", qWithin); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.WithinInclude != nil {
+
+ // query param within_include
+ var qrWithinInclude string
+ if o.WithinInclude != nil {
+ qrWithinInclude = *o.WithinInclude
+ }
+ qWithinInclude := qrWithinInclude
+ if qWithinInclude != "" {
+ if err := r.SetQueryParam("within_include", qWithinInclude); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_responses.go
new file mode 100644
index 0000000..47a823c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesListReader is a Reader for the IPAMPrefixesList structure.
+type IPAMPrefixesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesListOK creates a IPAMPrefixesListOK with default headers values
+func NewIPAMPrefixesListOK() *IPAMPrefixesListOK {
+ return &IPAMPrefixesListOK{}
+}
+
+/*IPAMPrefixesListOK handles this case with default header values.
+
+IPAMPrefixesListOK ipam prefixes list o k
+*/
+type IPAMPrefixesListOK struct {
+ Payload *models.IPAMPrefixesListOKBody
+}
+
+func (o *IPAMPrefixesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/prefixes/][%d] ipamPrefixesListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMPrefixesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_parameters.go
new file mode 100644
index 0000000..d48c984
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMPrefixesPartialUpdateParams creates a new IPAMPrefixesPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMPrefixesPartialUpdateParams() *IPAMPrefixesPartialUpdateParams {
+ var ()
+ return &IPAMPrefixesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesPartialUpdateParamsWithTimeout creates a new IPAMPrefixesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesPartialUpdateParams {
+ var ()
+ return &IPAMPrefixesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesPartialUpdateParamsWithContext creates a new IPAMPrefixesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesPartialUpdateParamsWithContext(ctx context.Context) *IPAMPrefixesPartialUpdateParams {
+ var ()
+ return &IPAMPrefixesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesPartialUpdateParamsWithHTTPClient creates a new IPAMPrefixesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesPartialUpdateParams {
+ var ()
+ return &IPAMPrefixesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam prefixes partial update operation typically these are written to a http.Request
+*/
+type IPAMPrefixesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePrefix
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) WithContext(ctx context.Context) *IPAMPrefixesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) SetData(data *models.WritablePrefix) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) WithID(id int64) *IPAMPrefixesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes partial update params
+func (o *IPAMPrefixesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_responses.go
new file mode 100644
index 0000000..96e1838
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesPartialUpdateReader is a Reader for the IPAMPrefixesPartialUpdate structure.
+type IPAMPrefixesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesPartialUpdateOK creates a IPAMPrefixesPartialUpdateOK with default headers values
+func NewIPAMPrefixesPartialUpdateOK() *IPAMPrefixesPartialUpdateOK {
+ return &IPAMPrefixesPartialUpdateOK{}
+}
+
+/*IPAMPrefixesPartialUpdateOK handles this case with default header values.
+
+IPAMPrefixesPartialUpdateOK ipam prefixes partial update o k
+*/
+type IPAMPrefixesPartialUpdateOK struct {
+ Payload *models.WritablePrefix
+}
+
+func (o *IPAMPrefixesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/prefixes/{id}/][%d] ipamPrefixesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePrefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_parameters.go
new file mode 100644
index 0000000..7ec788c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMPrefixesReadParams creates a new IPAMPrefixesReadParams object
+// with the default values initialized.
+func NewIPAMPrefixesReadParams() *IPAMPrefixesReadParams {
+ var ()
+ return &IPAMPrefixesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesReadParamsWithTimeout creates a new IPAMPrefixesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesReadParamsWithTimeout(timeout time.Duration) *IPAMPrefixesReadParams {
+ var ()
+ return &IPAMPrefixesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesReadParamsWithContext creates a new IPAMPrefixesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesReadParamsWithContext(ctx context.Context) *IPAMPrefixesReadParams {
+ var ()
+ return &IPAMPrefixesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesReadParamsWithHTTPClient creates a new IPAMPrefixesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesReadParamsWithHTTPClient(client *http.Client) *IPAMPrefixesReadParams {
+ var ()
+ return &IPAMPrefixesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesReadParams contains all the parameters to send to the API endpoint
+for the ipam prefixes read operation typically these are written to a http.Request
+*/
+type IPAMPrefixesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) WithTimeout(timeout time.Duration) *IPAMPrefixesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) WithContext(ctx context.Context) *IPAMPrefixesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) WithHTTPClient(client *http.Client) *IPAMPrefixesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) WithID(id int64) *IPAMPrefixesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes read params
+func (o *IPAMPrefixesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_responses.go
new file mode 100644
index 0000000..b86b914
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesReadReader is a Reader for the IPAMPrefixesRead structure.
+type IPAMPrefixesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesReadOK creates a IPAMPrefixesReadOK with default headers values
+func NewIPAMPrefixesReadOK() *IPAMPrefixesReadOK {
+ return &IPAMPrefixesReadOK{}
+}
+
+/*IPAMPrefixesReadOK handles this case with default header values.
+
+IPAMPrefixesReadOK ipam prefixes read o k
+*/
+type IPAMPrefixesReadOK struct {
+ Payload *models.Prefix
+}
+
+func (o *IPAMPrefixesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/prefixes/{id}/][%d] ipamPrefixesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Prefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_parameters.go
new file mode 100644
index 0000000..8d44888
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMPrefixesUpdateParams creates a new IPAMPrefixesUpdateParams object
+// with the default values initialized.
+func NewIPAMPrefixesUpdateParams() *IPAMPrefixesUpdateParams {
+ var ()
+ return &IPAMPrefixesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMPrefixesUpdateParamsWithTimeout creates a new IPAMPrefixesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMPrefixesUpdateParamsWithTimeout(timeout time.Duration) *IPAMPrefixesUpdateParams {
+ var ()
+ return &IPAMPrefixesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMPrefixesUpdateParamsWithContext creates a new IPAMPrefixesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMPrefixesUpdateParamsWithContext(ctx context.Context) *IPAMPrefixesUpdateParams {
+ var ()
+ return &IPAMPrefixesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMPrefixesUpdateParamsWithHTTPClient creates a new IPAMPrefixesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMPrefixesUpdateParamsWithHTTPClient(client *http.Client) *IPAMPrefixesUpdateParams {
+ var ()
+ return &IPAMPrefixesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMPrefixesUpdateParams contains all the parameters to send to the API endpoint
+for the ipam prefixes update operation typically these are written to a http.Request
+*/
+type IPAMPrefixesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritablePrefix
+ /*ID
+ A unique integer value identifying this prefix.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) WithTimeout(timeout time.Duration) *IPAMPrefixesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) WithContext(ctx context.Context) *IPAMPrefixesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) WithHTTPClient(client *http.Client) *IPAMPrefixesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) WithData(data *models.WritablePrefix) *IPAMPrefixesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) SetData(data *models.WritablePrefix) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) WithID(id int64) *IPAMPrefixesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam prefixes update params
+func (o *IPAMPrefixesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMPrefixesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_responses.go
new file mode 100644
index 0000000..d292f5e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amprefixes_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMPrefixesUpdateReader is a Reader for the IPAMPrefixesUpdate structure.
+type IPAMPrefixesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMPrefixesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMPrefixesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMPrefixesUpdateOK creates a IPAMPrefixesUpdateOK with default headers values
+func NewIPAMPrefixesUpdateOK() *IPAMPrefixesUpdateOK {
+ return &IPAMPrefixesUpdateOK{}
+}
+
+/*IPAMPrefixesUpdateOK handles this case with default header values.
+
+IPAMPrefixesUpdateOK ipam prefixes update o k
+*/
+type IPAMPrefixesUpdateOK struct {
+ Payload *models.WritablePrefix
+}
+
+func (o *IPAMPrefixesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/prefixes/{id}/][%d] ipamPrefixesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMPrefixesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritablePrefix)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_parameters.go
new file mode 100644
index 0000000..d0f1747
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRirsCreateParams creates a new IPAMRirsCreateParams object
+// with the default values initialized.
+func NewIPAMRirsCreateParams() *IPAMRirsCreateParams {
+ var ()
+ return &IPAMRirsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsCreateParamsWithTimeout creates a new IPAMRirsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsCreateParamsWithTimeout(timeout time.Duration) *IPAMRirsCreateParams {
+ var ()
+ return &IPAMRirsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsCreateParamsWithContext creates a new IPAMRirsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsCreateParamsWithContext(ctx context.Context) *IPAMRirsCreateParams {
+ var ()
+ return &IPAMRirsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsCreateParamsWithHTTPClient creates a new IPAMRirsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsCreateParamsWithHTTPClient(client *http.Client) *IPAMRirsCreateParams {
+ var ()
+ return &IPAMRirsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsCreateParams contains all the parameters to send to the API endpoint
+for the ipam rirs create operation typically these are written to a http.Request
+*/
+type IPAMRirsCreateParams struct {
+
+ /*Data*/
+ Data *models.RIR
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs create params
+func (o *IPAMRirsCreateParams) WithTimeout(timeout time.Duration) *IPAMRirsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs create params
+func (o *IPAMRirsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs create params
+func (o *IPAMRirsCreateParams) WithContext(ctx context.Context) *IPAMRirsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs create params
+func (o *IPAMRirsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs create params
+func (o *IPAMRirsCreateParams) WithHTTPClient(client *http.Client) *IPAMRirsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs create params
+func (o *IPAMRirsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam rirs create params
+func (o *IPAMRirsCreateParams) WithData(data *models.RIR) *IPAMRirsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam rirs create params
+func (o *IPAMRirsCreateParams) SetData(data *models.RIR) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_responses.go
new file mode 100644
index 0000000..6bc360b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRirsCreateReader is a Reader for the IPAMRirsCreate structure.
+type IPAMRirsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMRirsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsCreateCreated creates a IPAMRirsCreateCreated with default headers values
+func NewIPAMRirsCreateCreated() *IPAMRirsCreateCreated {
+ return &IPAMRirsCreateCreated{}
+}
+
+/*IPAMRirsCreateCreated handles this case with default header values.
+
+IPAMRirsCreateCreated ipam rirs create created
+*/
+type IPAMRirsCreateCreated struct {
+ Payload *models.RIR
+}
+
+func (o *IPAMRirsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/rirs/][%d] ipamRirsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMRirsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RIR)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_parameters.go
new file mode 100644
index 0000000..17f1be4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRirsDeleteParams creates a new IPAMRirsDeleteParams object
+// with the default values initialized.
+func NewIPAMRirsDeleteParams() *IPAMRirsDeleteParams {
+ var ()
+ return &IPAMRirsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsDeleteParamsWithTimeout creates a new IPAMRirsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsDeleteParamsWithTimeout(timeout time.Duration) *IPAMRirsDeleteParams {
+ var ()
+ return &IPAMRirsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsDeleteParamsWithContext creates a new IPAMRirsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsDeleteParamsWithContext(ctx context.Context) *IPAMRirsDeleteParams {
+ var ()
+ return &IPAMRirsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsDeleteParamsWithHTTPClient creates a new IPAMRirsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsDeleteParamsWithHTTPClient(client *http.Client) *IPAMRirsDeleteParams {
+ var ()
+ return &IPAMRirsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsDeleteParams contains all the parameters to send to the API endpoint
+for the ipam rirs delete operation typically these are written to a http.Request
+*/
+type IPAMRirsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this RIR.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) WithTimeout(timeout time.Duration) *IPAMRirsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) WithContext(ctx context.Context) *IPAMRirsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) WithHTTPClient(client *http.Client) *IPAMRirsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) WithID(id int64) *IPAMRirsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam rirs delete params
+func (o *IPAMRirsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_responses.go
new file mode 100644
index 0000000..2aeebcb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMRirsDeleteReader is a Reader for the IPAMRirsDelete structure.
+type IPAMRirsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMRirsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsDeleteNoContent creates a IPAMRirsDeleteNoContent with default headers values
+func NewIPAMRirsDeleteNoContent() *IPAMRirsDeleteNoContent {
+ return &IPAMRirsDeleteNoContent{}
+}
+
+/*IPAMRirsDeleteNoContent handles this case with default header values.
+
+IPAMRirsDeleteNoContent ipam rirs delete no content
+*/
+type IPAMRirsDeleteNoContent struct {
+}
+
+func (o *IPAMRirsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/rirs/{id}/][%d] ipamRirsDeleteNoContent ", 204)
+}
+
+func (o *IPAMRirsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_parameters.go
new file mode 100644
index 0000000..26d18de
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_parameters.go
@@ -0,0 +1,314 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRirsListParams creates a new IPAMRirsListParams object
+// with the default values initialized.
+func NewIPAMRirsListParams() *IPAMRirsListParams {
+ var ()
+ return &IPAMRirsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsListParamsWithTimeout creates a new IPAMRirsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsListParamsWithTimeout(timeout time.Duration) *IPAMRirsListParams {
+ var ()
+ return &IPAMRirsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsListParamsWithContext creates a new IPAMRirsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsListParamsWithContext(ctx context.Context) *IPAMRirsListParams {
+ var ()
+ return &IPAMRirsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsListParamsWithHTTPClient creates a new IPAMRirsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsListParamsWithHTTPClient(client *http.Client) *IPAMRirsListParams {
+ var ()
+ return &IPAMRirsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsListParams contains all the parameters to send to the API endpoint
+for the ipam rirs list operation typically these are written to a http.Request
+*/
+type IPAMRirsListParams struct {
+
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*IsPrivate*/
+ IsPrivate *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs list params
+func (o *IPAMRirsListParams) WithTimeout(timeout time.Duration) *IPAMRirsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs list params
+func (o *IPAMRirsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs list params
+func (o *IPAMRirsListParams) WithContext(ctx context.Context) *IPAMRirsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs list params
+func (o *IPAMRirsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs list params
+func (o *IPAMRirsListParams) WithHTTPClient(client *http.Client) *IPAMRirsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs list params
+func (o *IPAMRirsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithIDIn adds the iDIn to the ipam rirs list params
+func (o *IPAMRirsListParams) WithIDIn(iDIn *string) *IPAMRirsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam rirs list params
+func (o *IPAMRirsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithIsPrivate adds the isPrivate to the ipam rirs list params
+func (o *IPAMRirsListParams) WithIsPrivate(isPrivate *string) *IPAMRirsListParams {
+ o.SetIsPrivate(isPrivate)
+ return o
+}
+
+// SetIsPrivate adds the isPrivate to the ipam rirs list params
+func (o *IPAMRirsListParams) SetIsPrivate(isPrivate *string) {
+ o.IsPrivate = isPrivate
+}
+
+// WithLimit adds the limit to the ipam rirs list params
+func (o *IPAMRirsListParams) WithLimit(limit *int64) *IPAMRirsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam rirs list params
+func (o *IPAMRirsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam rirs list params
+func (o *IPAMRirsListParams) WithName(name *string) *IPAMRirsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam rirs list params
+func (o *IPAMRirsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam rirs list params
+func (o *IPAMRirsListParams) WithOffset(offset *int64) *IPAMRirsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam rirs list params
+func (o *IPAMRirsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the ipam rirs list params
+func (o *IPAMRirsListParams) WithSlug(slug *string) *IPAMRirsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the ipam rirs list params
+func (o *IPAMRirsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IsPrivate != nil {
+
+ // query param is_private
+ var qrIsPrivate string
+ if o.IsPrivate != nil {
+ qrIsPrivate = *o.IsPrivate
+ }
+ qIsPrivate := qrIsPrivate
+ if qIsPrivate != "" {
+ if err := r.SetQueryParam("is_private", qIsPrivate); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_responses.go
new file mode 100644
index 0000000..4cdfdd8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRirsListReader is a Reader for the IPAMRirsList structure.
+type IPAMRirsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRirsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsListOK creates a IPAMRirsListOK with default headers values
+func NewIPAMRirsListOK() *IPAMRirsListOK {
+ return &IPAMRirsListOK{}
+}
+
+/*IPAMRirsListOK handles this case with default header values.
+
+IPAMRirsListOK ipam rirs list o k
+*/
+type IPAMRirsListOK struct {
+ Payload *models.IPAMRirsListOKBody
+}
+
+func (o *IPAMRirsListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/rirs/][%d] ipamRirsListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRirsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMRirsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_parameters.go
new file mode 100644
index 0000000..9f6f306
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRirsPartialUpdateParams creates a new IPAMRirsPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMRirsPartialUpdateParams() *IPAMRirsPartialUpdateParams {
+ var ()
+ return &IPAMRirsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsPartialUpdateParamsWithTimeout creates a new IPAMRirsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMRirsPartialUpdateParams {
+ var ()
+ return &IPAMRirsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsPartialUpdateParamsWithContext creates a new IPAMRirsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsPartialUpdateParamsWithContext(ctx context.Context) *IPAMRirsPartialUpdateParams {
+ var ()
+ return &IPAMRirsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsPartialUpdateParamsWithHTTPClient creates a new IPAMRirsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMRirsPartialUpdateParams {
+ var ()
+ return &IPAMRirsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam rirs partial update operation typically these are written to a http.Request
+*/
+type IPAMRirsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.RIR
+ /*ID
+ A unique integer value identifying this RIR.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMRirsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) WithContext(ctx context.Context) *IPAMRirsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMRirsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) WithData(data *models.RIR) *IPAMRirsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) SetData(data *models.RIR) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) WithID(id int64) *IPAMRirsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam rirs partial update params
+func (o *IPAMRirsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_responses.go
new file mode 100644
index 0000000..fc3375b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRirsPartialUpdateReader is a Reader for the IPAMRirsPartialUpdate structure.
+type IPAMRirsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRirsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsPartialUpdateOK creates a IPAMRirsPartialUpdateOK with default headers values
+func NewIPAMRirsPartialUpdateOK() *IPAMRirsPartialUpdateOK {
+ return &IPAMRirsPartialUpdateOK{}
+}
+
+/*IPAMRirsPartialUpdateOK handles this case with default header values.
+
+IPAMRirsPartialUpdateOK ipam rirs partial update o k
+*/
+type IPAMRirsPartialUpdateOK struct {
+ Payload *models.RIR
+}
+
+func (o *IPAMRirsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/rirs/{id}/][%d] ipamRirsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRirsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RIR)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_parameters.go
new file mode 100644
index 0000000..5a09b46
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRirsReadParams creates a new IPAMRirsReadParams object
+// with the default values initialized.
+func NewIPAMRirsReadParams() *IPAMRirsReadParams {
+ var ()
+ return &IPAMRirsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsReadParamsWithTimeout creates a new IPAMRirsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsReadParamsWithTimeout(timeout time.Duration) *IPAMRirsReadParams {
+ var ()
+ return &IPAMRirsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsReadParamsWithContext creates a new IPAMRirsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsReadParamsWithContext(ctx context.Context) *IPAMRirsReadParams {
+ var ()
+ return &IPAMRirsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsReadParamsWithHTTPClient creates a new IPAMRirsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsReadParamsWithHTTPClient(client *http.Client) *IPAMRirsReadParams {
+ var ()
+ return &IPAMRirsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsReadParams contains all the parameters to send to the API endpoint
+for the ipam rirs read operation typically these are written to a http.Request
+*/
+type IPAMRirsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this RIR.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs read params
+func (o *IPAMRirsReadParams) WithTimeout(timeout time.Duration) *IPAMRirsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs read params
+func (o *IPAMRirsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs read params
+func (o *IPAMRirsReadParams) WithContext(ctx context.Context) *IPAMRirsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs read params
+func (o *IPAMRirsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs read params
+func (o *IPAMRirsReadParams) WithHTTPClient(client *http.Client) *IPAMRirsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs read params
+func (o *IPAMRirsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam rirs read params
+func (o *IPAMRirsReadParams) WithID(id int64) *IPAMRirsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam rirs read params
+func (o *IPAMRirsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_responses.go
new file mode 100644
index 0000000..8a2865c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRirsReadReader is a Reader for the IPAMRirsRead structure.
+type IPAMRirsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRirsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsReadOK creates a IPAMRirsReadOK with default headers values
+func NewIPAMRirsReadOK() *IPAMRirsReadOK {
+ return &IPAMRirsReadOK{}
+}
+
+/*IPAMRirsReadOK handles this case with default header values.
+
+IPAMRirsReadOK ipam rirs read o k
+*/
+type IPAMRirsReadOK struct {
+ Payload *models.RIR
+}
+
+func (o *IPAMRirsReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/rirs/{id}/][%d] ipamRirsReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRirsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RIR)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_parameters.go
new file mode 100644
index 0000000..3f0622f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRirsUpdateParams creates a new IPAMRirsUpdateParams object
+// with the default values initialized.
+func NewIPAMRirsUpdateParams() *IPAMRirsUpdateParams {
+ var ()
+ return &IPAMRirsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRirsUpdateParamsWithTimeout creates a new IPAMRirsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRirsUpdateParamsWithTimeout(timeout time.Duration) *IPAMRirsUpdateParams {
+ var ()
+ return &IPAMRirsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRirsUpdateParamsWithContext creates a new IPAMRirsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRirsUpdateParamsWithContext(ctx context.Context) *IPAMRirsUpdateParams {
+ var ()
+ return &IPAMRirsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRirsUpdateParamsWithHTTPClient creates a new IPAMRirsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRirsUpdateParamsWithHTTPClient(client *http.Client) *IPAMRirsUpdateParams {
+ var ()
+ return &IPAMRirsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRirsUpdateParams contains all the parameters to send to the API endpoint
+for the ipam rirs update operation typically these are written to a http.Request
+*/
+type IPAMRirsUpdateParams struct {
+
+ /*Data*/
+ Data *models.RIR
+ /*ID
+ A unique integer value identifying this RIR.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) WithTimeout(timeout time.Duration) *IPAMRirsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) WithContext(ctx context.Context) *IPAMRirsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) WithHTTPClient(client *http.Client) *IPAMRirsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) WithData(data *models.RIR) *IPAMRirsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) SetData(data *models.RIR) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) WithID(id int64) *IPAMRirsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam rirs update params
+func (o *IPAMRirsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRirsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_responses.go
new file mode 100644
index 0000000..1ca5248
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amrirs_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRirsUpdateReader is a Reader for the IPAMRirsUpdate structure.
+type IPAMRirsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRirsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRirsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRirsUpdateOK creates a IPAMRirsUpdateOK with default headers values
+func NewIPAMRirsUpdateOK() *IPAMRirsUpdateOK {
+ return &IPAMRirsUpdateOK{}
+}
+
+/*IPAMRirsUpdateOK handles this case with default header values.
+
+IPAMRirsUpdateOK ipam rirs update o k
+*/
+type IPAMRirsUpdateOK struct {
+ Payload *models.RIR
+}
+
+func (o *IPAMRirsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/rirs/{id}/][%d] ipamRirsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRirsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.RIR)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_parameters.go
new file mode 100644
index 0000000..a5fd443
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRolesCreateParams creates a new IPAMRolesCreateParams object
+// with the default values initialized.
+func NewIPAMRolesCreateParams() *IPAMRolesCreateParams {
+ var ()
+ return &IPAMRolesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesCreateParamsWithTimeout creates a new IPAMRolesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesCreateParamsWithTimeout(timeout time.Duration) *IPAMRolesCreateParams {
+ var ()
+ return &IPAMRolesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesCreateParamsWithContext creates a new IPAMRolesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesCreateParamsWithContext(ctx context.Context) *IPAMRolesCreateParams {
+ var ()
+ return &IPAMRolesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesCreateParamsWithHTTPClient creates a new IPAMRolesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesCreateParamsWithHTTPClient(client *http.Client) *IPAMRolesCreateParams {
+ var ()
+ return &IPAMRolesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesCreateParams contains all the parameters to send to the API endpoint
+for the ipam roles create operation typically these are written to a http.Request
+*/
+type IPAMRolesCreateParams struct {
+
+ /*Data*/
+ Data *models.Role
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles create params
+func (o *IPAMRolesCreateParams) WithTimeout(timeout time.Duration) *IPAMRolesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles create params
+func (o *IPAMRolesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles create params
+func (o *IPAMRolesCreateParams) WithContext(ctx context.Context) *IPAMRolesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles create params
+func (o *IPAMRolesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles create params
+func (o *IPAMRolesCreateParams) WithHTTPClient(client *http.Client) *IPAMRolesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles create params
+func (o *IPAMRolesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam roles create params
+func (o *IPAMRolesCreateParams) WithData(data *models.Role) *IPAMRolesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam roles create params
+func (o *IPAMRolesCreateParams) SetData(data *models.Role) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_responses.go
new file mode 100644
index 0000000..05fe3d7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRolesCreateReader is a Reader for the IPAMRolesCreate structure.
+type IPAMRolesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMRolesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesCreateCreated creates a IPAMRolesCreateCreated with default headers values
+func NewIPAMRolesCreateCreated() *IPAMRolesCreateCreated {
+ return &IPAMRolesCreateCreated{}
+}
+
+/*IPAMRolesCreateCreated handles this case with default header values.
+
+IPAMRolesCreateCreated ipam roles create created
+*/
+type IPAMRolesCreateCreated struct {
+ Payload *models.Role
+}
+
+func (o *IPAMRolesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/roles/][%d] ipamRolesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Role)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_parameters.go
new file mode 100644
index 0000000..98f1227
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRolesDeleteParams creates a new IPAMRolesDeleteParams object
+// with the default values initialized.
+func NewIPAMRolesDeleteParams() *IPAMRolesDeleteParams {
+ var ()
+ return &IPAMRolesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesDeleteParamsWithTimeout creates a new IPAMRolesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesDeleteParamsWithTimeout(timeout time.Duration) *IPAMRolesDeleteParams {
+ var ()
+ return &IPAMRolesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesDeleteParamsWithContext creates a new IPAMRolesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesDeleteParamsWithContext(ctx context.Context) *IPAMRolesDeleteParams {
+ var ()
+ return &IPAMRolesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesDeleteParamsWithHTTPClient creates a new IPAMRolesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesDeleteParamsWithHTTPClient(client *http.Client) *IPAMRolesDeleteParams {
+ var ()
+ return &IPAMRolesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesDeleteParams contains all the parameters to send to the API endpoint
+for the ipam roles delete operation typically these are written to a http.Request
+*/
+type IPAMRolesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) WithTimeout(timeout time.Duration) *IPAMRolesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) WithContext(ctx context.Context) *IPAMRolesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) WithHTTPClient(client *http.Client) *IPAMRolesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) WithID(id int64) *IPAMRolesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam roles delete params
+func (o *IPAMRolesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_responses.go
new file mode 100644
index 0000000..6a5e17d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMRolesDeleteReader is a Reader for the IPAMRolesDelete structure.
+type IPAMRolesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMRolesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesDeleteNoContent creates a IPAMRolesDeleteNoContent with default headers values
+func NewIPAMRolesDeleteNoContent() *IPAMRolesDeleteNoContent {
+ return &IPAMRolesDeleteNoContent{}
+}
+
+/*IPAMRolesDeleteNoContent handles this case with default header values.
+
+IPAMRolesDeleteNoContent ipam roles delete no content
+*/
+type IPAMRolesDeleteNoContent struct {
+}
+
+func (o *IPAMRolesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/roles/{id}/][%d] ipamRolesDeleteNoContent ", 204)
+}
+
+func (o *IPAMRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_parameters.go
new file mode 100644
index 0000000..fb3f801
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRolesListParams creates a new IPAMRolesListParams object
+// with the default values initialized.
+func NewIPAMRolesListParams() *IPAMRolesListParams {
+ var ()
+ return &IPAMRolesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesListParamsWithTimeout creates a new IPAMRolesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesListParamsWithTimeout(timeout time.Duration) *IPAMRolesListParams {
+ var ()
+ return &IPAMRolesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesListParamsWithContext creates a new IPAMRolesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesListParamsWithContext(ctx context.Context) *IPAMRolesListParams {
+ var ()
+ return &IPAMRolesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesListParamsWithHTTPClient creates a new IPAMRolesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesListParamsWithHTTPClient(client *http.Client) *IPAMRolesListParams {
+ var ()
+ return &IPAMRolesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesListParams contains all the parameters to send to the API endpoint
+for the ipam roles list operation typically these are written to a http.Request
+*/
+type IPAMRolesListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles list params
+func (o *IPAMRolesListParams) WithTimeout(timeout time.Duration) *IPAMRolesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles list params
+func (o *IPAMRolesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles list params
+func (o *IPAMRolesListParams) WithContext(ctx context.Context) *IPAMRolesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles list params
+func (o *IPAMRolesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles list params
+func (o *IPAMRolesListParams) WithHTTPClient(client *http.Client) *IPAMRolesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles list params
+func (o *IPAMRolesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the ipam roles list params
+func (o *IPAMRolesListParams) WithLimit(limit *int64) *IPAMRolesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam roles list params
+func (o *IPAMRolesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam roles list params
+func (o *IPAMRolesListParams) WithName(name *string) *IPAMRolesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam roles list params
+func (o *IPAMRolesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam roles list params
+func (o *IPAMRolesListParams) WithOffset(offset *int64) *IPAMRolesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam roles list params
+func (o *IPAMRolesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the ipam roles list params
+func (o *IPAMRolesListParams) WithSlug(slug *string) *IPAMRolesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the ipam roles list params
+func (o *IPAMRolesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_responses.go
new file mode 100644
index 0000000..984bfb9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRolesListReader is a Reader for the IPAMRolesList structure.
+type IPAMRolesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRolesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesListOK creates a IPAMRolesListOK with default headers values
+func NewIPAMRolesListOK() *IPAMRolesListOK {
+ return &IPAMRolesListOK{}
+}
+
+/*IPAMRolesListOK handles this case with default header values.
+
+IPAMRolesListOK ipam roles list o k
+*/
+type IPAMRolesListOK struct {
+ Payload *models.IPAMRolesListOKBody
+}
+
+func (o *IPAMRolesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/roles/][%d] ipamRolesListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMRolesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_parameters.go
new file mode 100644
index 0000000..192bcb0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRolesPartialUpdateParams creates a new IPAMRolesPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMRolesPartialUpdateParams() *IPAMRolesPartialUpdateParams {
+ var ()
+ return &IPAMRolesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesPartialUpdateParamsWithTimeout creates a new IPAMRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMRolesPartialUpdateParams {
+ var ()
+ return &IPAMRolesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesPartialUpdateParamsWithContext creates a new IPAMRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesPartialUpdateParamsWithContext(ctx context.Context) *IPAMRolesPartialUpdateParams {
+ var ()
+ return &IPAMRolesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesPartialUpdateParamsWithHTTPClient creates a new IPAMRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMRolesPartialUpdateParams {
+ var ()
+ return &IPAMRolesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam roles partial update operation typically these are written to a http.Request
+*/
+type IPAMRolesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.Role
+ /*ID
+ A unique integer value identifying this role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMRolesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) WithContext(ctx context.Context) *IPAMRolesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMRolesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) WithData(data *models.Role) *IPAMRolesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) SetData(data *models.Role) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) WithID(id int64) *IPAMRolesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam roles partial update params
+func (o *IPAMRolesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_responses.go
new file mode 100644
index 0000000..f2dd6ad
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRolesPartialUpdateReader is a Reader for the IPAMRolesPartialUpdate structure.
+type IPAMRolesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRolesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesPartialUpdateOK creates a IPAMRolesPartialUpdateOK with default headers values
+func NewIPAMRolesPartialUpdateOK() *IPAMRolesPartialUpdateOK {
+ return &IPAMRolesPartialUpdateOK{}
+}
+
+/*IPAMRolesPartialUpdateOK handles this case with default header values.
+
+IPAMRolesPartialUpdateOK ipam roles partial update o k
+*/
+type IPAMRolesPartialUpdateOK struct {
+ Payload *models.Role
+}
+
+func (o *IPAMRolesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/roles/{id}/][%d] ipamRolesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Role)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_parameters.go
new file mode 100644
index 0000000..0543e0f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMRolesReadParams creates a new IPAMRolesReadParams object
+// with the default values initialized.
+func NewIPAMRolesReadParams() *IPAMRolesReadParams {
+ var ()
+ return &IPAMRolesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesReadParamsWithTimeout creates a new IPAMRolesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesReadParamsWithTimeout(timeout time.Duration) *IPAMRolesReadParams {
+ var ()
+ return &IPAMRolesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesReadParamsWithContext creates a new IPAMRolesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesReadParamsWithContext(ctx context.Context) *IPAMRolesReadParams {
+ var ()
+ return &IPAMRolesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesReadParamsWithHTTPClient creates a new IPAMRolesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesReadParamsWithHTTPClient(client *http.Client) *IPAMRolesReadParams {
+ var ()
+ return &IPAMRolesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesReadParams contains all the parameters to send to the API endpoint
+for the ipam roles read operation typically these are written to a http.Request
+*/
+type IPAMRolesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles read params
+func (o *IPAMRolesReadParams) WithTimeout(timeout time.Duration) *IPAMRolesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles read params
+func (o *IPAMRolesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles read params
+func (o *IPAMRolesReadParams) WithContext(ctx context.Context) *IPAMRolesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles read params
+func (o *IPAMRolesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles read params
+func (o *IPAMRolesReadParams) WithHTTPClient(client *http.Client) *IPAMRolesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles read params
+func (o *IPAMRolesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam roles read params
+func (o *IPAMRolesReadParams) WithID(id int64) *IPAMRolesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam roles read params
+func (o *IPAMRolesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_responses.go
new file mode 100644
index 0000000..055923d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRolesReadReader is a Reader for the IPAMRolesRead structure.
+type IPAMRolesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRolesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesReadOK creates a IPAMRolesReadOK with default headers values
+func NewIPAMRolesReadOK() *IPAMRolesReadOK {
+ return &IPAMRolesReadOK{}
+}
+
+/*IPAMRolesReadOK handles this case with default header values.
+
+IPAMRolesReadOK ipam roles read o k
+*/
+type IPAMRolesReadOK struct {
+ Payload *models.Role
+}
+
+func (o *IPAMRolesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/roles/{id}/][%d] ipamRolesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Role)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_parameters.go
new file mode 100644
index 0000000..86cd84e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMRolesUpdateParams creates a new IPAMRolesUpdateParams object
+// with the default values initialized.
+func NewIPAMRolesUpdateParams() *IPAMRolesUpdateParams {
+ var ()
+ return &IPAMRolesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMRolesUpdateParamsWithTimeout creates a new IPAMRolesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMRolesUpdateParamsWithTimeout(timeout time.Duration) *IPAMRolesUpdateParams {
+ var ()
+ return &IPAMRolesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMRolesUpdateParamsWithContext creates a new IPAMRolesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMRolesUpdateParamsWithContext(ctx context.Context) *IPAMRolesUpdateParams {
+ var ()
+ return &IPAMRolesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMRolesUpdateParamsWithHTTPClient creates a new IPAMRolesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMRolesUpdateParamsWithHTTPClient(client *http.Client) *IPAMRolesUpdateParams {
+ var ()
+ return &IPAMRolesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMRolesUpdateParams contains all the parameters to send to the API endpoint
+for the ipam roles update operation typically these are written to a http.Request
+*/
+type IPAMRolesUpdateParams struct {
+
+ /*Data*/
+ Data *models.Role
+ /*ID
+ A unique integer value identifying this role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam roles update params
+func (o *IPAMRolesUpdateParams) WithTimeout(timeout time.Duration) *IPAMRolesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam roles update params
+func (o *IPAMRolesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam roles update params
+func (o *IPAMRolesUpdateParams) WithContext(ctx context.Context) *IPAMRolesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam roles update params
+func (o *IPAMRolesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam roles update params
+func (o *IPAMRolesUpdateParams) WithHTTPClient(client *http.Client) *IPAMRolesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam roles update params
+func (o *IPAMRolesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam roles update params
+func (o *IPAMRolesUpdateParams) WithData(data *models.Role) *IPAMRolesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam roles update params
+func (o *IPAMRolesUpdateParams) SetData(data *models.Role) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam roles update params
+func (o *IPAMRolesUpdateParams) WithID(id int64) *IPAMRolesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam roles update params
+func (o *IPAMRolesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_responses.go
new file mode 100644
index 0000000..d57107b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amroles_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMRolesUpdateReader is a Reader for the IPAMRolesUpdate structure.
+type IPAMRolesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMRolesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMRolesUpdateOK creates a IPAMRolesUpdateOK with default headers values
+func NewIPAMRolesUpdateOK() *IPAMRolesUpdateOK {
+ return &IPAMRolesUpdateOK{}
+}
+
+/*IPAMRolesUpdateOK handles this case with default header values.
+
+IPAMRolesUpdateOK ipam roles update o k
+*/
+type IPAMRolesUpdateOK struct {
+ Payload *models.Role
+}
+
+func (o *IPAMRolesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/roles/{id}/][%d] ipamRolesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Role)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_parameters.go
new file mode 100644
index 0000000..7b16d42
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMServicesCreateParams creates a new IPAMServicesCreateParams object
+// with the default values initialized.
+func NewIPAMServicesCreateParams() *IPAMServicesCreateParams {
+ var ()
+ return &IPAMServicesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesCreateParamsWithTimeout creates a new IPAMServicesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesCreateParamsWithTimeout(timeout time.Duration) *IPAMServicesCreateParams {
+ var ()
+ return &IPAMServicesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesCreateParamsWithContext creates a new IPAMServicesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesCreateParamsWithContext(ctx context.Context) *IPAMServicesCreateParams {
+ var ()
+ return &IPAMServicesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesCreateParamsWithHTTPClient creates a new IPAMServicesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesCreateParamsWithHTTPClient(client *http.Client) *IPAMServicesCreateParams {
+ var ()
+ return &IPAMServicesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesCreateParams contains all the parameters to send to the API endpoint
+for the ipam services create operation typically these are written to a http.Request
+*/
+type IPAMServicesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableService
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services create params
+func (o *IPAMServicesCreateParams) WithTimeout(timeout time.Duration) *IPAMServicesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services create params
+func (o *IPAMServicesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services create params
+func (o *IPAMServicesCreateParams) WithContext(ctx context.Context) *IPAMServicesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services create params
+func (o *IPAMServicesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services create params
+func (o *IPAMServicesCreateParams) WithHTTPClient(client *http.Client) *IPAMServicesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services create params
+func (o *IPAMServicesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam services create params
+func (o *IPAMServicesCreateParams) WithData(data *models.WritableService) *IPAMServicesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam services create params
+func (o *IPAMServicesCreateParams) SetData(data *models.WritableService) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_responses.go
new file mode 100644
index 0000000..488a672
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMServicesCreateReader is a Reader for the IPAMServicesCreate structure.
+type IPAMServicesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMServicesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesCreateCreated creates a IPAMServicesCreateCreated with default headers values
+func NewIPAMServicesCreateCreated() *IPAMServicesCreateCreated {
+ return &IPAMServicesCreateCreated{}
+}
+
+/*IPAMServicesCreateCreated handles this case with default header values.
+
+IPAMServicesCreateCreated ipam services create created
+*/
+type IPAMServicesCreateCreated struct {
+ Payload *models.WritableService
+}
+
+func (o *IPAMServicesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/services/][%d] ipamServicesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMServicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableService)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_parameters.go
new file mode 100644
index 0000000..f11b0bf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMServicesDeleteParams creates a new IPAMServicesDeleteParams object
+// with the default values initialized.
+func NewIPAMServicesDeleteParams() *IPAMServicesDeleteParams {
+ var ()
+ return &IPAMServicesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesDeleteParamsWithTimeout creates a new IPAMServicesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesDeleteParamsWithTimeout(timeout time.Duration) *IPAMServicesDeleteParams {
+ var ()
+ return &IPAMServicesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesDeleteParamsWithContext creates a new IPAMServicesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesDeleteParamsWithContext(ctx context.Context) *IPAMServicesDeleteParams {
+ var ()
+ return &IPAMServicesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesDeleteParamsWithHTTPClient creates a new IPAMServicesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesDeleteParamsWithHTTPClient(client *http.Client) *IPAMServicesDeleteParams {
+ var ()
+ return &IPAMServicesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesDeleteParams contains all the parameters to send to the API endpoint
+for the ipam services delete operation typically these are written to a http.Request
+*/
+type IPAMServicesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this service.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services delete params
+func (o *IPAMServicesDeleteParams) WithTimeout(timeout time.Duration) *IPAMServicesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services delete params
+func (o *IPAMServicesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services delete params
+func (o *IPAMServicesDeleteParams) WithContext(ctx context.Context) *IPAMServicesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services delete params
+func (o *IPAMServicesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services delete params
+func (o *IPAMServicesDeleteParams) WithHTTPClient(client *http.Client) *IPAMServicesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services delete params
+func (o *IPAMServicesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam services delete params
+func (o *IPAMServicesDeleteParams) WithID(id int64) *IPAMServicesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam services delete params
+func (o *IPAMServicesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_responses.go
new file mode 100644
index 0000000..12b6313
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMServicesDeleteReader is a Reader for the IPAMServicesDelete structure.
+type IPAMServicesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMServicesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesDeleteNoContent creates a IPAMServicesDeleteNoContent with default headers values
+func NewIPAMServicesDeleteNoContent() *IPAMServicesDeleteNoContent {
+ return &IPAMServicesDeleteNoContent{}
+}
+
+/*IPAMServicesDeleteNoContent handles this case with default header values.
+
+IPAMServicesDeleteNoContent ipam services delete no content
+*/
+type IPAMServicesDeleteNoContent struct {
+}
+
+func (o *IPAMServicesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/services/{id}/][%d] ipamServicesDeleteNoContent ", 204)
+}
+
+func (o *IPAMServicesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_parameters.go
new file mode 100644
index 0000000..c854462
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_parameters.go
@@ -0,0 +1,398 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMServicesListParams creates a new IPAMServicesListParams object
+// with the default values initialized.
+func NewIPAMServicesListParams() *IPAMServicesListParams {
+ var ()
+ return &IPAMServicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesListParamsWithTimeout creates a new IPAMServicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesListParamsWithTimeout(timeout time.Duration) *IPAMServicesListParams {
+ var ()
+ return &IPAMServicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesListParamsWithContext creates a new IPAMServicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesListParamsWithContext(ctx context.Context) *IPAMServicesListParams {
+ var ()
+ return &IPAMServicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesListParamsWithHTTPClient creates a new IPAMServicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesListParamsWithHTTPClient(client *http.Client) *IPAMServicesListParams {
+ var ()
+ return &IPAMServicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesListParams contains all the parameters to send to the API endpoint
+for the ipam services list operation typically these are written to a http.Request
+*/
+type IPAMServicesListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Port*/
+ Port *float64
+ /*Protocol*/
+ Protocol *string
+ /*VirtualMachine*/
+ VirtualMachine *string
+ /*VirtualMachineID*/
+ VirtualMachineID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services list params
+func (o *IPAMServicesListParams) WithTimeout(timeout time.Duration) *IPAMServicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services list params
+func (o *IPAMServicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services list params
+func (o *IPAMServicesListParams) WithContext(ctx context.Context) *IPAMServicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services list params
+func (o *IPAMServicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services list params
+func (o *IPAMServicesListParams) WithHTTPClient(client *http.Client) *IPAMServicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services list params
+func (o *IPAMServicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the ipam services list params
+func (o *IPAMServicesListParams) WithDevice(device *string) *IPAMServicesListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the ipam services list params
+func (o *IPAMServicesListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the ipam services list params
+func (o *IPAMServicesListParams) WithDeviceID(deviceID *string) *IPAMServicesListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the ipam services list params
+func (o *IPAMServicesListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithLimit adds the limit to the ipam services list params
+func (o *IPAMServicesListParams) WithLimit(limit *int64) *IPAMServicesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam services list params
+func (o *IPAMServicesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam services list params
+func (o *IPAMServicesListParams) WithName(name *string) *IPAMServicesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam services list params
+func (o *IPAMServicesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam services list params
+func (o *IPAMServicesListParams) WithOffset(offset *int64) *IPAMServicesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam services list params
+func (o *IPAMServicesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithPort adds the port to the ipam services list params
+func (o *IPAMServicesListParams) WithPort(port *float64) *IPAMServicesListParams {
+ o.SetPort(port)
+ return o
+}
+
+// SetPort adds the port to the ipam services list params
+func (o *IPAMServicesListParams) SetPort(port *float64) {
+ o.Port = port
+}
+
+// WithProtocol adds the protocol to the ipam services list params
+func (o *IPAMServicesListParams) WithProtocol(protocol *string) *IPAMServicesListParams {
+ o.SetProtocol(protocol)
+ return o
+}
+
+// SetProtocol adds the protocol to the ipam services list params
+func (o *IPAMServicesListParams) SetProtocol(protocol *string) {
+ o.Protocol = protocol
+}
+
+// WithVirtualMachine adds the virtualMachine to the ipam services list params
+func (o *IPAMServicesListParams) WithVirtualMachine(virtualMachine *string) *IPAMServicesListParams {
+ o.SetVirtualMachine(virtualMachine)
+ return o
+}
+
+// SetVirtualMachine adds the virtualMachine to the ipam services list params
+func (o *IPAMServicesListParams) SetVirtualMachine(virtualMachine *string) {
+ o.VirtualMachine = virtualMachine
+}
+
+// WithVirtualMachineID adds the virtualMachineID to the ipam services list params
+func (o *IPAMServicesListParams) WithVirtualMachineID(virtualMachineID *string) *IPAMServicesListParams {
+ o.SetVirtualMachineID(virtualMachineID)
+ return o
+}
+
+// SetVirtualMachineID adds the virtualMachineId to the ipam services list params
+func (o *IPAMServicesListParams) SetVirtualMachineID(virtualMachineID *string) {
+ o.VirtualMachineID = virtualMachineID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Port != nil {
+
+ // query param port
+ var qrPort float64
+ if o.Port != nil {
+ qrPort = *o.Port
+ }
+ qPort := swag.FormatFloat64(qrPort)
+ if qPort != "" {
+ if err := r.SetQueryParam("port", qPort); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Protocol != nil {
+
+ // query param protocol
+ var qrProtocol string
+ if o.Protocol != nil {
+ qrProtocol = *o.Protocol
+ }
+ qProtocol := qrProtocol
+ if qProtocol != "" {
+ if err := r.SetQueryParam("protocol", qProtocol); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachine != nil {
+
+ // query param virtual_machine
+ var qrVirtualMachine string
+ if o.VirtualMachine != nil {
+ qrVirtualMachine = *o.VirtualMachine
+ }
+ qVirtualMachine := qrVirtualMachine
+ if qVirtualMachine != "" {
+ if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachineID != nil {
+
+ // query param virtual_machine_id
+ var qrVirtualMachineID string
+ if o.VirtualMachineID != nil {
+ qrVirtualMachineID = *o.VirtualMachineID
+ }
+ qVirtualMachineID := qrVirtualMachineID
+ if qVirtualMachineID != "" {
+ if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_responses.go
new file mode 100644
index 0000000..22ec9b4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMServicesListReader is a Reader for the IPAMServicesList structure.
+type IPAMServicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMServicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesListOK creates a IPAMServicesListOK with default headers values
+func NewIPAMServicesListOK() *IPAMServicesListOK {
+ return &IPAMServicesListOK{}
+}
+
+/*IPAMServicesListOK handles this case with default header values.
+
+IPAMServicesListOK ipam services list o k
+*/
+type IPAMServicesListOK struct {
+ Payload *models.IPAMServicesListOKBody
+}
+
+func (o *IPAMServicesListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/services/][%d] ipamServicesListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMServicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMServicesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_parameters.go
new file mode 100644
index 0000000..7363e4e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMServicesPartialUpdateParams creates a new IPAMServicesPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMServicesPartialUpdateParams() *IPAMServicesPartialUpdateParams {
+ var ()
+ return &IPAMServicesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesPartialUpdateParamsWithTimeout creates a new IPAMServicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMServicesPartialUpdateParams {
+ var ()
+ return &IPAMServicesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesPartialUpdateParamsWithContext creates a new IPAMServicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesPartialUpdateParamsWithContext(ctx context.Context) *IPAMServicesPartialUpdateParams {
+ var ()
+ return &IPAMServicesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesPartialUpdateParamsWithHTTPClient creates a new IPAMServicesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMServicesPartialUpdateParams {
+ var ()
+ return &IPAMServicesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam services partial update operation typically these are written to a http.Request
+*/
+type IPAMServicesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableService
+ /*ID
+ A unique integer value identifying this service.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMServicesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) WithContext(ctx context.Context) *IPAMServicesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMServicesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) WithData(data *models.WritableService) *IPAMServicesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) SetData(data *models.WritableService) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) WithID(id int64) *IPAMServicesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam services partial update params
+func (o *IPAMServicesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_responses.go
new file mode 100644
index 0000000..db21bb7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMServicesPartialUpdateReader is a Reader for the IPAMServicesPartialUpdate structure.
+type IPAMServicesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMServicesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesPartialUpdateOK creates a IPAMServicesPartialUpdateOK with default headers values
+func NewIPAMServicesPartialUpdateOK() *IPAMServicesPartialUpdateOK {
+ return &IPAMServicesPartialUpdateOK{}
+}
+
+/*IPAMServicesPartialUpdateOK handles this case with default header values.
+
+IPAMServicesPartialUpdateOK ipam services partial update o k
+*/
+type IPAMServicesPartialUpdateOK struct {
+ Payload *models.WritableService
+}
+
+func (o *IPAMServicesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/services/{id}/][%d] ipamServicesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMServicesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableService)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_parameters.go
new file mode 100644
index 0000000..6a9dae2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMServicesReadParams creates a new IPAMServicesReadParams object
+// with the default values initialized.
+func NewIPAMServicesReadParams() *IPAMServicesReadParams {
+ var ()
+ return &IPAMServicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesReadParamsWithTimeout creates a new IPAMServicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesReadParamsWithTimeout(timeout time.Duration) *IPAMServicesReadParams {
+ var ()
+ return &IPAMServicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesReadParamsWithContext creates a new IPAMServicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesReadParamsWithContext(ctx context.Context) *IPAMServicesReadParams {
+ var ()
+ return &IPAMServicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesReadParamsWithHTTPClient creates a new IPAMServicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesReadParamsWithHTTPClient(client *http.Client) *IPAMServicesReadParams {
+ var ()
+ return &IPAMServicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesReadParams contains all the parameters to send to the API endpoint
+for the ipam services read operation typically these are written to a http.Request
+*/
+type IPAMServicesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this service.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services read params
+func (o *IPAMServicesReadParams) WithTimeout(timeout time.Duration) *IPAMServicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services read params
+func (o *IPAMServicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services read params
+func (o *IPAMServicesReadParams) WithContext(ctx context.Context) *IPAMServicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services read params
+func (o *IPAMServicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services read params
+func (o *IPAMServicesReadParams) WithHTTPClient(client *http.Client) *IPAMServicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services read params
+func (o *IPAMServicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam services read params
+func (o *IPAMServicesReadParams) WithID(id int64) *IPAMServicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam services read params
+func (o *IPAMServicesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_responses.go
new file mode 100644
index 0000000..01d78a3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMServicesReadReader is a Reader for the IPAMServicesRead structure.
+type IPAMServicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMServicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesReadOK creates a IPAMServicesReadOK with default headers values
+func NewIPAMServicesReadOK() *IPAMServicesReadOK {
+ return &IPAMServicesReadOK{}
+}
+
+/*IPAMServicesReadOK handles this case with default header values.
+
+IPAMServicesReadOK ipam services read o k
+*/
+type IPAMServicesReadOK struct {
+ Payload *models.Service
+}
+
+func (o *IPAMServicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/services/{id}/][%d] ipamServicesReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMServicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Service)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_parameters.go
new file mode 100644
index 0000000..e423e4f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMServicesUpdateParams creates a new IPAMServicesUpdateParams object
+// with the default values initialized.
+func NewIPAMServicesUpdateParams() *IPAMServicesUpdateParams {
+ var ()
+ return &IPAMServicesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMServicesUpdateParamsWithTimeout creates a new IPAMServicesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMServicesUpdateParamsWithTimeout(timeout time.Duration) *IPAMServicesUpdateParams {
+ var ()
+ return &IPAMServicesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMServicesUpdateParamsWithContext creates a new IPAMServicesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMServicesUpdateParamsWithContext(ctx context.Context) *IPAMServicesUpdateParams {
+ var ()
+ return &IPAMServicesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMServicesUpdateParamsWithHTTPClient creates a new IPAMServicesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMServicesUpdateParamsWithHTTPClient(client *http.Client) *IPAMServicesUpdateParams {
+ var ()
+ return &IPAMServicesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMServicesUpdateParams contains all the parameters to send to the API endpoint
+for the ipam services update operation typically these are written to a http.Request
+*/
+type IPAMServicesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableService
+ /*ID
+ A unique integer value identifying this service.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam services update params
+func (o *IPAMServicesUpdateParams) WithTimeout(timeout time.Duration) *IPAMServicesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam services update params
+func (o *IPAMServicesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam services update params
+func (o *IPAMServicesUpdateParams) WithContext(ctx context.Context) *IPAMServicesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam services update params
+func (o *IPAMServicesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam services update params
+func (o *IPAMServicesUpdateParams) WithHTTPClient(client *http.Client) *IPAMServicesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam services update params
+func (o *IPAMServicesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam services update params
+func (o *IPAMServicesUpdateParams) WithData(data *models.WritableService) *IPAMServicesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam services update params
+func (o *IPAMServicesUpdateParams) SetData(data *models.WritableService) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam services update params
+func (o *IPAMServicesUpdateParams) WithID(id int64) *IPAMServicesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam services update params
+func (o *IPAMServicesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMServicesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_responses.go
new file mode 100644
index 0000000..3ccf536
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amservices_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMServicesUpdateReader is a Reader for the IPAMServicesUpdate structure.
+type IPAMServicesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMServicesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMServicesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMServicesUpdateOK creates a IPAMServicesUpdateOK with default headers values
+func NewIPAMServicesUpdateOK() *IPAMServicesUpdateOK {
+ return &IPAMServicesUpdateOK{}
+}
+
+/*IPAMServicesUpdateOK handles this case with default header values.
+
+IPAMServicesUpdateOK ipam services update o k
+*/
+type IPAMServicesUpdateOK struct {
+ Payload *models.WritableService
+}
+
+func (o *IPAMServicesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/services/{id}/][%d] ipamServicesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMServicesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableService)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_parameters.go
new file mode 100644
index 0000000..5a9a756
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlanGroupsCreateParams creates a new IPAMVlanGroupsCreateParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsCreateParams() *IPAMVlanGroupsCreateParams {
+ var ()
+ return &IPAMVlanGroupsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsCreateParamsWithTimeout creates a new IPAMVlanGroupsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsCreateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsCreateParams {
+ var ()
+ return &IPAMVlanGroupsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsCreateParamsWithContext creates a new IPAMVlanGroupsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsCreateParamsWithContext(ctx context.Context) *IPAMVlanGroupsCreateParams {
+ var ()
+ return &IPAMVlanGroupsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsCreateParamsWithHTTPClient creates a new IPAMVlanGroupsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsCreateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsCreateParams {
+ var ()
+ return &IPAMVlanGroupsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsCreateParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups create operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLANGroup
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) WithContext(ctx context.Context) *IPAMVlanGroupsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlan groups create params
+func (o *IPAMVlanGroupsCreateParams) SetData(data *models.WritableVLANGroup) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_responses.go
new file mode 100644
index 0000000..7bc5097
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlanGroupsCreateReader is a Reader for the IPAMVlanGroupsCreate structure.
+type IPAMVlanGroupsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMVlanGroupsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsCreateCreated creates a IPAMVlanGroupsCreateCreated with default headers values
+func NewIPAMVlanGroupsCreateCreated() *IPAMVlanGroupsCreateCreated {
+ return &IPAMVlanGroupsCreateCreated{}
+}
+
+/*IPAMVlanGroupsCreateCreated handles this case with default header values.
+
+IPAMVlanGroupsCreateCreated ipam vlan groups create created
+*/
+type IPAMVlanGroupsCreateCreated struct {
+ Payload *models.WritableVLANGroup
+}
+
+func (o *IPAMVlanGroupsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/vlan-groups/][%d] ipamVlanGroupsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMVlanGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLANGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_parameters.go
new file mode 100644
index 0000000..46a262a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlanGroupsDeleteParams creates a new IPAMVlanGroupsDeleteParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsDeleteParams() *IPAMVlanGroupsDeleteParams {
+ var ()
+ return &IPAMVlanGroupsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsDeleteParamsWithTimeout creates a new IPAMVlanGroupsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsDeleteParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsDeleteParams {
+ var ()
+ return &IPAMVlanGroupsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsDeleteParamsWithContext creates a new IPAMVlanGroupsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsDeleteParamsWithContext(ctx context.Context) *IPAMVlanGroupsDeleteParams {
+ var ()
+ return &IPAMVlanGroupsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsDeleteParamsWithHTTPClient creates a new IPAMVlanGroupsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsDeleteParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsDeleteParams {
+ var ()
+ return &IPAMVlanGroupsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsDeleteParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups delete operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this VLAN group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) WithContext(ctx context.Context) *IPAMVlanGroupsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) WithID(id int64) *IPAMVlanGroupsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlan groups delete params
+func (o *IPAMVlanGroupsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_responses.go
new file mode 100644
index 0000000..2b529ce
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMVlanGroupsDeleteReader is a Reader for the IPAMVlanGroupsDelete structure.
+type IPAMVlanGroupsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMVlanGroupsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsDeleteNoContent creates a IPAMVlanGroupsDeleteNoContent with default headers values
+func NewIPAMVlanGroupsDeleteNoContent() *IPAMVlanGroupsDeleteNoContent {
+ return &IPAMVlanGroupsDeleteNoContent{}
+}
+
+/*IPAMVlanGroupsDeleteNoContent handles this case with default header values.
+
+IPAMVlanGroupsDeleteNoContent ipam vlan groups delete no content
+*/
+type IPAMVlanGroupsDeleteNoContent struct {
+}
+
+func (o *IPAMVlanGroupsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsDeleteNoContent ", 204)
+}
+
+func (o *IPAMVlanGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_parameters.go
new file mode 100644
index 0000000..827349e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_parameters.go
@@ -0,0 +1,311 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlanGroupsListParams creates a new IPAMVlanGroupsListParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsListParams() *IPAMVlanGroupsListParams {
+ var ()
+ return &IPAMVlanGroupsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsListParamsWithTimeout creates a new IPAMVlanGroupsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsListParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsListParams {
+ var ()
+ return &IPAMVlanGroupsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsListParamsWithContext creates a new IPAMVlanGroupsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsListParamsWithContext(ctx context.Context) *IPAMVlanGroupsListParams {
+ var ()
+ return &IPAMVlanGroupsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsListParamsWithHTTPClient creates a new IPAMVlanGroupsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsListParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsListParams {
+ var ()
+ return &IPAMVlanGroupsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsListParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups list operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithContext(ctx context.Context) *IPAMVlanGroupsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithLimit(limit *int64) *IPAMVlanGroupsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithName(name *string) *IPAMVlanGroupsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithOffset(offset *int64) *IPAMVlanGroupsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSite adds the site to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithSite(site *string) *IPAMVlanGroupsListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithSiteID(siteID *string) *IPAMVlanGroupsListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithSlug adds the slug to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) WithSlug(slug *string) *IPAMVlanGroupsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the ipam vlan groups list params
+func (o *IPAMVlanGroupsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_responses.go
new file mode 100644
index 0000000..40e70da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlanGroupsListReader is a Reader for the IPAMVlanGroupsList structure.
+type IPAMVlanGroupsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlanGroupsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsListOK creates a IPAMVlanGroupsListOK with default headers values
+func NewIPAMVlanGroupsListOK() *IPAMVlanGroupsListOK {
+ return &IPAMVlanGroupsListOK{}
+}
+
+/*IPAMVlanGroupsListOK handles this case with default header values.
+
+IPAMVlanGroupsListOK ipam vlan groups list o k
+*/
+type IPAMVlanGroupsListOK struct {
+ Payload *models.IPAMVlanGroupsListOKBody
+}
+
+func (o *IPAMVlanGroupsListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vlan-groups/][%d] ipamVlanGroupsListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlanGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMVlanGroupsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_parameters.go
new file mode 100644
index 0000000..69b3c7b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlanGroupsPartialUpdateParams creates a new IPAMVlanGroupsPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsPartialUpdateParams() *IPAMVlanGroupsPartialUpdateParams {
+ var ()
+ return &IPAMVlanGroupsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsPartialUpdateParamsWithTimeout creates a new IPAMVlanGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams {
+ var ()
+ return &IPAMVlanGroupsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsPartialUpdateParamsWithContext creates a new IPAMVlanGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsPartialUpdateParamsWithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams {
+ var ()
+ return &IPAMVlanGroupsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient creates a new IPAMVlanGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams {
+ var ()
+ return &IPAMVlanGroupsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups partial update operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLANGroup
+ /*ID
+ A unique integer value identifying this VLAN group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) WithContext(ctx context.Context) *IPAMVlanGroupsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) SetData(data *models.WritableVLANGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) WithID(id int64) *IPAMVlanGroupsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlan groups partial update params
+func (o *IPAMVlanGroupsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_responses.go
new file mode 100644
index 0000000..62fb341
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlanGroupsPartialUpdateReader is a Reader for the IPAMVlanGroupsPartialUpdate structure.
+type IPAMVlanGroupsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlanGroupsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsPartialUpdateOK creates a IPAMVlanGroupsPartialUpdateOK with default headers values
+func NewIPAMVlanGroupsPartialUpdateOK() *IPAMVlanGroupsPartialUpdateOK {
+ return &IPAMVlanGroupsPartialUpdateOK{}
+}
+
+/*IPAMVlanGroupsPartialUpdateOK handles this case with default header values.
+
+IPAMVlanGroupsPartialUpdateOK ipam vlan groups partial update o k
+*/
+type IPAMVlanGroupsPartialUpdateOK struct {
+ Payload *models.WritableVLANGroup
+}
+
+func (o *IPAMVlanGroupsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlanGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLANGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_parameters.go
new file mode 100644
index 0000000..9872ce4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlanGroupsReadParams creates a new IPAMVlanGroupsReadParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsReadParams() *IPAMVlanGroupsReadParams {
+ var ()
+ return &IPAMVlanGroupsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsReadParamsWithTimeout creates a new IPAMVlanGroupsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsReadParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsReadParams {
+ var ()
+ return &IPAMVlanGroupsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsReadParamsWithContext creates a new IPAMVlanGroupsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsReadParamsWithContext(ctx context.Context) *IPAMVlanGroupsReadParams {
+ var ()
+ return &IPAMVlanGroupsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsReadParamsWithHTTPClient creates a new IPAMVlanGroupsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsReadParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsReadParams {
+ var ()
+ return &IPAMVlanGroupsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsReadParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups read operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this VLAN group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) WithContext(ctx context.Context) *IPAMVlanGroupsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) WithID(id int64) *IPAMVlanGroupsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlan groups read params
+func (o *IPAMVlanGroupsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_responses.go
new file mode 100644
index 0000000..08914ce
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlanGroupsReadReader is a Reader for the IPAMVlanGroupsRead structure.
+type IPAMVlanGroupsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlanGroupsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsReadOK creates a IPAMVlanGroupsReadOK with default headers values
+func NewIPAMVlanGroupsReadOK() *IPAMVlanGroupsReadOK {
+ return &IPAMVlanGroupsReadOK{}
+}
+
+/*IPAMVlanGroupsReadOK handles this case with default header values.
+
+IPAMVlanGroupsReadOK ipam vlan groups read o k
+*/
+type IPAMVlanGroupsReadOK struct {
+ Payload *models.VLANGroup
+}
+
+func (o *IPAMVlanGroupsReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlanGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VLANGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_parameters.go
new file mode 100644
index 0000000..fbd5662
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlanGroupsUpdateParams creates a new IPAMVlanGroupsUpdateParams object
+// with the default values initialized.
+func NewIPAMVlanGroupsUpdateParams() *IPAMVlanGroupsUpdateParams {
+ var ()
+ return &IPAMVlanGroupsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlanGroupsUpdateParamsWithTimeout creates a new IPAMVlanGroupsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlanGroupsUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlanGroupsUpdateParams {
+ var ()
+ return &IPAMVlanGroupsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlanGroupsUpdateParamsWithContext creates a new IPAMVlanGroupsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlanGroupsUpdateParamsWithContext(ctx context.Context) *IPAMVlanGroupsUpdateParams {
+ var ()
+ return &IPAMVlanGroupsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlanGroupsUpdateParamsWithHTTPClient creates a new IPAMVlanGroupsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlanGroupsUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlanGroupsUpdateParams {
+ var ()
+ return &IPAMVlanGroupsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlanGroupsUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vlan groups update operation typically these are written to a http.Request
+*/
+type IPAMVlanGroupsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLANGroup
+ /*ID
+ A unique integer value identifying this VLAN group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlanGroupsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) WithContext(ctx context.Context) *IPAMVlanGroupsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlanGroupsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) WithData(data *models.WritableVLANGroup) *IPAMVlanGroupsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) SetData(data *models.WritableVLANGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) WithID(id int64) *IPAMVlanGroupsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlan groups update params
+func (o *IPAMVlanGroupsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlanGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_responses.go
new file mode 100644
index 0000000..01c63cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlan_groups_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlanGroupsUpdateReader is a Reader for the IPAMVlanGroupsUpdate structure.
+type IPAMVlanGroupsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlanGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlanGroupsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlanGroupsUpdateOK creates a IPAMVlanGroupsUpdateOK with default headers values
+func NewIPAMVlanGroupsUpdateOK() *IPAMVlanGroupsUpdateOK {
+ return &IPAMVlanGroupsUpdateOK{}
+}
+
+/*IPAMVlanGroupsUpdateOK handles this case with default header values.
+
+IPAMVlanGroupsUpdateOK ipam vlan groups update o k
+*/
+type IPAMVlanGroupsUpdateOK struct {
+ Payload *models.WritableVLANGroup
+}
+
+func (o *IPAMVlanGroupsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/vlan-groups/{id}/][%d] ipamVlanGroupsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlanGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLANGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_parameters.go
new file mode 100644
index 0000000..9be4303
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlansCreateParams creates a new IPAMVlansCreateParams object
+// with the default values initialized.
+func NewIPAMVlansCreateParams() *IPAMVlansCreateParams {
+ var ()
+ return &IPAMVlansCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansCreateParamsWithTimeout creates a new IPAMVlansCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansCreateParamsWithTimeout(timeout time.Duration) *IPAMVlansCreateParams {
+ var ()
+ return &IPAMVlansCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansCreateParamsWithContext creates a new IPAMVlansCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansCreateParamsWithContext(ctx context.Context) *IPAMVlansCreateParams {
+ var ()
+ return &IPAMVlansCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansCreateParamsWithHTTPClient creates a new IPAMVlansCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansCreateParamsWithHTTPClient(client *http.Client) *IPAMVlansCreateParams {
+ var ()
+ return &IPAMVlansCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansCreateParams contains all the parameters to send to the API endpoint
+for the ipam vlans create operation typically these are written to a http.Request
+*/
+type IPAMVlansCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLAN
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans create params
+func (o *IPAMVlansCreateParams) WithTimeout(timeout time.Duration) *IPAMVlansCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans create params
+func (o *IPAMVlansCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans create params
+func (o *IPAMVlansCreateParams) WithContext(ctx context.Context) *IPAMVlansCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans create params
+func (o *IPAMVlansCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans create params
+func (o *IPAMVlansCreateParams) WithHTTPClient(client *http.Client) *IPAMVlansCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans create params
+func (o *IPAMVlansCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlans create params
+func (o *IPAMVlansCreateParams) WithData(data *models.WritableVLAN) *IPAMVlansCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlans create params
+func (o *IPAMVlansCreateParams) SetData(data *models.WritableVLAN) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_responses.go
new file mode 100644
index 0000000..fab3426
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlansCreateReader is a Reader for the IPAMVlansCreate structure.
+type IPAMVlansCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMVlansCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansCreateCreated creates a IPAMVlansCreateCreated with default headers values
+func NewIPAMVlansCreateCreated() *IPAMVlansCreateCreated {
+ return &IPAMVlansCreateCreated{}
+}
+
+/*IPAMVlansCreateCreated handles this case with default header values.
+
+IPAMVlansCreateCreated ipam vlans create created
+*/
+type IPAMVlansCreateCreated struct {
+ Payload *models.WritableVLAN
+}
+
+func (o *IPAMVlansCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/vlans/][%d] ipamVlansCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMVlansCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLAN)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_parameters.go
new file mode 100644
index 0000000..ad0ab87
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlansDeleteParams creates a new IPAMVlansDeleteParams object
+// with the default values initialized.
+func NewIPAMVlansDeleteParams() *IPAMVlansDeleteParams {
+ var ()
+ return &IPAMVlansDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansDeleteParamsWithTimeout creates a new IPAMVlansDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansDeleteParamsWithTimeout(timeout time.Duration) *IPAMVlansDeleteParams {
+ var ()
+ return &IPAMVlansDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansDeleteParamsWithContext creates a new IPAMVlansDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansDeleteParamsWithContext(ctx context.Context) *IPAMVlansDeleteParams {
+ var ()
+ return &IPAMVlansDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansDeleteParamsWithHTTPClient creates a new IPAMVlansDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansDeleteParamsWithHTTPClient(client *http.Client) *IPAMVlansDeleteParams {
+ var ()
+ return &IPAMVlansDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansDeleteParams contains all the parameters to send to the API endpoint
+for the ipam vlans delete operation typically these are written to a http.Request
+*/
+type IPAMVlansDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this VLAN.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) WithTimeout(timeout time.Duration) *IPAMVlansDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) WithContext(ctx context.Context) *IPAMVlansDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) WithHTTPClient(client *http.Client) *IPAMVlansDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) WithID(id int64) *IPAMVlansDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlans delete params
+func (o *IPAMVlansDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_responses.go
new file mode 100644
index 0000000..11f22d4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMVlansDeleteReader is a Reader for the IPAMVlansDelete structure.
+type IPAMVlansDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMVlansDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansDeleteNoContent creates a IPAMVlansDeleteNoContent with default headers values
+func NewIPAMVlansDeleteNoContent() *IPAMVlansDeleteNoContent {
+ return &IPAMVlansDeleteNoContent{}
+}
+
+/*IPAMVlansDeleteNoContent handles this case with default header values.
+
+IPAMVlansDeleteNoContent ipam vlans delete no content
+*/
+type IPAMVlansDeleteNoContent struct {
+}
+
+func (o *IPAMVlansDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/vlans/{id}/][%d] ipamVlansDeleteNoContent ", 204)
+}
+
+func (o *IPAMVlansDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_parameters.go
new file mode 100644
index 0000000..652225c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_parameters.go
@@ -0,0 +1,575 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlansListParams creates a new IPAMVlansListParams object
+// with the default values initialized.
+func NewIPAMVlansListParams() *IPAMVlansListParams {
+ var ()
+ return &IPAMVlansListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansListParamsWithTimeout creates a new IPAMVlansListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansListParamsWithTimeout(timeout time.Duration) *IPAMVlansListParams {
+ var ()
+ return &IPAMVlansListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansListParamsWithContext creates a new IPAMVlansListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansListParamsWithContext(ctx context.Context) *IPAMVlansListParams {
+ var ()
+ return &IPAMVlansListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansListParamsWithHTTPClient creates a new IPAMVlansListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansListParamsWithHTTPClient(client *http.Client) *IPAMVlansListParams {
+ var ()
+ return &IPAMVlansListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansListParams contains all the parameters to send to the API endpoint
+for the ipam vlans list operation typically these are written to a http.Request
+*/
+type IPAMVlansListParams struct {
+
+ /*Group*/
+ Group *string
+ /*GroupID*/
+ GroupID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+ /*Vid*/
+ Vid *float64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans list params
+func (o *IPAMVlansListParams) WithTimeout(timeout time.Duration) *IPAMVlansListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans list params
+func (o *IPAMVlansListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans list params
+func (o *IPAMVlansListParams) WithContext(ctx context.Context) *IPAMVlansListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans list params
+func (o *IPAMVlansListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans list params
+func (o *IPAMVlansListParams) WithHTTPClient(client *http.Client) *IPAMVlansListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans list params
+func (o *IPAMVlansListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithGroup adds the group to the ipam vlans list params
+func (o *IPAMVlansListParams) WithGroup(group *string) *IPAMVlansListParams {
+ o.SetGroup(group)
+ return o
+}
+
+// SetGroup adds the group to the ipam vlans list params
+func (o *IPAMVlansListParams) SetGroup(group *string) {
+ o.Group = group
+}
+
+// WithGroupID adds the groupID to the ipam vlans list params
+func (o *IPAMVlansListParams) WithGroupID(groupID *string) *IPAMVlansListParams {
+ o.SetGroupID(groupID)
+ return o
+}
+
+// SetGroupID adds the groupId to the ipam vlans list params
+func (o *IPAMVlansListParams) SetGroupID(groupID *string) {
+ o.GroupID = groupID
+}
+
+// WithIDIn adds the iDIn to the ipam vlans list params
+func (o *IPAMVlansListParams) WithIDIn(iDIn *string) *IPAMVlansListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam vlans list params
+func (o *IPAMVlansListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the ipam vlans list params
+func (o *IPAMVlansListParams) WithLimit(limit *int64) *IPAMVlansListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam vlans list params
+func (o *IPAMVlansListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam vlans list params
+func (o *IPAMVlansListParams) WithName(name *string) *IPAMVlansListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam vlans list params
+func (o *IPAMVlansListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam vlans list params
+func (o *IPAMVlansListParams) WithOffset(offset *int64) *IPAMVlansListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam vlans list params
+func (o *IPAMVlansListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the ipam vlans list params
+func (o *IPAMVlansListParams) WithQ(q *string) *IPAMVlansListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the ipam vlans list params
+func (o *IPAMVlansListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the ipam vlans list params
+func (o *IPAMVlansListParams) WithRole(role *string) *IPAMVlansListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the ipam vlans list params
+func (o *IPAMVlansListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the ipam vlans list params
+func (o *IPAMVlansListParams) WithRoleID(roleID *string) *IPAMVlansListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the ipam vlans list params
+func (o *IPAMVlansListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WithSite adds the site to the ipam vlans list params
+func (o *IPAMVlansListParams) WithSite(site *string) *IPAMVlansListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the ipam vlans list params
+func (o *IPAMVlansListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the ipam vlans list params
+func (o *IPAMVlansListParams) WithSiteID(siteID *string) *IPAMVlansListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the ipam vlans list params
+func (o *IPAMVlansListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithStatus adds the status to the ipam vlans list params
+func (o *IPAMVlansListParams) WithStatus(status *string) *IPAMVlansListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the ipam vlans list params
+func (o *IPAMVlansListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the ipam vlans list params
+func (o *IPAMVlansListParams) WithTenant(tenant *string) *IPAMVlansListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the ipam vlans list params
+func (o *IPAMVlansListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the ipam vlans list params
+func (o *IPAMVlansListParams) WithTenantID(tenantID *string) *IPAMVlansListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the ipam vlans list params
+func (o *IPAMVlansListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WithVid adds the vid to the ipam vlans list params
+func (o *IPAMVlansListParams) WithVid(vid *float64) *IPAMVlansListParams {
+ o.SetVid(vid)
+ return o
+}
+
+// SetVid adds the vid to the ipam vlans list params
+func (o *IPAMVlansListParams) SetVid(vid *float64) {
+ o.Vid = vid
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Group != nil {
+
+ // query param group
+ var qrGroup string
+ if o.Group != nil {
+ qrGroup = *o.Group
+ }
+ qGroup := qrGroup
+ if qGroup != "" {
+ if err := r.SetQueryParam("group", qGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.GroupID != nil {
+
+ // query param group_id
+ var qrGroupID string
+ if o.GroupID != nil {
+ qrGroupID = *o.GroupID
+ }
+ qGroupID := qrGroupID
+ if qGroupID != "" {
+ if err := r.SetQueryParam("group_id", qGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Vid != nil {
+
+ // query param vid
+ var qrVid float64
+ if o.Vid != nil {
+ qrVid = *o.Vid
+ }
+ qVid := swag.FormatFloat64(qrVid)
+ if qVid != "" {
+ if err := r.SetQueryParam("vid", qVid); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_responses.go
new file mode 100644
index 0000000..6b6c0c1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlansListReader is a Reader for the IPAMVlansList structure.
+type IPAMVlansListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlansListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansListOK creates a IPAMVlansListOK with default headers values
+func NewIPAMVlansListOK() *IPAMVlansListOK {
+ return &IPAMVlansListOK{}
+}
+
+/*IPAMVlansListOK handles this case with default header values.
+
+IPAMVlansListOK ipam vlans list o k
+*/
+type IPAMVlansListOK struct {
+ Payload *models.IPAMVlansListOKBody
+}
+
+func (o *IPAMVlansListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vlans/][%d] ipamVlansListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlansListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMVlansListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_parameters.go
new file mode 100644
index 0000000..3bb7a23
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlansPartialUpdateParams creates a new IPAMVlansPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMVlansPartialUpdateParams() *IPAMVlansPartialUpdateParams {
+ var ()
+ return &IPAMVlansPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansPartialUpdateParamsWithTimeout creates a new IPAMVlansPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlansPartialUpdateParams {
+ var ()
+ return &IPAMVlansPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansPartialUpdateParamsWithContext creates a new IPAMVlansPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansPartialUpdateParamsWithContext(ctx context.Context) *IPAMVlansPartialUpdateParams {
+ var ()
+ return &IPAMVlansPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansPartialUpdateParamsWithHTTPClient creates a new IPAMVlansPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlansPartialUpdateParams {
+ var ()
+ return &IPAMVlansPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vlans partial update operation typically these are written to a http.Request
+*/
+type IPAMVlansPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLAN
+ /*ID
+ A unique integer value identifying this VLAN.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlansPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) WithContext(ctx context.Context) *IPAMVlansPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlansPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) WithData(data *models.WritableVLAN) *IPAMVlansPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) SetData(data *models.WritableVLAN) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) WithID(id int64) *IPAMVlansPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlans partial update params
+func (o *IPAMVlansPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_responses.go
new file mode 100644
index 0000000..0b064ae
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlansPartialUpdateReader is a Reader for the IPAMVlansPartialUpdate structure.
+type IPAMVlansPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlansPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansPartialUpdateOK creates a IPAMVlansPartialUpdateOK with default headers values
+func NewIPAMVlansPartialUpdateOK() *IPAMVlansPartialUpdateOK {
+ return &IPAMVlansPartialUpdateOK{}
+}
+
+/*IPAMVlansPartialUpdateOK handles this case with default header values.
+
+IPAMVlansPartialUpdateOK ipam vlans partial update o k
+*/
+type IPAMVlansPartialUpdateOK struct {
+ Payload *models.WritableVLAN
+}
+
+func (o *IPAMVlansPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/vlans/{id}/][%d] ipamVlansPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlansPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLAN)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_parameters.go
new file mode 100644
index 0000000..e2de89b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVlansReadParams creates a new IPAMVlansReadParams object
+// with the default values initialized.
+func NewIPAMVlansReadParams() *IPAMVlansReadParams {
+ var ()
+ return &IPAMVlansReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansReadParamsWithTimeout creates a new IPAMVlansReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansReadParamsWithTimeout(timeout time.Duration) *IPAMVlansReadParams {
+ var ()
+ return &IPAMVlansReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansReadParamsWithContext creates a new IPAMVlansReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansReadParamsWithContext(ctx context.Context) *IPAMVlansReadParams {
+ var ()
+ return &IPAMVlansReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansReadParamsWithHTTPClient creates a new IPAMVlansReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansReadParamsWithHTTPClient(client *http.Client) *IPAMVlansReadParams {
+ var ()
+ return &IPAMVlansReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansReadParams contains all the parameters to send to the API endpoint
+for the ipam vlans read operation typically these are written to a http.Request
+*/
+type IPAMVlansReadParams struct {
+
+ /*ID
+ A unique integer value identifying this VLAN.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans read params
+func (o *IPAMVlansReadParams) WithTimeout(timeout time.Duration) *IPAMVlansReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans read params
+func (o *IPAMVlansReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans read params
+func (o *IPAMVlansReadParams) WithContext(ctx context.Context) *IPAMVlansReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans read params
+func (o *IPAMVlansReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans read params
+func (o *IPAMVlansReadParams) WithHTTPClient(client *http.Client) *IPAMVlansReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans read params
+func (o *IPAMVlansReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vlans read params
+func (o *IPAMVlansReadParams) WithID(id int64) *IPAMVlansReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlans read params
+func (o *IPAMVlansReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_responses.go
new file mode 100644
index 0000000..f32ac9c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlansReadReader is a Reader for the IPAMVlansRead structure.
+type IPAMVlansReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlansReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansReadOK creates a IPAMVlansReadOK with default headers values
+func NewIPAMVlansReadOK() *IPAMVlansReadOK {
+ return &IPAMVlansReadOK{}
+}
+
+/*IPAMVlansReadOK handles this case with default header values.
+
+IPAMVlansReadOK ipam vlans read o k
+*/
+type IPAMVlansReadOK struct {
+ Payload *models.VLAN
+}
+
+func (o *IPAMVlansReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vlans/{id}/][%d] ipamVlansReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlansReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VLAN)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_parameters.go
new file mode 100644
index 0000000..9768c16
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVlansUpdateParams creates a new IPAMVlansUpdateParams object
+// with the default values initialized.
+func NewIPAMVlansUpdateParams() *IPAMVlansUpdateParams {
+ var ()
+ return &IPAMVlansUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVlansUpdateParamsWithTimeout creates a new IPAMVlansUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVlansUpdateParamsWithTimeout(timeout time.Duration) *IPAMVlansUpdateParams {
+ var ()
+ return &IPAMVlansUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVlansUpdateParamsWithContext creates a new IPAMVlansUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVlansUpdateParamsWithContext(ctx context.Context) *IPAMVlansUpdateParams {
+ var ()
+ return &IPAMVlansUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVlansUpdateParamsWithHTTPClient creates a new IPAMVlansUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVlansUpdateParamsWithHTTPClient(client *http.Client) *IPAMVlansUpdateParams {
+ var ()
+ return &IPAMVlansUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVlansUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vlans update operation typically these are written to a http.Request
+*/
+type IPAMVlansUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVLAN
+ /*ID
+ A unique integer value identifying this VLAN.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) WithTimeout(timeout time.Duration) *IPAMVlansUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) WithContext(ctx context.Context) *IPAMVlansUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) WithHTTPClient(client *http.Client) *IPAMVlansUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) WithData(data *models.WritableVLAN) *IPAMVlansUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) SetData(data *models.WritableVLAN) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) WithID(id int64) *IPAMVlansUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vlans update params
+func (o *IPAMVlansUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVlansUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_responses.go
new file mode 100644
index 0000000..8d7d1e7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvlans_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVlansUpdateReader is a Reader for the IPAMVlansUpdate structure.
+type IPAMVlansUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVlansUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVlansUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVlansUpdateOK creates a IPAMVlansUpdateOK with default headers values
+func NewIPAMVlansUpdateOK() *IPAMVlansUpdateOK {
+ return &IPAMVlansUpdateOK{}
+}
+
+/*IPAMVlansUpdateOK handles this case with default header values.
+
+IPAMVlansUpdateOK ipam vlans update o k
+*/
+type IPAMVlansUpdateOK struct {
+ Payload *models.WritableVLAN
+}
+
+func (o *IPAMVlansUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/vlans/{id}/][%d] ipamVlansUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVlansUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVLAN)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_parameters.go
new file mode 100644
index 0000000..45ba2af
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVrfsCreateParams creates a new IPAMVrfsCreateParams object
+// with the default values initialized.
+func NewIPAMVrfsCreateParams() *IPAMVrfsCreateParams {
+ var ()
+ return &IPAMVrfsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsCreateParamsWithTimeout creates a new IPAMVrfsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsCreateParamsWithTimeout(timeout time.Duration) *IPAMVrfsCreateParams {
+ var ()
+ return &IPAMVrfsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsCreateParamsWithContext creates a new IPAMVrfsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsCreateParamsWithContext(ctx context.Context) *IPAMVrfsCreateParams {
+ var ()
+ return &IPAMVrfsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsCreateParamsWithHTTPClient creates a new IPAMVrfsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsCreateParamsWithHTTPClient(client *http.Client) *IPAMVrfsCreateParams {
+ var ()
+ return &IPAMVrfsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsCreateParams contains all the parameters to send to the API endpoint
+for the ipam vrfs create operation typically these are written to a http.Request
+*/
+type IPAMVrfsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableVRF
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) WithTimeout(timeout time.Duration) *IPAMVrfsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) WithContext(ctx context.Context) *IPAMVrfsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) WithHTTPClient(client *http.Client) *IPAMVrfsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) WithData(data *models.WritableVRF) *IPAMVrfsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vrfs create params
+func (o *IPAMVrfsCreateParams) SetData(data *models.WritableVRF) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_responses.go
new file mode 100644
index 0000000..70d70ee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVrfsCreateReader is a Reader for the IPAMVrfsCreate structure.
+type IPAMVrfsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewIPAMVrfsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsCreateCreated creates a IPAMVrfsCreateCreated with default headers values
+func NewIPAMVrfsCreateCreated() *IPAMVrfsCreateCreated {
+ return &IPAMVrfsCreateCreated{}
+}
+
+/*IPAMVrfsCreateCreated handles this case with default header values.
+
+IPAMVrfsCreateCreated ipam vrfs create created
+*/
+type IPAMVrfsCreateCreated struct {
+ Payload *models.WritableVRF
+}
+
+func (o *IPAMVrfsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /ipam/vrfs/][%d] ipamVrfsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *IPAMVrfsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVRF)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_parameters.go
new file mode 100644
index 0000000..f2d4b38
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVrfsDeleteParams creates a new IPAMVrfsDeleteParams object
+// with the default values initialized.
+func NewIPAMVrfsDeleteParams() *IPAMVrfsDeleteParams {
+ var ()
+ return &IPAMVrfsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsDeleteParamsWithTimeout creates a new IPAMVrfsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsDeleteParamsWithTimeout(timeout time.Duration) *IPAMVrfsDeleteParams {
+ var ()
+ return &IPAMVrfsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsDeleteParamsWithContext creates a new IPAMVrfsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsDeleteParamsWithContext(ctx context.Context) *IPAMVrfsDeleteParams {
+ var ()
+ return &IPAMVrfsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsDeleteParamsWithHTTPClient creates a new IPAMVrfsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsDeleteParamsWithHTTPClient(client *http.Client) *IPAMVrfsDeleteParams {
+ var ()
+ return &IPAMVrfsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsDeleteParams contains all the parameters to send to the API endpoint
+for the ipam vrfs delete operation typically these are written to a http.Request
+*/
+type IPAMVrfsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this VRF.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) WithTimeout(timeout time.Duration) *IPAMVrfsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) WithContext(ctx context.Context) *IPAMVrfsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) WithHTTPClient(client *http.Client) *IPAMVrfsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) WithID(id int64) *IPAMVrfsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vrfs delete params
+func (o *IPAMVrfsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_responses.go
new file mode 100644
index 0000000..4dc6950
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// IPAMVrfsDeleteReader is a Reader for the IPAMVrfsDelete structure.
+type IPAMVrfsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewIPAMVrfsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsDeleteNoContent creates a IPAMVrfsDeleteNoContent with default headers values
+func NewIPAMVrfsDeleteNoContent() *IPAMVrfsDeleteNoContent {
+ return &IPAMVrfsDeleteNoContent{}
+}
+
+/*IPAMVrfsDeleteNoContent handles this case with default header values.
+
+IPAMVrfsDeleteNoContent ipam vrfs delete no content
+*/
+type IPAMVrfsDeleteNoContent struct {
+}
+
+func (o *IPAMVrfsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /ipam/vrfs/{id}/][%d] ipamVrfsDeleteNoContent ", 204)
+}
+
+func (o *IPAMVrfsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_parameters.go
new file mode 100644
index 0000000..d84f154
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_parameters.go
@@ -0,0 +1,401 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVrfsListParams creates a new IPAMVrfsListParams object
+// with the default values initialized.
+func NewIPAMVrfsListParams() *IPAMVrfsListParams {
+ var ()
+ return &IPAMVrfsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsListParamsWithTimeout creates a new IPAMVrfsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsListParamsWithTimeout(timeout time.Duration) *IPAMVrfsListParams {
+ var ()
+ return &IPAMVrfsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsListParamsWithContext creates a new IPAMVrfsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsListParamsWithContext(ctx context.Context) *IPAMVrfsListParams {
+ var ()
+ return &IPAMVrfsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsListParamsWithHTTPClient creates a new IPAMVrfsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsListParamsWithHTTPClient(client *http.Client) *IPAMVrfsListParams {
+ var ()
+ return &IPAMVrfsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsListParams contains all the parameters to send to the API endpoint
+for the ipam vrfs list operation typically these are written to a http.Request
+*/
+type IPAMVrfsListParams struct {
+
+ /*EnforceUnique*/
+ EnforceUnique *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Rd*/
+ Rd *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithTimeout(timeout time.Duration) *IPAMVrfsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithContext(ctx context.Context) *IPAMVrfsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithHTTPClient(client *http.Client) *IPAMVrfsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithEnforceUnique adds the enforceUnique to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithEnforceUnique(enforceUnique *string) *IPAMVrfsListParams {
+ o.SetEnforceUnique(enforceUnique)
+ return o
+}
+
+// SetEnforceUnique adds the enforceUnique to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetEnforceUnique(enforceUnique *string) {
+ o.EnforceUnique = enforceUnique
+}
+
+// WithIDIn adds the iDIn to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithIDIn(iDIn *string) *IPAMVrfsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithLimit(limit *int64) *IPAMVrfsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithName(name *string) *IPAMVrfsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithOffset(offset *int64) *IPAMVrfsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithQ(q *string) *IPAMVrfsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRd adds the rd to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithRd(rd *string) *IPAMVrfsListParams {
+ o.SetRd(rd)
+ return o
+}
+
+// SetRd adds the rd to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetRd(rd *string) {
+ o.Rd = rd
+}
+
+// WithTenant adds the tenant to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithTenant(tenant *string) *IPAMVrfsListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the ipam vrfs list params
+func (o *IPAMVrfsListParams) WithTenantID(tenantID *string) *IPAMVrfsListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the ipam vrfs list params
+func (o *IPAMVrfsListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.EnforceUnique != nil {
+
+ // query param enforce_unique
+ var qrEnforceUnique string
+ if o.EnforceUnique != nil {
+ qrEnforceUnique = *o.EnforceUnique
+ }
+ qEnforceUnique := qrEnforceUnique
+ if qEnforceUnique != "" {
+ if err := r.SetQueryParam("enforce_unique", qEnforceUnique); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Rd != nil {
+
+ // query param rd
+ var qrRd string
+ if o.Rd != nil {
+ qrRd = *o.Rd
+ }
+ qRd := qrRd
+ if qRd != "" {
+ if err := r.SetQueryParam("rd", qRd); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_responses.go
new file mode 100644
index 0000000..884edd2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVrfsListReader is a Reader for the IPAMVrfsList structure.
+type IPAMVrfsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVrfsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsListOK creates a IPAMVrfsListOK with default headers values
+func NewIPAMVrfsListOK() *IPAMVrfsListOK {
+ return &IPAMVrfsListOK{}
+}
+
+/*IPAMVrfsListOK handles this case with default header values.
+
+IPAMVrfsListOK ipam vrfs list o k
+*/
+type IPAMVrfsListOK struct {
+ Payload *models.IPAMVrfsListOKBody
+}
+
+func (o *IPAMVrfsListOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vrfs/][%d] ipamVrfsListOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVrfsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.IPAMVrfsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_parameters.go
new file mode 100644
index 0000000..b8847cd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVrfsPartialUpdateParams creates a new IPAMVrfsPartialUpdateParams object
+// with the default values initialized.
+func NewIPAMVrfsPartialUpdateParams() *IPAMVrfsPartialUpdateParams {
+ var ()
+ return &IPAMVrfsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsPartialUpdateParamsWithTimeout creates a new IPAMVrfsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsPartialUpdateParamsWithTimeout(timeout time.Duration) *IPAMVrfsPartialUpdateParams {
+ var ()
+ return &IPAMVrfsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsPartialUpdateParamsWithContext creates a new IPAMVrfsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsPartialUpdateParamsWithContext(ctx context.Context) *IPAMVrfsPartialUpdateParams {
+ var ()
+ return &IPAMVrfsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsPartialUpdateParamsWithHTTPClient creates a new IPAMVrfsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsPartialUpdateParamsWithHTTPClient(client *http.Client) *IPAMVrfsPartialUpdateParams {
+ var ()
+ return &IPAMVrfsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vrfs partial update operation typically these are written to a http.Request
+*/
+type IPAMVrfsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVRF
+ /*ID
+ A unique integer value identifying this VRF.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) WithTimeout(timeout time.Duration) *IPAMVrfsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) WithContext(ctx context.Context) *IPAMVrfsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) WithHTTPClient(client *http.Client) *IPAMVrfsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) WithData(data *models.WritableVRF) *IPAMVrfsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) SetData(data *models.WritableVRF) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) WithID(id int64) *IPAMVrfsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vrfs partial update params
+func (o *IPAMVrfsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_responses.go
new file mode 100644
index 0000000..2b18174
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVrfsPartialUpdateReader is a Reader for the IPAMVrfsPartialUpdate structure.
+type IPAMVrfsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVrfsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsPartialUpdateOK creates a IPAMVrfsPartialUpdateOK with default headers values
+func NewIPAMVrfsPartialUpdateOK() *IPAMVrfsPartialUpdateOK {
+ return &IPAMVrfsPartialUpdateOK{}
+}
+
+/*IPAMVrfsPartialUpdateOK handles this case with default header values.
+
+IPAMVrfsPartialUpdateOK ipam vrfs partial update o k
+*/
+type IPAMVrfsPartialUpdateOK struct {
+ Payload *models.WritableVRF
+}
+
+func (o *IPAMVrfsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /ipam/vrfs/{id}/][%d] ipamVrfsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVrfsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVRF)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_parameters.go
new file mode 100644
index 0000000..4dfcd85
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewIPAMVrfsReadParams creates a new IPAMVrfsReadParams object
+// with the default values initialized.
+func NewIPAMVrfsReadParams() *IPAMVrfsReadParams {
+ var ()
+ return &IPAMVrfsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsReadParamsWithTimeout creates a new IPAMVrfsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsReadParamsWithTimeout(timeout time.Duration) *IPAMVrfsReadParams {
+ var ()
+ return &IPAMVrfsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsReadParamsWithContext creates a new IPAMVrfsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsReadParamsWithContext(ctx context.Context) *IPAMVrfsReadParams {
+ var ()
+ return &IPAMVrfsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsReadParamsWithHTTPClient creates a new IPAMVrfsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsReadParamsWithHTTPClient(client *http.Client) *IPAMVrfsReadParams {
+ var ()
+ return &IPAMVrfsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsReadParams contains all the parameters to send to the API endpoint
+for the ipam vrfs read operation typically these are written to a http.Request
+*/
+type IPAMVrfsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this VRF.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) WithTimeout(timeout time.Duration) *IPAMVrfsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) WithContext(ctx context.Context) *IPAMVrfsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) WithHTTPClient(client *http.Client) *IPAMVrfsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) WithID(id int64) *IPAMVrfsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vrfs read params
+func (o *IPAMVrfsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_responses.go
new file mode 100644
index 0000000..56e6293
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVrfsReadReader is a Reader for the IPAMVrfsRead structure.
+type IPAMVrfsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVrfsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsReadOK creates a IPAMVrfsReadOK with default headers values
+func NewIPAMVrfsReadOK() *IPAMVrfsReadOK {
+ return &IPAMVrfsReadOK{}
+}
+
+/*IPAMVrfsReadOK handles this case with default header values.
+
+IPAMVrfsReadOK ipam vrfs read o k
+*/
+type IPAMVrfsReadOK struct {
+ Payload *models.VRF
+}
+
+func (o *IPAMVrfsReadOK) Error() string {
+ return fmt.Sprintf("[GET /ipam/vrfs/{id}/][%d] ipamVrfsReadOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVrfsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VRF)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_parameters.go
new file mode 100644
index 0000000..9d7ad62
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewIPAMVrfsUpdateParams creates a new IPAMVrfsUpdateParams object
+// with the default values initialized.
+func NewIPAMVrfsUpdateParams() *IPAMVrfsUpdateParams {
+ var ()
+ return &IPAMVrfsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewIPAMVrfsUpdateParamsWithTimeout creates a new IPAMVrfsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewIPAMVrfsUpdateParamsWithTimeout(timeout time.Duration) *IPAMVrfsUpdateParams {
+ var ()
+ return &IPAMVrfsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewIPAMVrfsUpdateParamsWithContext creates a new IPAMVrfsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewIPAMVrfsUpdateParamsWithContext(ctx context.Context) *IPAMVrfsUpdateParams {
+ var ()
+ return &IPAMVrfsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewIPAMVrfsUpdateParamsWithHTTPClient creates a new IPAMVrfsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewIPAMVrfsUpdateParamsWithHTTPClient(client *http.Client) *IPAMVrfsUpdateParams {
+ var ()
+ return &IPAMVrfsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*IPAMVrfsUpdateParams contains all the parameters to send to the API endpoint
+for the ipam vrfs update operation typically these are written to a http.Request
+*/
+type IPAMVrfsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVRF
+ /*ID
+ A unique integer value identifying this VRF.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) WithTimeout(timeout time.Duration) *IPAMVrfsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) WithContext(ctx context.Context) *IPAMVrfsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) WithHTTPClient(client *http.Client) *IPAMVrfsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) WithData(data *models.WritableVRF) *IPAMVrfsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) SetData(data *models.WritableVRF) {
+ o.Data = data
+}
+
+// WithID adds the id to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) WithID(id int64) *IPAMVrfsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the ipam vrfs update params
+func (o *IPAMVrfsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *IPAMVrfsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_responses.go
new file mode 100644
index 0000000..972bf84
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/ipam/ip_amvrfs_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ipam
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// IPAMVrfsUpdateReader is a Reader for the IPAMVrfsUpdate structure.
+type IPAMVrfsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *IPAMVrfsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewIPAMVrfsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewIPAMVrfsUpdateOK creates a IPAMVrfsUpdateOK with default headers values
+func NewIPAMVrfsUpdateOK() *IPAMVrfsUpdateOK {
+ return &IPAMVrfsUpdateOK{}
+}
+
+/*IPAMVrfsUpdateOK handles this case with default header values.
+
+IPAMVrfsUpdateOK ipam vrfs update o k
+*/
+type IPAMVrfsUpdateOK struct {
+ Payload *models.WritableVRF
+}
+
+func (o *IPAMVrfsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /ipam/vrfs/{id}/][%d] ipamVrfsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *IPAMVrfsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVRF)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/net_box_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/net_box_client.go
new file mode 100644
index 0000000..dd3bbbe
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/net_box_client.go
@@ -0,0 +1,171 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package client
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+ httptransport "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/client/circuits"
+ "github.com/digitalocean/go-netbox/netbox/client/dcim"
+ "github.com/digitalocean/go-netbox/netbox/client/extras"
+ "github.com/digitalocean/go-netbox/netbox/client/ipam"
+ "github.com/digitalocean/go-netbox/netbox/client/secrets"
+ "github.com/digitalocean/go-netbox/netbox/client/tenancy"
+ "github.com/digitalocean/go-netbox/netbox/client/virtualization"
+)
+
+// Default net box HTTP client.
+var Default = NewHTTPClient(nil)
+
+const (
+ // DefaultHost is the default Host
+ // found in Meta (info) section of spec file
+ DefaultHost string = "localhost:8000"
+ // DefaultBasePath is the default BasePath
+ // found in Meta (info) section of spec file
+ DefaultBasePath string = "/api"
+)
+
+// DefaultSchemes are the default schemes found in Meta (info) section of spec file
+var DefaultSchemes = []string{"http"}
+
+// NewHTTPClient creates a new net box HTTP client.
+func NewHTTPClient(formats strfmt.Registry) *NetBox {
+ return NewHTTPClientWithConfig(formats, nil)
+}
+
+// NewHTTPClientWithConfig creates a new net box HTTP client,
+// using a customizable transport config.
+func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *NetBox {
+ // ensure nullable parameters have default
+ if formats == nil {
+ formats = strfmt.Default
+ }
+ if cfg == nil {
+ cfg = DefaultTransportConfig()
+ }
+
+ // create transport and client
+ transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
+ return New(transport, formats)
+}
+
+// New creates a new net box client
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *NetBox {
+ cli := new(NetBox)
+ cli.Transport = transport
+
+ cli.Circuits = circuits.New(transport, formats)
+
+ cli.Dcim = dcim.New(transport, formats)
+
+ cli.Extras = extras.New(transport, formats)
+
+ cli.IPAM = ipam.New(transport, formats)
+
+ cli.Secrets = secrets.New(transport, formats)
+
+ cli.Tenancy = tenancy.New(transport, formats)
+
+ cli.Virtualization = virtualization.New(transport, formats)
+
+ return cli
+}
+
+// DefaultTransportConfig creates a TransportConfig with the
+// default settings taken from the meta section of the spec file.
+func DefaultTransportConfig() *TransportConfig {
+ return &TransportConfig{
+ Host: DefaultHost,
+ BasePath: DefaultBasePath,
+ Schemes: DefaultSchemes,
+ }
+}
+
+// TransportConfig contains the transport related info,
+// found in the meta section of the spec file.
+type TransportConfig struct {
+ Host string
+ BasePath string
+ Schemes []string
+}
+
+// WithHost overrides the default host,
+// provided by the meta section of the spec file.
+func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
+ cfg.Host = host
+ return cfg
+}
+
+// WithBasePath overrides the default basePath,
+// provided by the meta section of the spec file.
+func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
+ cfg.BasePath = basePath
+ return cfg
+}
+
+// WithSchemes overrides the default schemes,
+// provided by the meta section of the spec file.
+func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
+ cfg.Schemes = schemes
+ return cfg
+}
+
+// NetBox is a client for net box
+type NetBox struct {
+ Circuits *circuits.Client
+
+ Dcim *dcim.Client
+
+ Extras *extras.Client
+
+ IPAM *ipam.Client
+
+ Secrets *secrets.Client
+
+ Tenancy *tenancy.Client
+
+ Virtualization *virtualization.Client
+
+ Transport runtime.ClientTransport
+}
+
+// SetTransport changes the transport on the client and all its subresources
+func (c *NetBox) SetTransport(transport runtime.ClientTransport) {
+ c.Transport = transport
+
+ c.Circuits.SetTransport(transport)
+
+ c.Dcim.SetTransport(transport)
+
+ c.Extras.SetTransport(transport)
+
+ c.IPAM.SetTransport(transport)
+
+ c.Secrets.SetTransport(transport)
+
+ c.Tenancy.SetTransport(transport)
+
+ c.Virtualization.SetTransport(transport)
+
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_parameters.go
new file mode 100644
index 0000000..f195561
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsChoicesListParams creates a new SecretsChoicesListParams object
+// with the default values initialized.
+func NewSecretsChoicesListParams() *SecretsChoicesListParams {
+
+ return &SecretsChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsChoicesListParamsWithTimeout creates a new SecretsChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsChoicesListParamsWithTimeout(timeout time.Duration) *SecretsChoicesListParams {
+
+ return &SecretsChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsChoicesListParamsWithContext creates a new SecretsChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsChoicesListParamsWithContext(ctx context.Context) *SecretsChoicesListParams {
+
+ return &SecretsChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsChoicesListParamsWithHTTPClient creates a new SecretsChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsChoicesListParamsWithHTTPClient(client *http.Client) *SecretsChoicesListParams {
+
+ return &SecretsChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsChoicesListParams contains all the parameters to send to the API endpoint
+for the secrets choices list operation typically these are written to a http.Request
+*/
+type SecretsChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets choices list params
+func (o *SecretsChoicesListParams) WithTimeout(timeout time.Duration) *SecretsChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets choices list params
+func (o *SecretsChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets choices list params
+func (o *SecretsChoicesListParams) WithContext(ctx context.Context) *SecretsChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets choices list params
+func (o *SecretsChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets choices list params
+func (o *SecretsChoicesListParams) WithHTTPClient(client *http.Client) *SecretsChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets choices list params
+func (o *SecretsChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_responses.go
new file mode 100644
index 0000000..6990d01
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsChoicesListReader is a Reader for the SecretsChoicesList structure.
+type SecretsChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsChoicesListOK creates a SecretsChoicesListOK with default headers values
+func NewSecretsChoicesListOK() *SecretsChoicesListOK {
+ return &SecretsChoicesListOK{}
+}
+
+/*SecretsChoicesListOK handles this case with default header values.
+
+SecretsChoicesListOK secrets choices list o k
+*/
+type SecretsChoicesListOK struct {
+}
+
+func (o *SecretsChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/_choices/][%d] secretsChoicesListOK ", 200)
+}
+
+func (o *SecretsChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_parameters.go
new file mode 100644
index 0000000..9f8e92d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsChoicesReadParams creates a new SecretsChoicesReadParams object
+// with the default values initialized.
+func NewSecretsChoicesReadParams() *SecretsChoicesReadParams {
+ var ()
+ return &SecretsChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsChoicesReadParamsWithTimeout creates a new SecretsChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsChoicesReadParamsWithTimeout(timeout time.Duration) *SecretsChoicesReadParams {
+ var ()
+ return &SecretsChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsChoicesReadParamsWithContext creates a new SecretsChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsChoicesReadParamsWithContext(ctx context.Context) *SecretsChoicesReadParams {
+ var ()
+ return &SecretsChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsChoicesReadParamsWithHTTPClient creates a new SecretsChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsChoicesReadParamsWithHTTPClient(client *http.Client) *SecretsChoicesReadParams {
+ var ()
+ return &SecretsChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsChoicesReadParams contains all the parameters to send to the API endpoint
+for the secrets choices read operation typically these are written to a http.Request
+*/
+type SecretsChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets choices read params
+func (o *SecretsChoicesReadParams) WithTimeout(timeout time.Duration) *SecretsChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets choices read params
+func (o *SecretsChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets choices read params
+func (o *SecretsChoicesReadParams) WithContext(ctx context.Context) *SecretsChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets choices read params
+func (o *SecretsChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets choices read params
+func (o *SecretsChoicesReadParams) WithHTTPClient(client *http.Client) *SecretsChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets choices read params
+func (o *SecretsChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the secrets choices read params
+func (o *SecretsChoicesReadParams) WithID(id string) *SecretsChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets choices read params
+func (o *SecretsChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go
new file mode 100644
index 0000000..e85f4f5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsChoicesReadReader is a Reader for the SecretsChoicesRead structure.
+type SecretsChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsChoicesReadOK creates a SecretsChoicesReadOK with default headers values
+func NewSecretsChoicesReadOK() *SecretsChoicesReadOK {
+ return &SecretsChoicesReadOK{}
+}
+
+/*SecretsChoicesReadOK handles this case with default header values.
+
+SecretsChoicesReadOK secrets choices read o k
+*/
+type SecretsChoicesReadOK struct {
+}
+
+func (o *SecretsChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/_choices/{id}/][%d] secretsChoicesReadOK ", 200)
+}
+
+func (o *SecretsChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_client.go
new file mode 100644
index 0000000..43f4525
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_client.go
@@ -0,0 +1,526 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new secrets API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for secrets API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+SecretsChoicesList secrets choices list API
+*/
+func (a *Client) SecretsChoicesList(params *SecretsChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets__choices_list",
+ Method: "GET",
+ PathPattern: "/secrets/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsChoicesListOK), nil
+
+}
+
+/*
+SecretsChoicesRead secrets choices read API
+*/
+func (a *Client) SecretsChoicesRead(params *SecretsChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets__choices_read",
+ Method: "GET",
+ PathPattern: "/secrets/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsChoicesReadOK), nil
+
+}
+
+/*
+SecretsGenerateRsaKeyPairList This endpoint can be used to generate a new RSA key pair. The keys are returned in PEM format.
+
+ {
+ "public_key": "<public key>",
+ "private_key": "<private key>"
+ }
+*/
+func (a *Client) SecretsGenerateRsaKeyPairList(params *SecretsGenerateRsaKeyPairListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsGenerateRsaKeyPairListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsGenerateRsaKeyPairListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_generate-rsa-key-pair_list",
+ Method: "GET",
+ PathPattern: "/secrets/generate-rsa-key-pair/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsGenerateRsaKeyPairListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsGenerateRsaKeyPairListOK), nil
+
+}
+
+/*
+SecretsGetSessionKeyCreate Retrieve a temporary session key to use for encrypting and decrypting secrets via the API. The user's private RSA
+key is POSTed with the name `private_key`. An example:
+
+ curl -v -X POST -H "Authorization: Token <token>" -H "Accept: application/json; indent=4" \
+ --data-urlencode "private_key@<filename>" https://netbox/api/secrets/get-session-key/
+
+This request will yield a base64-encoded session key to be included in an `X-Session-Key` header in future requests:
+
+ {
+ "session_key": "+8t4SI6XikgVmB5+/urhozx9O5qCQANyOk1MNe6taRf="
+ }
+
+This endpoint accepts one optional parameter: `preserve_key`. If True and a session key exists, the existing session
+key will be returned instead of a new one.
+*/
+func (a *Client) SecretsGetSessionKeyCreate(params *SecretsGetSessionKeyCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsGetSessionKeyCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsGetSessionKeyCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_get-session-key_create",
+ Method: "POST",
+ PathPattern: "/secrets/get-session-key/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsGetSessionKeyCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsGetSessionKeyCreateCreated), nil
+
+}
+
+/*
+SecretsSecretRolesCreate secrets secret roles create API
+*/
+func (a *Client) SecretsSecretRolesCreate(params *SecretsSecretRolesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_create",
+ Method: "POST",
+ PathPattern: "/secrets/secret-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesCreateCreated), nil
+
+}
+
+/*
+SecretsSecretRolesDelete secrets secret roles delete API
+*/
+func (a *Client) SecretsSecretRolesDelete(params *SecretsSecretRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_delete",
+ Method: "DELETE",
+ PathPattern: "/secrets/secret-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesDeleteNoContent), nil
+
+}
+
+/*
+SecretsSecretRolesList secrets secret roles list API
+*/
+func (a *Client) SecretsSecretRolesList(params *SecretsSecretRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_list",
+ Method: "GET",
+ PathPattern: "/secrets/secret-roles/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesListOK), nil
+
+}
+
+/*
+SecretsSecretRolesPartialUpdate secrets secret roles partial update API
+*/
+func (a *Client) SecretsSecretRolesPartialUpdate(params *SecretsSecretRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_partial_update",
+ Method: "PATCH",
+ PathPattern: "/secrets/secret-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesPartialUpdateOK), nil
+
+}
+
+/*
+SecretsSecretRolesRead secrets secret roles read API
+*/
+func (a *Client) SecretsSecretRolesRead(params *SecretsSecretRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_read",
+ Method: "GET",
+ PathPattern: "/secrets/secret-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesReadOK), nil
+
+}
+
+/*
+SecretsSecretRolesUpdate secrets secret roles update API
+*/
+func (a *Client) SecretsSecretRolesUpdate(params *SecretsSecretRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretRolesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretRolesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secret-roles_update",
+ Method: "PUT",
+ PathPattern: "/secrets/secret-roles/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretRolesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretRolesUpdateOK), nil
+
+}
+
+/*
+SecretsSecretsCreate secrets secrets create API
+*/
+func (a *Client) SecretsSecretsCreate(params *SecretsSecretsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_create",
+ Method: "POST",
+ PathPattern: "/secrets/secrets/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsCreateCreated), nil
+
+}
+
+/*
+SecretsSecretsDelete secrets secrets delete API
+*/
+func (a *Client) SecretsSecretsDelete(params *SecretsSecretsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_delete",
+ Method: "DELETE",
+ PathPattern: "/secrets/secrets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsDeleteNoContent), nil
+
+}
+
+/*
+SecretsSecretsList secrets secrets list API
+*/
+func (a *Client) SecretsSecretsList(params *SecretsSecretsListParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_list",
+ Method: "GET",
+ PathPattern: "/secrets/secrets/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsListOK), nil
+
+}
+
+/*
+SecretsSecretsPartialUpdate secrets secrets partial update API
+*/
+func (a *Client) SecretsSecretsPartialUpdate(params *SecretsSecretsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_partial_update",
+ Method: "PATCH",
+ PathPattern: "/secrets/secrets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsPartialUpdateOK), nil
+
+}
+
+/*
+SecretsSecretsRead secrets secrets read API
+*/
+func (a *Client) SecretsSecretsRead(params *SecretsSecretsReadParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_read",
+ Method: "GET",
+ PathPattern: "/secrets/secrets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsReadOK), nil
+
+}
+
+/*
+SecretsSecretsUpdate secrets secrets update API
+*/
+func (a *Client) SecretsSecretsUpdate(params *SecretsSecretsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*SecretsSecretsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewSecretsSecretsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "secrets_secrets_update",
+ Method: "PUT",
+ PathPattern: "/secrets/secrets/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &SecretsSecretsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*SecretsSecretsUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go
new file mode 100644
index 0000000..617c6d1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsGenerateRsaKeyPairListParams creates a new SecretsGenerateRsaKeyPairListParams object
+// with the default values initialized.
+func NewSecretsGenerateRsaKeyPairListParams() *SecretsGenerateRsaKeyPairListParams {
+
+ return &SecretsGenerateRsaKeyPairListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsGenerateRsaKeyPairListParamsWithTimeout creates a new SecretsGenerateRsaKeyPairListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsGenerateRsaKeyPairListParamsWithTimeout(timeout time.Duration) *SecretsGenerateRsaKeyPairListParams {
+
+ return &SecretsGenerateRsaKeyPairListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsGenerateRsaKeyPairListParamsWithContext creates a new SecretsGenerateRsaKeyPairListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsGenerateRsaKeyPairListParamsWithContext(ctx context.Context) *SecretsGenerateRsaKeyPairListParams {
+
+ return &SecretsGenerateRsaKeyPairListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsGenerateRsaKeyPairListParamsWithHTTPClient creates a new SecretsGenerateRsaKeyPairListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsGenerateRsaKeyPairListParamsWithHTTPClient(client *http.Client) *SecretsGenerateRsaKeyPairListParams {
+
+ return &SecretsGenerateRsaKeyPairListParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsGenerateRsaKeyPairListParams contains all the parameters to send to the API endpoint
+for the secrets generate rsa key pair list operation typically these are written to a http.Request
+*/
+type SecretsGenerateRsaKeyPairListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) WithTimeout(timeout time.Duration) *SecretsGenerateRsaKeyPairListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) WithContext(ctx context.Context) *SecretsGenerateRsaKeyPairListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) WithHTTPClient(client *http.Client) *SecretsGenerateRsaKeyPairListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets generate rsa key pair list params
+func (o *SecretsGenerateRsaKeyPairListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsGenerateRsaKeyPairListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go
new file mode 100644
index 0000000..eac1128
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_generate_rsa_key_pair_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsGenerateRsaKeyPairListReader is a Reader for the SecretsGenerateRsaKeyPairList structure.
+type SecretsGenerateRsaKeyPairListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsGenerateRsaKeyPairListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsGenerateRsaKeyPairListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsGenerateRsaKeyPairListOK creates a SecretsGenerateRsaKeyPairListOK with default headers values
+func NewSecretsGenerateRsaKeyPairListOK() *SecretsGenerateRsaKeyPairListOK {
+ return &SecretsGenerateRsaKeyPairListOK{}
+}
+
+/*SecretsGenerateRsaKeyPairListOK handles this case with default header values.
+
+SecretsGenerateRsaKeyPairListOK secrets generate rsa key pair list o k
+*/
+type SecretsGenerateRsaKeyPairListOK struct {
+}
+
+func (o *SecretsGenerateRsaKeyPairListOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/generate-rsa-key-pair/][%d] secretsGenerateRsaKeyPairListOK ", 200)
+}
+
+func (o *SecretsGenerateRsaKeyPairListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_parameters.go
new file mode 100644
index 0000000..1b6a820
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsGetSessionKeyCreateParams creates a new SecretsGetSessionKeyCreateParams object
+// with the default values initialized.
+func NewSecretsGetSessionKeyCreateParams() *SecretsGetSessionKeyCreateParams {
+
+ return &SecretsGetSessionKeyCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsGetSessionKeyCreateParamsWithTimeout creates a new SecretsGetSessionKeyCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsGetSessionKeyCreateParamsWithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams {
+
+ return &SecretsGetSessionKeyCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsGetSessionKeyCreateParamsWithContext creates a new SecretsGetSessionKeyCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsGetSessionKeyCreateParamsWithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams {
+
+ return &SecretsGetSessionKeyCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsGetSessionKeyCreateParamsWithHTTPClient creates a new SecretsGetSessionKeyCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsGetSessionKeyCreateParamsWithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams {
+
+ return &SecretsGetSessionKeyCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsGetSessionKeyCreateParams contains all the parameters to send to the API endpoint
+for the secrets get session key create operation typically these are written to a http.Request
+*/
+type SecretsGetSessionKeyCreateParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) WithTimeout(timeout time.Duration) *SecretsGetSessionKeyCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) WithContext(ctx context.Context) *SecretsGetSessionKeyCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) WithHTTPClient(client *http.Client) *SecretsGetSessionKeyCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets get session key create params
+func (o *SecretsGetSessionKeyCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsGetSessionKeyCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_responses.go
new file mode 100644
index 0000000..5e68480
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_get_session_key_create_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsGetSessionKeyCreateReader is a Reader for the SecretsGetSessionKeyCreate structure.
+type SecretsGetSessionKeyCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsGetSessionKeyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewSecretsGetSessionKeyCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsGetSessionKeyCreateCreated creates a SecretsGetSessionKeyCreateCreated with default headers values
+func NewSecretsGetSessionKeyCreateCreated() *SecretsGetSessionKeyCreateCreated {
+ return &SecretsGetSessionKeyCreateCreated{}
+}
+
+/*SecretsGetSessionKeyCreateCreated handles this case with default header values.
+
+SecretsGetSessionKeyCreateCreated secrets get session key create created
+*/
+type SecretsGetSessionKeyCreateCreated struct {
+}
+
+func (o *SecretsGetSessionKeyCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /secrets/get-session-key/][%d] secretsGetSessionKeyCreateCreated ", 201)
+}
+
+func (o *SecretsGetSessionKeyCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_parameters.go
new file mode 100644
index 0000000..9079873
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretRolesCreateParams creates a new SecretsSecretRolesCreateParams object
+// with the default values initialized.
+func NewSecretsSecretRolesCreateParams() *SecretsSecretRolesCreateParams {
+ var ()
+ return &SecretsSecretRolesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesCreateParamsWithTimeout creates a new SecretsSecretRolesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesCreateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesCreateParams {
+ var ()
+ return &SecretsSecretRolesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesCreateParamsWithContext creates a new SecretsSecretRolesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesCreateParamsWithContext(ctx context.Context) *SecretsSecretRolesCreateParams {
+ var ()
+ return &SecretsSecretRolesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesCreateParamsWithHTTPClient creates a new SecretsSecretRolesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesCreateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesCreateParams {
+ var ()
+ return &SecretsSecretRolesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesCreateParams contains all the parameters to send to the API endpoint
+for the secrets secret roles create operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesCreateParams struct {
+
+ /*Data*/
+ Data *models.SecretRole
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) WithContext(ctx context.Context) *SecretsSecretRolesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) WithData(data *models.SecretRole) *SecretsSecretRolesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secret roles create params
+func (o *SecretsSecretRolesCreateParams) SetData(data *models.SecretRole) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_responses.go
new file mode 100644
index 0000000..3e7f580
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretRolesCreateReader is a Reader for the SecretsSecretRolesCreate structure.
+type SecretsSecretRolesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewSecretsSecretRolesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesCreateCreated creates a SecretsSecretRolesCreateCreated with default headers values
+func NewSecretsSecretRolesCreateCreated() *SecretsSecretRolesCreateCreated {
+ return &SecretsSecretRolesCreateCreated{}
+}
+
+/*SecretsSecretRolesCreateCreated handles this case with default header values.
+
+SecretsSecretRolesCreateCreated secrets secret roles create created
+*/
+type SecretsSecretRolesCreateCreated struct {
+ Payload *models.SecretRole
+}
+
+func (o *SecretsSecretRolesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /secrets/secret-roles/][%d] secretsSecretRolesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *SecretsSecretRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_parameters.go
new file mode 100644
index 0000000..a817be2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretRolesDeleteParams creates a new SecretsSecretRolesDeleteParams object
+// with the default values initialized.
+func NewSecretsSecretRolesDeleteParams() *SecretsSecretRolesDeleteParams {
+ var ()
+ return &SecretsSecretRolesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesDeleteParamsWithTimeout creates a new SecretsSecretRolesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesDeleteParams {
+ var ()
+ return &SecretsSecretRolesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesDeleteParamsWithContext creates a new SecretsSecretRolesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesDeleteParamsWithContext(ctx context.Context) *SecretsSecretRolesDeleteParams {
+ var ()
+ return &SecretsSecretRolesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesDeleteParamsWithHTTPClient creates a new SecretsSecretRolesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesDeleteParams {
+ var ()
+ return &SecretsSecretRolesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesDeleteParams contains all the parameters to send to the API endpoint
+for the secrets secret roles delete operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this secret role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) WithContext(ctx context.Context) *SecretsSecretRolesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) WithID(id int64) *SecretsSecretRolesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secret roles delete params
+func (o *SecretsSecretRolesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_responses.go
new file mode 100644
index 0000000..e8691fa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsSecretRolesDeleteReader is a Reader for the SecretsSecretRolesDelete structure.
+type SecretsSecretRolesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewSecretsSecretRolesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesDeleteNoContent creates a SecretsSecretRolesDeleteNoContent with default headers values
+func NewSecretsSecretRolesDeleteNoContent() *SecretsSecretRolesDeleteNoContent {
+ return &SecretsSecretRolesDeleteNoContent{}
+}
+
+/*SecretsSecretRolesDeleteNoContent handles this case with default header values.
+
+SecretsSecretRolesDeleteNoContent secrets secret roles delete no content
+*/
+type SecretsSecretRolesDeleteNoContent struct {
+}
+
+func (o *SecretsSecretRolesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /secrets/secret-roles/{id}/][%d] secretsSecretRolesDeleteNoContent ", 204)
+}
+
+func (o *SecretsSecretRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_parameters.go
new file mode 100644
index 0000000..3f348ef
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretRolesListParams creates a new SecretsSecretRolesListParams object
+// with the default values initialized.
+func NewSecretsSecretRolesListParams() *SecretsSecretRolesListParams {
+ var ()
+ return &SecretsSecretRolesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesListParamsWithTimeout creates a new SecretsSecretRolesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesListParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesListParams {
+ var ()
+ return &SecretsSecretRolesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesListParamsWithContext creates a new SecretsSecretRolesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesListParamsWithContext(ctx context.Context) *SecretsSecretRolesListParams {
+ var ()
+ return &SecretsSecretRolesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesListParamsWithHTTPClient creates a new SecretsSecretRolesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesListParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesListParams {
+ var ()
+ return &SecretsSecretRolesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesListParams contains all the parameters to send to the API endpoint
+for the secrets secret roles list operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithContext(ctx context.Context) *SecretsSecretRolesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithLimit(limit *int64) *SecretsSecretRolesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithName(name *string) *SecretsSecretRolesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithOffset(offset *int64) *SecretsSecretRolesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) WithSlug(slug *string) *SecretsSecretRolesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the secrets secret roles list params
+func (o *SecretsSecretRolesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_responses.go
new file mode 100644
index 0000000..5c9ef19
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretRolesListReader is a Reader for the SecretsSecretRolesList structure.
+type SecretsSecretRolesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretRolesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesListOK creates a SecretsSecretRolesListOK with default headers values
+func NewSecretsSecretRolesListOK() *SecretsSecretRolesListOK {
+ return &SecretsSecretRolesListOK{}
+}
+
+/*SecretsSecretRolesListOK handles this case with default header values.
+
+SecretsSecretRolesListOK secrets secret roles list o k
+*/
+type SecretsSecretRolesListOK struct {
+ Payload *models.SecretsSecretRolesListOKBody
+}
+
+func (o *SecretsSecretRolesListOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/secret-roles/][%d] secretsSecretRolesListOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretsSecretRolesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go
new file mode 100644
index 0000000..8d5cc74
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretRolesPartialUpdateParams creates a new SecretsSecretRolesPartialUpdateParams object
+// with the default values initialized.
+func NewSecretsSecretRolesPartialUpdateParams() *SecretsSecretRolesPartialUpdateParams {
+ var ()
+ return &SecretsSecretRolesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesPartialUpdateParamsWithTimeout creates a new SecretsSecretRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesPartialUpdateParams {
+ var ()
+ return &SecretsSecretRolesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesPartialUpdateParamsWithContext creates a new SecretsSecretRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesPartialUpdateParams {
+ var ()
+ return &SecretsSecretRolesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesPartialUpdateParamsWithHTTPClient creates a new SecretsSecretRolesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesPartialUpdateParams {
+ var ()
+ return &SecretsSecretRolesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the secrets secret roles partial update operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.SecretRole
+ /*ID
+ A unique integer value identifying this secret role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) SetData(data *models.SecretRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) WithID(id int64) *SecretsSecretRolesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secret roles partial update params
+func (o *SecretsSecretRolesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go
new file mode 100644
index 0000000..e32c3b9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretRolesPartialUpdateReader is a Reader for the SecretsSecretRolesPartialUpdate structure.
+type SecretsSecretRolesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretRolesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesPartialUpdateOK creates a SecretsSecretRolesPartialUpdateOK with default headers values
+func NewSecretsSecretRolesPartialUpdateOK() *SecretsSecretRolesPartialUpdateOK {
+ return &SecretsSecretRolesPartialUpdateOK{}
+}
+
+/*SecretsSecretRolesPartialUpdateOK handles this case with default header values.
+
+SecretsSecretRolesPartialUpdateOK secrets secret roles partial update o k
+*/
+type SecretsSecretRolesPartialUpdateOK struct {
+ Payload *models.SecretRole
+}
+
+func (o *SecretsSecretRolesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /secrets/secret-roles/{id}/][%d] secretsSecretRolesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_parameters.go
new file mode 100644
index 0000000..2f77a4f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretRolesReadParams creates a new SecretsSecretRolesReadParams object
+// with the default values initialized.
+func NewSecretsSecretRolesReadParams() *SecretsSecretRolesReadParams {
+ var ()
+ return &SecretsSecretRolesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesReadParamsWithTimeout creates a new SecretsSecretRolesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesReadParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesReadParams {
+ var ()
+ return &SecretsSecretRolesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesReadParamsWithContext creates a new SecretsSecretRolesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesReadParamsWithContext(ctx context.Context) *SecretsSecretRolesReadParams {
+ var ()
+ return &SecretsSecretRolesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesReadParamsWithHTTPClient creates a new SecretsSecretRolesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesReadParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesReadParams {
+ var ()
+ return &SecretsSecretRolesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesReadParams contains all the parameters to send to the API endpoint
+for the secrets secret roles read operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this secret role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) WithContext(ctx context.Context) *SecretsSecretRolesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) WithID(id int64) *SecretsSecretRolesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secret roles read params
+func (o *SecretsSecretRolesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_responses.go
new file mode 100644
index 0000000..1af11f6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretRolesReadReader is a Reader for the SecretsSecretRolesRead structure.
+type SecretsSecretRolesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretRolesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesReadOK creates a SecretsSecretRolesReadOK with default headers values
+func NewSecretsSecretRolesReadOK() *SecretsSecretRolesReadOK {
+ return &SecretsSecretRolesReadOK{}
+}
+
+/*SecretsSecretRolesReadOK handles this case with default header values.
+
+SecretsSecretRolesReadOK secrets secret roles read o k
+*/
+type SecretsSecretRolesReadOK struct {
+ Payload *models.SecretRole
+}
+
+func (o *SecretsSecretRolesReadOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/secret-roles/{id}/][%d] secretsSecretRolesReadOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_parameters.go
new file mode 100644
index 0000000..fbee6d4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretRolesUpdateParams creates a new SecretsSecretRolesUpdateParams object
+// with the default values initialized.
+func NewSecretsSecretRolesUpdateParams() *SecretsSecretRolesUpdateParams {
+ var ()
+ return &SecretsSecretRolesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretRolesUpdateParamsWithTimeout creates a new SecretsSecretRolesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretRolesUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretRolesUpdateParams {
+ var ()
+ return &SecretsSecretRolesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretRolesUpdateParamsWithContext creates a new SecretsSecretRolesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretRolesUpdateParamsWithContext(ctx context.Context) *SecretsSecretRolesUpdateParams {
+ var ()
+ return &SecretsSecretRolesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretRolesUpdateParamsWithHTTPClient creates a new SecretsSecretRolesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretRolesUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretRolesUpdateParams {
+ var ()
+ return &SecretsSecretRolesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretRolesUpdateParams contains all the parameters to send to the API endpoint
+for the secrets secret roles update operation typically these are written to a http.Request
+*/
+type SecretsSecretRolesUpdateParams struct {
+
+ /*Data*/
+ Data *models.SecretRole
+ /*ID
+ A unique integer value identifying this secret role.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretRolesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) WithContext(ctx context.Context) *SecretsSecretRolesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretRolesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) WithData(data *models.SecretRole) *SecretsSecretRolesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) SetData(data *models.SecretRole) {
+ o.Data = data
+}
+
+// WithID adds the id to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) WithID(id int64) *SecretsSecretRolesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secret roles update params
+func (o *SecretsSecretRolesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_responses.go
new file mode 100644
index 0000000..335f724
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secret_roles_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretRolesUpdateReader is a Reader for the SecretsSecretRolesUpdate structure.
+type SecretsSecretRolesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretRolesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretRolesUpdateOK creates a SecretsSecretRolesUpdateOK with default headers values
+func NewSecretsSecretRolesUpdateOK() *SecretsSecretRolesUpdateOK {
+ return &SecretsSecretRolesUpdateOK{}
+}
+
+/*SecretsSecretRolesUpdateOK handles this case with default header values.
+
+SecretsSecretRolesUpdateOK secrets secret roles update o k
+*/
+type SecretsSecretRolesUpdateOK struct {
+ Payload *models.SecretRole
+}
+
+func (o *SecretsSecretRolesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /secrets/secret-roles/{id}/][%d] secretsSecretRolesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretRole)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_parameters.go
new file mode 100644
index 0000000..955ef7a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretsCreateParams creates a new SecretsSecretsCreateParams object
+// with the default values initialized.
+func NewSecretsSecretsCreateParams() *SecretsSecretsCreateParams {
+ var ()
+ return &SecretsSecretsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsCreateParamsWithTimeout creates a new SecretsSecretsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsCreateParamsWithTimeout(timeout time.Duration) *SecretsSecretsCreateParams {
+ var ()
+ return &SecretsSecretsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsCreateParamsWithContext creates a new SecretsSecretsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsCreateParamsWithContext(ctx context.Context) *SecretsSecretsCreateParams {
+ var ()
+ return &SecretsSecretsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsCreateParamsWithHTTPClient creates a new SecretsSecretsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsCreateParamsWithHTTPClient(client *http.Client) *SecretsSecretsCreateParams {
+ var ()
+ return &SecretsSecretsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsCreateParams contains all the parameters to send to the API endpoint
+for the secrets secrets create operation typically these are written to a http.Request
+*/
+type SecretsSecretsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableSecret
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) WithTimeout(timeout time.Duration) *SecretsSecretsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) WithContext(ctx context.Context) *SecretsSecretsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) WithHTTPClient(client *http.Client) *SecretsSecretsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) WithData(data *models.WritableSecret) *SecretsSecretsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secrets create params
+func (o *SecretsSecretsCreateParams) SetData(data *models.WritableSecret) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_responses.go
new file mode 100644
index 0000000..7bfc702
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretsCreateReader is a Reader for the SecretsSecretsCreate structure.
+type SecretsSecretsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewSecretsSecretsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsCreateCreated creates a SecretsSecretsCreateCreated with default headers values
+func NewSecretsSecretsCreateCreated() *SecretsSecretsCreateCreated {
+ return &SecretsSecretsCreateCreated{}
+}
+
+/*SecretsSecretsCreateCreated handles this case with default header values.
+
+SecretsSecretsCreateCreated secrets secrets create created
+*/
+type SecretsSecretsCreateCreated struct {
+ Payload *models.WritableSecret
+}
+
+func (o *SecretsSecretsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /secrets/secrets/][%d] secretsSecretsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *SecretsSecretsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSecret)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_parameters.go
new file mode 100644
index 0000000..b4d4592
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretsDeleteParams creates a new SecretsSecretsDeleteParams object
+// with the default values initialized.
+func NewSecretsSecretsDeleteParams() *SecretsSecretsDeleteParams {
+ var ()
+ return &SecretsSecretsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsDeleteParamsWithTimeout creates a new SecretsSecretsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsDeleteParamsWithTimeout(timeout time.Duration) *SecretsSecretsDeleteParams {
+ var ()
+ return &SecretsSecretsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsDeleteParamsWithContext creates a new SecretsSecretsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsDeleteParamsWithContext(ctx context.Context) *SecretsSecretsDeleteParams {
+ var ()
+ return &SecretsSecretsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsDeleteParamsWithHTTPClient creates a new SecretsSecretsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsDeleteParamsWithHTTPClient(client *http.Client) *SecretsSecretsDeleteParams {
+ var ()
+ return &SecretsSecretsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsDeleteParams contains all the parameters to send to the API endpoint
+for the secrets secrets delete operation typically these are written to a http.Request
+*/
+type SecretsSecretsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this secret.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) WithTimeout(timeout time.Duration) *SecretsSecretsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) WithContext(ctx context.Context) *SecretsSecretsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) WithHTTPClient(client *http.Client) *SecretsSecretsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) WithID(id int64) *SecretsSecretsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secrets delete params
+func (o *SecretsSecretsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_responses.go
new file mode 100644
index 0000000..d4f3a92
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// SecretsSecretsDeleteReader is a Reader for the SecretsSecretsDelete structure.
+type SecretsSecretsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewSecretsSecretsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsDeleteNoContent creates a SecretsSecretsDeleteNoContent with default headers values
+func NewSecretsSecretsDeleteNoContent() *SecretsSecretsDeleteNoContent {
+ return &SecretsSecretsDeleteNoContent{}
+}
+
+/*SecretsSecretsDeleteNoContent handles this case with default header values.
+
+SecretsSecretsDeleteNoContent secrets secrets delete no content
+*/
+type SecretsSecretsDeleteNoContent struct {
+}
+
+func (o *SecretsSecretsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /secrets/secrets/{id}/][%d] secretsSecretsDeleteNoContent ", 204)
+}
+
+func (o *SecretsSecretsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_parameters.go
new file mode 100644
index 0000000..0692ae4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_parameters.go
@@ -0,0 +1,401 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretsListParams creates a new SecretsSecretsListParams object
+// with the default values initialized.
+func NewSecretsSecretsListParams() *SecretsSecretsListParams {
+ var ()
+ return &SecretsSecretsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsListParamsWithTimeout creates a new SecretsSecretsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsListParamsWithTimeout(timeout time.Duration) *SecretsSecretsListParams {
+ var ()
+ return &SecretsSecretsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsListParamsWithContext creates a new SecretsSecretsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsListParamsWithContext(ctx context.Context) *SecretsSecretsListParams {
+ var ()
+ return &SecretsSecretsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsListParamsWithHTTPClient creates a new SecretsSecretsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsListParamsWithHTTPClient(client *http.Client) *SecretsSecretsListParams {
+ var ()
+ return &SecretsSecretsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsListParams contains all the parameters to send to the API endpoint
+for the secrets secrets list operation typically these are written to a http.Request
+*/
+type SecretsSecretsListParams struct {
+
+ /*Device*/
+ Device *string
+ /*DeviceID*/
+ DeviceID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithTimeout(timeout time.Duration) *SecretsSecretsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithContext(ctx context.Context) *SecretsSecretsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithHTTPClient(client *http.Client) *SecretsSecretsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithDevice adds the device to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithDevice(device *string) *SecretsSecretsListParams {
+ o.SetDevice(device)
+ return o
+}
+
+// SetDevice adds the device to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetDevice(device *string) {
+ o.Device = device
+}
+
+// WithDeviceID adds the deviceID to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithDeviceID(deviceID *string) *SecretsSecretsListParams {
+ o.SetDeviceID(deviceID)
+ return o
+}
+
+// SetDeviceID adds the deviceId to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetDeviceID(deviceID *string) {
+ o.DeviceID = deviceID
+}
+
+// WithIDIn adds the iDIn to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithIDIn(iDIn *string) *SecretsSecretsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithLimit(limit *int64) *SecretsSecretsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithName(name *string) *SecretsSecretsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithOffset(offset *int64) *SecretsSecretsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithQ(q *string) *SecretsSecretsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithRole(role *string) *SecretsSecretsListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the secrets secrets list params
+func (o *SecretsSecretsListParams) WithRoleID(roleID *string) *SecretsSecretsListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the secrets secrets list params
+func (o *SecretsSecretsListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Device != nil {
+
+ // query param device
+ var qrDevice string
+ if o.Device != nil {
+ qrDevice = *o.Device
+ }
+ qDevice := qrDevice
+ if qDevice != "" {
+ if err := r.SetQueryParam("device", qDevice); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.DeviceID != nil {
+
+ // query param device_id
+ var qrDeviceID string
+ if o.DeviceID != nil {
+ qrDeviceID = *o.DeviceID
+ }
+ qDeviceID := qrDeviceID
+ if qDeviceID != "" {
+ if err := r.SetQueryParam("device_id", qDeviceID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_responses.go
new file mode 100644
index 0000000..be87d65
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretsListReader is a Reader for the SecretsSecretsList structure.
+type SecretsSecretsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsListOK creates a SecretsSecretsListOK with default headers values
+func NewSecretsSecretsListOK() *SecretsSecretsListOK {
+ return &SecretsSecretsListOK{}
+}
+
+/*SecretsSecretsListOK handles this case with default header values.
+
+SecretsSecretsListOK secrets secrets list o k
+*/
+type SecretsSecretsListOK struct {
+ Payload *models.SecretsSecretsListOKBody
+}
+
+func (o *SecretsSecretsListOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/secrets/][%d] secretsSecretsListOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.SecretsSecretsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_parameters.go
new file mode 100644
index 0000000..fcd0af3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretsPartialUpdateParams creates a new SecretsSecretsPartialUpdateParams object
+// with the default values initialized.
+func NewSecretsSecretsPartialUpdateParams() *SecretsSecretsPartialUpdateParams {
+ var ()
+ return &SecretsSecretsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsPartialUpdateParamsWithTimeout creates a new SecretsSecretsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsPartialUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsPartialUpdateParams {
+ var ()
+ return &SecretsSecretsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsPartialUpdateParamsWithContext creates a new SecretsSecretsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsPartialUpdateParamsWithContext(ctx context.Context) *SecretsSecretsPartialUpdateParams {
+ var ()
+ return &SecretsSecretsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsPartialUpdateParamsWithHTTPClient creates a new SecretsSecretsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsPartialUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsPartialUpdateParams {
+ var ()
+ return &SecretsSecretsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the secrets secrets partial update operation typically these are written to a http.Request
+*/
+type SecretsSecretsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableSecret
+ /*ID
+ A unique integer value identifying this secret.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) WithContext(ctx context.Context) *SecretsSecretsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) SetData(data *models.WritableSecret) {
+ o.Data = data
+}
+
+// WithID adds the id to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) WithID(id int64) *SecretsSecretsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secrets partial update params
+func (o *SecretsSecretsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_responses.go
new file mode 100644
index 0000000..283b1aa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretsPartialUpdateReader is a Reader for the SecretsSecretsPartialUpdate structure.
+type SecretsSecretsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsPartialUpdateOK creates a SecretsSecretsPartialUpdateOK with default headers values
+func NewSecretsSecretsPartialUpdateOK() *SecretsSecretsPartialUpdateOK {
+ return &SecretsSecretsPartialUpdateOK{}
+}
+
+/*SecretsSecretsPartialUpdateOK handles this case with default header values.
+
+SecretsSecretsPartialUpdateOK secrets secrets partial update o k
+*/
+type SecretsSecretsPartialUpdateOK struct {
+ Payload *models.WritableSecret
+}
+
+func (o *SecretsSecretsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /secrets/secrets/{id}/][%d] secretsSecretsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSecret)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_parameters.go
new file mode 100644
index 0000000..080922f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewSecretsSecretsReadParams creates a new SecretsSecretsReadParams object
+// with the default values initialized.
+func NewSecretsSecretsReadParams() *SecretsSecretsReadParams {
+ var ()
+ return &SecretsSecretsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsReadParamsWithTimeout creates a new SecretsSecretsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsReadParamsWithTimeout(timeout time.Duration) *SecretsSecretsReadParams {
+ var ()
+ return &SecretsSecretsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsReadParamsWithContext creates a new SecretsSecretsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsReadParamsWithContext(ctx context.Context) *SecretsSecretsReadParams {
+ var ()
+ return &SecretsSecretsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsReadParamsWithHTTPClient creates a new SecretsSecretsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsReadParamsWithHTTPClient(client *http.Client) *SecretsSecretsReadParams {
+ var ()
+ return &SecretsSecretsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsReadParams contains all the parameters to send to the API endpoint
+for the secrets secrets read operation typically these are written to a http.Request
+*/
+type SecretsSecretsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this secret.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets read params
+func (o *SecretsSecretsReadParams) WithTimeout(timeout time.Duration) *SecretsSecretsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets read params
+func (o *SecretsSecretsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets read params
+func (o *SecretsSecretsReadParams) WithContext(ctx context.Context) *SecretsSecretsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets read params
+func (o *SecretsSecretsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets read params
+func (o *SecretsSecretsReadParams) WithHTTPClient(client *http.Client) *SecretsSecretsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets read params
+func (o *SecretsSecretsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the secrets secrets read params
+func (o *SecretsSecretsReadParams) WithID(id int64) *SecretsSecretsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secrets read params
+func (o *SecretsSecretsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_responses.go
new file mode 100644
index 0000000..2f7b82f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretsReadReader is a Reader for the SecretsSecretsRead structure.
+type SecretsSecretsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsReadOK creates a SecretsSecretsReadOK with default headers values
+func NewSecretsSecretsReadOK() *SecretsSecretsReadOK {
+ return &SecretsSecretsReadOK{}
+}
+
+/*SecretsSecretsReadOK handles this case with default header values.
+
+SecretsSecretsReadOK secrets secrets read o k
+*/
+type SecretsSecretsReadOK struct {
+ Payload *models.Secret
+}
+
+func (o *SecretsSecretsReadOK) Error() string {
+ return fmt.Sprintf("[GET /secrets/secrets/{id}/][%d] secretsSecretsReadOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Secret)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_parameters.go
new file mode 100644
index 0000000..9e0f8e6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewSecretsSecretsUpdateParams creates a new SecretsSecretsUpdateParams object
+// with the default values initialized.
+func NewSecretsSecretsUpdateParams() *SecretsSecretsUpdateParams {
+ var ()
+ return &SecretsSecretsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewSecretsSecretsUpdateParamsWithTimeout creates a new SecretsSecretsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewSecretsSecretsUpdateParamsWithTimeout(timeout time.Duration) *SecretsSecretsUpdateParams {
+ var ()
+ return &SecretsSecretsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewSecretsSecretsUpdateParamsWithContext creates a new SecretsSecretsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewSecretsSecretsUpdateParamsWithContext(ctx context.Context) *SecretsSecretsUpdateParams {
+ var ()
+ return &SecretsSecretsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewSecretsSecretsUpdateParamsWithHTTPClient creates a new SecretsSecretsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewSecretsSecretsUpdateParamsWithHTTPClient(client *http.Client) *SecretsSecretsUpdateParams {
+ var ()
+ return &SecretsSecretsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*SecretsSecretsUpdateParams contains all the parameters to send to the API endpoint
+for the secrets secrets update operation typically these are written to a http.Request
+*/
+type SecretsSecretsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableSecret
+ /*ID
+ A unique integer value identifying this secret.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) WithTimeout(timeout time.Duration) *SecretsSecretsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) WithContext(ctx context.Context) *SecretsSecretsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) WithHTTPClient(client *http.Client) *SecretsSecretsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) WithData(data *models.WritableSecret) *SecretsSecretsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) SetData(data *models.WritableSecret) {
+ o.Data = data
+}
+
+// WithID adds the id to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) WithID(id int64) *SecretsSecretsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the secrets secrets update params
+func (o *SecretsSecretsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *SecretsSecretsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_responses.go
new file mode 100644
index 0000000..a956a68
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/secrets/secrets_secrets_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package secrets
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// SecretsSecretsUpdateReader is a Reader for the SecretsSecretsUpdate structure.
+type SecretsSecretsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *SecretsSecretsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewSecretsSecretsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewSecretsSecretsUpdateOK creates a SecretsSecretsUpdateOK with default headers values
+func NewSecretsSecretsUpdateOK() *SecretsSecretsUpdateOK {
+ return &SecretsSecretsUpdateOK{}
+}
+
+/*SecretsSecretsUpdateOK handles this case with default header values.
+
+SecretsSecretsUpdateOK secrets secrets update o k
+*/
+type SecretsSecretsUpdateOK struct {
+ Payload *models.WritableSecret
+}
+
+func (o *SecretsSecretsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /secrets/secrets/{id}/][%d] secretsSecretsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *SecretsSecretsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableSecret)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_parameters.go
new file mode 100644
index 0000000..65e9a94
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyChoicesListParams creates a new TenancyChoicesListParams object
+// with the default values initialized.
+func NewTenancyChoicesListParams() *TenancyChoicesListParams {
+
+ return &TenancyChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyChoicesListParamsWithTimeout creates a new TenancyChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyChoicesListParamsWithTimeout(timeout time.Duration) *TenancyChoicesListParams {
+
+ return &TenancyChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyChoicesListParamsWithContext creates a new TenancyChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyChoicesListParamsWithContext(ctx context.Context) *TenancyChoicesListParams {
+
+ return &TenancyChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyChoicesListParamsWithHTTPClient creates a new TenancyChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyChoicesListParamsWithHTTPClient(client *http.Client) *TenancyChoicesListParams {
+
+ return &TenancyChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyChoicesListParams contains all the parameters to send to the API endpoint
+for the tenancy choices list operation typically these are written to a http.Request
+*/
+type TenancyChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy choices list params
+func (o *TenancyChoicesListParams) WithTimeout(timeout time.Duration) *TenancyChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy choices list params
+func (o *TenancyChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy choices list params
+func (o *TenancyChoicesListParams) WithContext(ctx context.Context) *TenancyChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy choices list params
+func (o *TenancyChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy choices list params
+func (o *TenancyChoicesListParams) WithHTTPClient(client *http.Client) *TenancyChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy choices list params
+func (o *TenancyChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_responses.go
new file mode 100644
index 0000000..b0bbe7b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// TenancyChoicesListReader is a Reader for the TenancyChoicesList structure.
+type TenancyChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyChoicesListOK creates a TenancyChoicesListOK with default headers values
+func NewTenancyChoicesListOK() *TenancyChoicesListOK {
+ return &TenancyChoicesListOK{}
+}
+
+/*TenancyChoicesListOK handles this case with default header values.
+
+TenancyChoicesListOK tenancy choices list o k
+*/
+type TenancyChoicesListOK struct {
+}
+
+func (o *TenancyChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/_choices/][%d] tenancyChoicesListOK ", 200)
+}
+
+func (o *TenancyChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_parameters.go
new file mode 100644
index 0000000..9a325aa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyChoicesReadParams creates a new TenancyChoicesReadParams object
+// with the default values initialized.
+func NewTenancyChoicesReadParams() *TenancyChoicesReadParams {
+ var ()
+ return &TenancyChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyChoicesReadParamsWithTimeout creates a new TenancyChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyChoicesReadParamsWithTimeout(timeout time.Duration) *TenancyChoicesReadParams {
+ var ()
+ return &TenancyChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyChoicesReadParamsWithContext creates a new TenancyChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyChoicesReadParamsWithContext(ctx context.Context) *TenancyChoicesReadParams {
+ var ()
+ return &TenancyChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyChoicesReadParamsWithHTTPClient creates a new TenancyChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyChoicesReadParamsWithHTTPClient(client *http.Client) *TenancyChoicesReadParams {
+ var ()
+ return &TenancyChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyChoicesReadParams contains all the parameters to send to the API endpoint
+for the tenancy choices read operation typically these are written to a http.Request
+*/
+type TenancyChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy choices read params
+func (o *TenancyChoicesReadParams) WithTimeout(timeout time.Duration) *TenancyChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy choices read params
+func (o *TenancyChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy choices read params
+func (o *TenancyChoicesReadParams) WithContext(ctx context.Context) *TenancyChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy choices read params
+func (o *TenancyChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy choices read params
+func (o *TenancyChoicesReadParams) WithHTTPClient(client *http.Client) *TenancyChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy choices read params
+func (o *TenancyChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the tenancy choices read params
+func (o *TenancyChoicesReadParams) WithID(id string) *TenancyChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy choices read params
+func (o *TenancyChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_responses.go
new file mode 100644
index 0000000..d48fa07
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// TenancyChoicesReadReader is a Reader for the TenancyChoicesRead structure.
+type TenancyChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyChoicesReadOK creates a TenancyChoicesReadOK with default headers values
+func NewTenancyChoicesReadOK() *TenancyChoicesReadOK {
+ return &TenancyChoicesReadOK{}
+}
+
+/*TenancyChoicesReadOK handles this case with default header values.
+
+TenancyChoicesReadOK tenancy choices read o k
+*/
+type TenancyChoicesReadOK struct {
+}
+
+func (o *TenancyChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/_choices/{id}/][%d] tenancyChoicesReadOK ", 200)
+}
+
+func (o *TenancyChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_client.go
new file mode 100644
index 0000000..455ac4d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_client.go
@@ -0,0 +1,450 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new tenancy API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for tenancy API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+TenancyChoicesList tenancy choices list API
+*/
+func (a *Client) TenancyChoicesList(params *TenancyChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy__choices_list",
+ Method: "GET",
+ PathPattern: "/tenancy/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyChoicesListOK), nil
+
+}
+
+/*
+TenancyChoicesRead tenancy choices read API
+*/
+func (a *Client) TenancyChoicesRead(params *TenancyChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy__choices_read",
+ Method: "GET",
+ PathPattern: "/tenancy/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyChoicesReadOK), nil
+
+}
+
+/*
+TenancyTenantGroupsCreate tenancy tenant groups create API
+*/
+func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_create",
+ Method: "POST",
+ PathPattern: "/tenancy/tenant-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsCreateCreated), nil
+
+}
+
+/*
+TenancyTenantGroupsDelete tenancy tenant groups delete API
+*/
+func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_delete",
+ Method: "DELETE",
+ PathPattern: "/tenancy/tenant-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsDeleteNoContent), nil
+
+}
+
+/*
+TenancyTenantGroupsList tenancy tenant groups list API
+*/
+func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_list",
+ Method: "GET",
+ PathPattern: "/tenancy/tenant-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsListOK), nil
+
+}
+
+/*
+TenancyTenantGroupsPartialUpdate tenancy tenant groups partial update API
+*/
+func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_partial_update",
+ Method: "PATCH",
+ PathPattern: "/tenancy/tenant-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsPartialUpdateOK), nil
+
+}
+
+/*
+TenancyTenantGroupsRead tenancy tenant groups read API
+*/
+func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_read",
+ Method: "GET",
+ PathPattern: "/tenancy/tenant-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsReadOK), nil
+
+}
+
+/*
+TenancyTenantGroupsUpdate tenancy tenant groups update API
+*/
+func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantGroupsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantGroupsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenant-groups_update",
+ Method: "PUT",
+ PathPattern: "/tenancy/tenant-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantGroupsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantGroupsUpdateOK), nil
+
+}
+
+/*
+TenancyTenantsCreate tenancy tenants create API
+*/
+func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_create",
+ Method: "POST",
+ PathPattern: "/tenancy/tenants/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsCreateCreated), nil
+
+}
+
+/*
+TenancyTenantsDelete tenancy tenants delete API
+*/
+func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_delete",
+ Method: "DELETE",
+ PathPattern: "/tenancy/tenants/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsDeleteNoContent), nil
+
+}
+
+/*
+TenancyTenantsList tenancy tenants list API
+*/
+func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_list",
+ Method: "GET",
+ PathPattern: "/tenancy/tenants/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsListOK), nil
+
+}
+
+/*
+TenancyTenantsPartialUpdate tenancy tenants partial update API
+*/
+func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_partial_update",
+ Method: "PATCH",
+ PathPattern: "/tenancy/tenants/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsPartialUpdateOK), nil
+
+}
+
+/*
+TenancyTenantsRead tenancy tenants read API
+*/
+func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_read",
+ Method: "GET",
+ PathPattern: "/tenancy/tenants/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsReadOK), nil
+
+}
+
+/*
+TenancyTenantsUpdate tenancy tenants update API
+*/
+func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*TenancyTenantsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewTenancyTenantsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "tenancy_tenants_update",
+ Method: "PUT",
+ PathPattern: "/tenancy/tenants/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &TenancyTenantsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*TenancyTenantsUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go
new file mode 100644
index 0000000..e2da622
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantGroupsCreateParams creates a new TenancyTenantGroupsCreateParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsCreateParams() *TenancyTenantGroupsCreateParams {
+ var ()
+ return &TenancyTenantGroupsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsCreateParamsWithTimeout creates a new TenancyTenantGroupsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsCreateParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsCreateParams {
+ var ()
+ return &TenancyTenantGroupsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsCreateParamsWithContext creates a new TenancyTenantGroupsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsCreateParamsWithContext(ctx context.Context) *TenancyTenantGroupsCreateParams {
+ var ()
+ return &TenancyTenantGroupsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsCreateParamsWithHTTPClient creates a new TenancyTenantGroupsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsCreateParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsCreateParams {
+ var ()
+ return &TenancyTenantGroupsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsCreateParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups create operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsCreateParams struct {
+
+ /*Data*/
+ Data *models.TenantGroup
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) WithContext(ctx context.Context) *TenancyTenantGroupsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) WithData(data *models.TenantGroup) *TenancyTenantGroupsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenant groups create params
+func (o *TenancyTenantGroupsCreateParams) SetData(data *models.TenantGroup) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go
new file mode 100644
index 0000000..9f21308
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantGroupsCreateReader is a Reader for the TenancyTenantGroupsCreate structure.
+type TenancyTenantGroupsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewTenancyTenantGroupsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsCreateCreated creates a TenancyTenantGroupsCreateCreated with default headers values
+func NewTenancyTenantGroupsCreateCreated() *TenancyTenantGroupsCreateCreated {
+ return &TenancyTenantGroupsCreateCreated{}
+}
+
+/*TenancyTenantGroupsCreateCreated handles this case with default header values.
+
+TenancyTenantGroupsCreateCreated tenancy tenant groups create created
+*/
+type TenancyTenantGroupsCreateCreated struct {
+ Payload *models.TenantGroup
+}
+
+func (o *TenancyTenantGroupsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /tenancy/tenant-groups/][%d] tenancyTenantGroupsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *TenancyTenantGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenantGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go
new file mode 100644
index 0000000..ceb93fa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantGroupsDeleteParams creates a new TenancyTenantGroupsDeleteParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsDeleteParams() *TenancyTenantGroupsDeleteParams {
+ var ()
+ return &TenancyTenantGroupsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsDeleteParamsWithTimeout creates a new TenancyTenantGroupsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsDeleteParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsDeleteParams {
+ var ()
+ return &TenancyTenantGroupsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsDeleteParamsWithContext creates a new TenancyTenantGroupsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsDeleteParamsWithContext(ctx context.Context) *TenancyTenantGroupsDeleteParams {
+ var ()
+ return &TenancyTenantGroupsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsDeleteParamsWithHTTPClient creates a new TenancyTenantGroupsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsDeleteParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsDeleteParams {
+ var ()
+ return &TenancyTenantGroupsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsDeleteParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups delete operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this tenant group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) WithContext(ctx context.Context) *TenancyTenantGroupsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) WithID(id int64) *TenancyTenantGroupsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenant groups delete params
+func (o *TenancyTenantGroupsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go
new file mode 100644
index 0000000..37f99bc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// TenancyTenantGroupsDeleteReader is a Reader for the TenancyTenantGroupsDelete structure.
+type TenancyTenantGroupsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewTenancyTenantGroupsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsDeleteNoContent creates a TenancyTenantGroupsDeleteNoContent with default headers values
+func NewTenancyTenantGroupsDeleteNoContent() *TenancyTenantGroupsDeleteNoContent {
+ return &TenancyTenantGroupsDeleteNoContent{}
+}
+
+/*TenancyTenantGroupsDeleteNoContent handles this case with default header values.
+
+TenancyTenantGroupsDeleteNoContent tenancy tenant groups delete no content
+*/
+type TenancyTenantGroupsDeleteNoContent struct {
+}
+
+func (o *TenancyTenantGroupsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsDeleteNoContent ", 204)
+}
+
+func (o *TenancyTenantGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go
new file mode 100644
index 0000000..5eaa4a3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantGroupsListParams creates a new TenancyTenantGroupsListParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsListParams() *TenancyTenantGroupsListParams {
+ var ()
+ return &TenancyTenantGroupsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsListParamsWithTimeout creates a new TenancyTenantGroupsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsListParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsListParams {
+ var ()
+ return &TenancyTenantGroupsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsListParamsWithContext creates a new TenancyTenantGroupsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsListParamsWithContext(ctx context.Context) *TenancyTenantGroupsListParams {
+ var ()
+ return &TenancyTenantGroupsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsListParamsWithHTTPClient creates a new TenancyTenantGroupsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsListParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsListParams {
+ var ()
+ return &TenancyTenantGroupsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsListParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups list operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithContext(ctx context.Context) *TenancyTenantGroupsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithLimit(limit *int64) *TenancyTenantGroupsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithName(name *string) *TenancyTenantGroupsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithOffset(offset *int64) *TenancyTenantGroupsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) WithSlug(slug *string) *TenancyTenantGroupsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the tenancy tenant groups list params
+func (o *TenancyTenantGroupsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go
new file mode 100644
index 0000000..2de4173
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantGroupsListReader is a Reader for the TenancyTenantGroupsList structure.
+type TenancyTenantGroupsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantGroupsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsListOK creates a TenancyTenantGroupsListOK with default headers values
+func NewTenancyTenantGroupsListOK() *TenancyTenantGroupsListOK {
+ return &TenancyTenantGroupsListOK{}
+}
+
+/*TenancyTenantGroupsListOK handles this case with default header values.
+
+TenancyTenantGroupsListOK tenancy tenant groups list o k
+*/
+type TenancyTenantGroupsListOK struct {
+ Payload *models.TenancyTenantGroupsListOKBody
+}
+
+func (o *TenancyTenantGroupsListOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/tenant-groups/][%d] tenancyTenantGroupsListOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenancyTenantGroupsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go
new file mode 100644
index 0000000..882a6c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantGroupsPartialUpdateParams creates a new TenancyTenantGroupsPartialUpdateParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsPartialUpdateParams() *TenancyTenantGroupsPartialUpdateParams {
+ var ()
+ return &TenancyTenantGroupsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsPartialUpdateParamsWithTimeout creates a new TenancyTenantGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsPartialUpdateParams {
+ var ()
+ return &TenancyTenantGroupsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsPartialUpdateParamsWithContext creates a new TenancyTenantGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsPartialUpdateParamsWithContext(ctx context.Context) *TenancyTenantGroupsPartialUpdateParams {
+ var ()
+ return &TenancyTenantGroupsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsPartialUpdateParamsWithHTTPClient creates a new TenancyTenantGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsPartialUpdateParams {
+ var ()
+ return &TenancyTenantGroupsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups partial update operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.TenantGroup
+ /*ID
+ A unique integer value identifying this tenant group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) WithContext(ctx context.Context) *TenancyTenantGroupsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) WithData(data *models.TenantGroup) *TenancyTenantGroupsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) SetData(data *models.TenantGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) WithID(id int64) *TenancyTenantGroupsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenant groups partial update params
+func (o *TenancyTenantGroupsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go
new file mode 100644
index 0000000..19444b8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantGroupsPartialUpdateReader is a Reader for the TenancyTenantGroupsPartialUpdate structure.
+type TenancyTenantGroupsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantGroupsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsPartialUpdateOK creates a TenancyTenantGroupsPartialUpdateOK with default headers values
+func NewTenancyTenantGroupsPartialUpdateOK() *TenancyTenantGroupsPartialUpdateOK {
+ return &TenancyTenantGroupsPartialUpdateOK{}
+}
+
+/*TenancyTenantGroupsPartialUpdateOK handles this case with default header values.
+
+TenancyTenantGroupsPartialUpdateOK tenancy tenant groups partial update o k
+*/
+type TenancyTenantGroupsPartialUpdateOK struct {
+ Payload *models.TenantGroup
+}
+
+func (o *TenancyTenantGroupsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenantGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go
new file mode 100644
index 0000000..67c8bb1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantGroupsReadParams creates a new TenancyTenantGroupsReadParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsReadParams() *TenancyTenantGroupsReadParams {
+ var ()
+ return &TenancyTenantGroupsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsReadParamsWithTimeout creates a new TenancyTenantGroupsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsReadParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsReadParams {
+ var ()
+ return &TenancyTenantGroupsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsReadParamsWithContext creates a new TenancyTenantGroupsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsReadParamsWithContext(ctx context.Context) *TenancyTenantGroupsReadParams {
+ var ()
+ return &TenancyTenantGroupsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsReadParamsWithHTTPClient creates a new TenancyTenantGroupsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsReadParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsReadParams {
+ var ()
+ return &TenancyTenantGroupsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsReadParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups read operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this tenant group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) WithContext(ctx context.Context) *TenancyTenantGroupsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) WithID(id int64) *TenancyTenantGroupsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenant groups read params
+func (o *TenancyTenantGroupsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go
new file mode 100644
index 0000000..364fe3b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantGroupsReadReader is a Reader for the TenancyTenantGroupsRead structure.
+type TenancyTenantGroupsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantGroupsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsReadOK creates a TenancyTenantGroupsReadOK with default headers values
+func NewTenancyTenantGroupsReadOK() *TenancyTenantGroupsReadOK {
+ return &TenancyTenantGroupsReadOK{}
+}
+
+/*TenancyTenantGroupsReadOK handles this case with default header values.
+
+TenancyTenantGroupsReadOK tenancy tenant groups read o k
+*/
+type TenancyTenantGroupsReadOK struct {
+ Payload *models.TenantGroup
+}
+
+func (o *TenancyTenantGroupsReadOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsReadOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenantGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go
new file mode 100644
index 0000000..73bedae
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantGroupsUpdateParams creates a new TenancyTenantGroupsUpdateParams object
+// with the default values initialized.
+func NewTenancyTenantGroupsUpdateParams() *TenancyTenantGroupsUpdateParams {
+ var ()
+ return &TenancyTenantGroupsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantGroupsUpdateParamsWithTimeout creates a new TenancyTenantGroupsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantGroupsUpdateParamsWithTimeout(timeout time.Duration) *TenancyTenantGroupsUpdateParams {
+ var ()
+ return &TenancyTenantGroupsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantGroupsUpdateParamsWithContext creates a new TenancyTenantGroupsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantGroupsUpdateParamsWithContext(ctx context.Context) *TenancyTenantGroupsUpdateParams {
+ var ()
+ return &TenancyTenantGroupsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantGroupsUpdateParamsWithHTTPClient creates a new TenancyTenantGroupsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantGroupsUpdateParamsWithHTTPClient(client *http.Client) *TenancyTenantGroupsUpdateParams {
+ var ()
+ return &TenancyTenantGroupsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantGroupsUpdateParams contains all the parameters to send to the API endpoint
+for the tenancy tenant groups update operation typically these are written to a http.Request
+*/
+type TenancyTenantGroupsUpdateParams struct {
+
+ /*Data*/
+ Data *models.TenantGroup
+ /*ID
+ A unique integer value identifying this tenant group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) WithTimeout(timeout time.Duration) *TenancyTenantGroupsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) WithContext(ctx context.Context) *TenancyTenantGroupsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) WithHTTPClient(client *http.Client) *TenancyTenantGroupsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) WithData(data *models.TenantGroup) *TenancyTenantGroupsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) SetData(data *models.TenantGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) WithID(id int64) *TenancyTenantGroupsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenant groups update params
+func (o *TenancyTenantGroupsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go
new file mode 100644
index 0000000..bcfea4b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenant_groups_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantGroupsUpdateReader is a Reader for the TenancyTenantGroupsUpdate structure.
+type TenancyTenantGroupsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantGroupsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantGroupsUpdateOK creates a TenancyTenantGroupsUpdateOK with default headers values
+func NewTenancyTenantGroupsUpdateOK() *TenancyTenantGroupsUpdateOK {
+ return &TenancyTenantGroupsUpdateOK{}
+}
+
+/*TenancyTenantGroupsUpdateOK handles this case with default header values.
+
+TenancyTenantGroupsUpdateOK tenancy tenant groups update o k
+*/
+type TenancyTenantGroupsUpdateOK struct {
+ Payload *models.TenantGroup
+}
+
+func (o *TenancyTenantGroupsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /tenancy/tenant-groups/{id}/][%d] tenancyTenantGroupsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenantGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_parameters.go
new file mode 100644
index 0000000..0d07794
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantsCreateParams creates a new TenancyTenantsCreateParams object
+// with the default values initialized.
+func NewTenancyTenantsCreateParams() *TenancyTenantsCreateParams {
+ var ()
+ return &TenancyTenantsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsCreateParamsWithTimeout creates a new TenancyTenantsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsCreateParamsWithTimeout(timeout time.Duration) *TenancyTenantsCreateParams {
+ var ()
+ return &TenancyTenantsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsCreateParamsWithContext creates a new TenancyTenantsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsCreateParamsWithContext(ctx context.Context) *TenancyTenantsCreateParams {
+ var ()
+ return &TenancyTenantsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsCreateParamsWithHTTPClient creates a new TenancyTenantsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsCreateParamsWithHTTPClient(client *http.Client) *TenancyTenantsCreateParams {
+ var ()
+ return &TenancyTenantsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsCreateParams contains all the parameters to send to the API endpoint
+for the tenancy tenants create operation typically these are written to a http.Request
+*/
+type TenancyTenantsCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableTenant
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) WithTimeout(timeout time.Duration) *TenancyTenantsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) WithContext(ctx context.Context) *TenancyTenantsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) WithHTTPClient(client *http.Client) *TenancyTenantsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) WithData(data *models.WritableTenant) *TenancyTenantsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenants create params
+func (o *TenancyTenantsCreateParams) SetData(data *models.WritableTenant) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_responses.go
new file mode 100644
index 0000000..9a75edf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantsCreateReader is a Reader for the TenancyTenantsCreate structure.
+type TenancyTenantsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewTenancyTenantsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsCreateCreated creates a TenancyTenantsCreateCreated with default headers values
+func NewTenancyTenantsCreateCreated() *TenancyTenantsCreateCreated {
+ return &TenancyTenantsCreateCreated{}
+}
+
+/*TenancyTenantsCreateCreated handles this case with default header values.
+
+TenancyTenantsCreateCreated tenancy tenants create created
+*/
+type TenancyTenantsCreateCreated struct {
+ Payload *models.WritableTenant
+}
+
+func (o *TenancyTenantsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /tenancy/tenants/][%d] tenancyTenantsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *TenancyTenantsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTenant)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_parameters.go
new file mode 100644
index 0000000..543d4c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantsDeleteParams creates a new TenancyTenantsDeleteParams object
+// with the default values initialized.
+func NewTenancyTenantsDeleteParams() *TenancyTenantsDeleteParams {
+ var ()
+ return &TenancyTenantsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsDeleteParamsWithTimeout creates a new TenancyTenantsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsDeleteParamsWithTimeout(timeout time.Duration) *TenancyTenantsDeleteParams {
+ var ()
+ return &TenancyTenantsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsDeleteParamsWithContext creates a new TenancyTenantsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsDeleteParamsWithContext(ctx context.Context) *TenancyTenantsDeleteParams {
+ var ()
+ return &TenancyTenantsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsDeleteParamsWithHTTPClient creates a new TenancyTenantsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsDeleteParamsWithHTTPClient(client *http.Client) *TenancyTenantsDeleteParams {
+ var ()
+ return &TenancyTenantsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsDeleteParams contains all the parameters to send to the API endpoint
+for the tenancy tenants delete operation typically these are written to a http.Request
+*/
+type TenancyTenantsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this tenant.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) WithTimeout(timeout time.Duration) *TenancyTenantsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) WithContext(ctx context.Context) *TenancyTenantsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) WithHTTPClient(client *http.Client) *TenancyTenantsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) WithID(id int64) *TenancyTenantsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenants delete params
+func (o *TenancyTenantsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_responses.go
new file mode 100644
index 0000000..137da56
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// TenancyTenantsDeleteReader is a Reader for the TenancyTenantsDelete structure.
+type TenancyTenantsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewTenancyTenantsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsDeleteNoContent creates a TenancyTenantsDeleteNoContent with default headers values
+func NewTenancyTenantsDeleteNoContent() *TenancyTenantsDeleteNoContent {
+ return &TenancyTenantsDeleteNoContent{}
+}
+
+/*TenancyTenantsDeleteNoContent handles this case with default header values.
+
+TenancyTenantsDeleteNoContent tenancy tenants delete no content
+*/
+type TenancyTenantsDeleteNoContent struct {
+}
+
+func (o *TenancyTenantsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /tenancy/tenants/{id}/][%d] tenancyTenantsDeleteNoContent ", 204)
+}
+
+func (o *TenancyTenantsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_parameters.go
new file mode 100644
index 0000000..80e91ea
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_parameters.go
@@ -0,0 +1,343 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantsListParams creates a new TenancyTenantsListParams object
+// with the default values initialized.
+func NewTenancyTenantsListParams() *TenancyTenantsListParams {
+ var ()
+ return &TenancyTenantsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsListParamsWithTimeout creates a new TenancyTenantsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsListParamsWithTimeout(timeout time.Duration) *TenancyTenantsListParams {
+ var ()
+ return &TenancyTenantsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsListParamsWithContext creates a new TenancyTenantsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsListParamsWithContext(ctx context.Context) *TenancyTenantsListParams {
+ var ()
+ return &TenancyTenantsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsListParamsWithHTTPClient creates a new TenancyTenantsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsListParamsWithHTTPClient(client *http.Client) *TenancyTenantsListParams {
+ var ()
+ return &TenancyTenantsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsListParams contains all the parameters to send to the API endpoint
+for the tenancy tenants list operation typically these are written to a http.Request
+*/
+type TenancyTenantsListParams struct {
+
+ /*Group*/
+ Group *string
+ /*GroupID*/
+ GroupID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithTimeout(timeout time.Duration) *TenancyTenantsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithContext(ctx context.Context) *TenancyTenantsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithHTTPClient(client *http.Client) *TenancyTenantsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithGroup adds the group to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithGroup(group *string) *TenancyTenantsListParams {
+ o.SetGroup(group)
+ return o
+}
+
+// SetGroup adds the group to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetGroup(group *string) {
+ o.Group = group
+}
+
+// WithGroupID adds the groupID to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithGroupID(groupID *string) *TenancyTenantsListParams {
+ o.SetGroupID(groupID)
+ return o
+}
+
+// SetGroupID adds the groupId to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetGroupID(groupID *string) {
+ o.GroupID = groupID
+}
+
+// WithIDIn adds the iDIn to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithIDIn(iDIn *string) *TenancyTenantsListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithLimit(limit *int64) *TenancyTenantsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithName(name *string) *TenancyTenantsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithOffset(offset *int64) *TenancyTenantsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the tenancy tenants list params
+func (o *TenancyTenantsListParams) WithQ(q *string) *TenancyTenantsListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the tenancy tenants list params
+func (o *TenancyTenantsListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Group != nil {
+
+ // query param group
+ var qrGroup string
+ if o.Group != nil {
+ qrGroup = *o.Group
+ }
+ qGroup := qrGroup
+ if qGroup != "" {
+ if err := r.SetQueryParam("group", qGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.GroupID != nil {
+
+ // query param group_id
+ var qrGroupID string
+ if o.GroupID != nil {
+ qrGroupID = *o.GroupID
+ }
+ qGroupID := qrGroupID
+ if qGroupID != "" {
+ if err := r.SetQueryParam("group_id", qGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_responses.go
new file mode 100644
index 0000000..038e7af
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantsListReader is a Reader for the TenancyTenantsList structure.
+type TenancyTenantsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsListOK creates a TenancyTenantsListOK with default headers values
+func NewTenancyTenantsListOK() *TenancyTenantsListOK {
+ return &TenancyTenantsListOK{}
+}
+
+/*TenancyTenantsListOK handles this case with default header values.
+
+TenancyTenantsListOK tenancy tenants list o k
+*/
+type TenancyTenantsListOK struct {
+ Payload *models.TenancyTenantsListOKBody
+}
+
+func (o *TenancyTenantsListOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/tenants/][%d] tenancyTenantsListOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.TenancyTenantsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go
new file mode 100644
index 0000000..30efff8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantsPartialUpdateParams creates a new TenancyTenantsPartialUpdateParams object
+// with the default values initialized.
+func NewTenancyTenantsPartialUpdateParams() *TenancyTenantsPartialUpdateParams {
+ var ()
+ return &TenancyTenantsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsPartialUpdateParamsWithTimeout creates a new TenancyTenantsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyTenantsPartialUpdateParams {
+ var ()
+ return &TenancyTenantsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsPartialUpdateParamsWithContext creates a new TenancyTenantsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsPartialUpdateParamsWithContext(ctx context.Context) *TenancyTenantsPartialUpdateParams {
+ var ()
+ return &TenancyTenantsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsPartialUpdateParamsWithHTTPClient creates a new TenancyTenantsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyTenantsPartialUpdateParams {
+ var ()
+ return &TenancyTenantsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the tenancy tenants partial update operation typically these are written to a http.Request
+*/
+type TenancyTenantsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableTenant
+ /*ID
+ A unique integer value identifying this tenant.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyTenantsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) WithContext(ctx context.Context) *TenancyTenantsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyTenantsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) WithData(data *models.WritableTenant) *TenancyTenantsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) SetData(data *models.WritableTenant) {
+ o.Data = data
+}
+
+// WithID adds the id to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) WithID(id int64) *TenancyTenantsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenants partial update params
+func (o *TenancyTenantsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go
new file mode 100644
index 0000000..238bdd4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantsPartialUpdateReader is a Reader for the TenancyTenantsPartialUpdate structure.
+type TenancyTenantsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsPartialUpdateOK creates a TenancyTenantsPartialUpdateOK with default headers values
+func NewTenancyTenantsPartialUpdateOK() *TenancyTenantsPartialUpdateOK {
+ return &TenancyTenantsPartialUpdateOK{}
+}
+
+/*TenancyTenantsPartialUpdateOK handles this case with default header values.
+
+TenancyTenantsPartialUpdateOK tenancy tenants partial update o k
+*/
+type TenancyTenantsPartialUpdateOK struct {
+ Payload *models.WritableTenant
+}
+
+func (o *TenancyTenantsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /tenancy/tenants/{id}/][%d] tenancyTenantsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTenant)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_parameters.go
new file mode 100644
index 0000000..51a9700
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewTenancyTenantsReadParams creates a new TenancyTenantsReadParams object
+// with the default values initialized.
+func NewTenancyTenantsReadParams() *TenancyTenantsReadParams {
+ var ()
+ return &TenancyTenantsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsReadParamsWithTimeout creates a new TenancyTenantsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsReadParamsWithTimeout(timeout time.Duration) *TenancyTenantsReadParams {
+ var ()
+ return &TenancyTenantsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsReadParamsWithContext creates a new TenancyTenantsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsReadParamsWithContext(ctx context.Context) *TenancyTenantsReadParams {
+ var ()
+ return &TenancyTenantsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsReadParamsWithHTTPClient creates a new TenancyTenantsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsReadParamsWithHTTPClient(client *http.Client) *TenancyTenantsReadParams {
+ var ()
+ return &TenancyTenantsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsReadParams contains all the parameters to send to the API endpoint
+for the tenancy tenants read operation typically these are written to a http.Request
+*/
+type TenancyTenantsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this tenant.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) WithTimeout(timeout time.Duration) *TenancyTenantsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) WithContext(ctx context.Context) *TenancyTenantsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) WithHTTPClient(client *http.Client) *TenancyTenantsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) WithID(id int64) *TenancyTenantsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenants read params
+func (o *TenancyTenantsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_responses.go
new file mode 100644
index 0000000..7d30c28
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantsReadReader is a Reader for the TenancyTenantsRead structure.
+type TenancyTenantsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsReadOK creates a TenancyTenantsReadOK with default headers values
+func NewTenancyTenantsReadOK() *TenancyTenantsReadOK {
+ return &TenancyTenantsReadOK{}
+}
+
+/*TenancyTenantsReadOK handles this case with default header values.
+
+TenancyTenantsReadOK tenancy tenants read o k
+*/
+type TenancyTenantsReadOK struct {
+ Payload *models.Tenant
+}
+
+func (o *TenancyTenantsReadOK) Error() string {
+ return fmt.Sprintf("[GET /tenancy/tenants/{id}/][%d] tenancyTenantsReadOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Tenant)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_parameters.go
new file mode 100644
index 0000000..a4c978e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewTenancyTenantsUpdateParams creates a new TenancyTenantsUpdateParams object
+// with the default values initialized.
+func NewTenancyTenantsUpdateParams() *TenancyTenantsUpdateParams {
+ var ()
+ return &TenancyTenantsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewTenancyTenantsUpdateParamsWithTimeout creates a new TenancyTenantsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewTenancyTenantsUpdateParamsWithTimeout(timeout time.Duration) *TenancyTenantsUpdateParams {
+ var ()
+ return &TenancyTenantsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewTenancyTenantsUpdateParamsWithContext creates a new TenancyTenantsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewTenancyTenantsUpdateParamsWithContext(ctx context.Context) *TenancyTenantsUpdateParams {
+ var ()
+ return &TenancyTenantsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewTenancyTenantsUpdateParamsWithHTTPClient creates a new TenancyTenantsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewTenancyTenantsUpdateParamsWithHTTPClient(client *http.Client) *TenancyTenantsUpdateParams {
+ var ()
+ return &TenancyTenantsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*TenancyTenantsUpdateParams contains all the parameters to send to the API endpoint
+for the tenancy tenants update operation typically these are written to a http.Request
+*/
+type TenancyTenantsUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableTenant
+ /*ID
+ A unique integer value identifying this tenant.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) WithTimeout(timeout time.Duration) *TenancyTenantsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) WithContext(ctx context.Context) *TenancyTenantsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) WithHTTPClient(client *http.Client) *TenancyTenantsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) WithData(data *models.WritableTenant) *TenancyTenantsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) SetData(data *models.WritableTenant) {
+ o.Data = data
+}
+
+// WithID adds the id to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) WithID(id int64) *TenancyTenantsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the tenancy tenants update params
+func (o *TenancyTenantsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *TenancyTenantsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_responses.go
new file mode 100644
index 0000000..548dbd1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/tenancy/tenancy_tenants_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tenancy
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// TenancyTenantsUpdateReader is a Reader for the TenancyTenantsUpdate structure.
+type TenancyTenantsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *TenancyTenantsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewTenancyTenantsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewTenancyTenantsUpdateOK creates a TenancyTenantsUpdateOK with default headers values
+func NewTenancyTenantsUpdateOK() *TenancyTenantsUpdateOK {
+ return &TenancyTenantsUpdateOK{}
+}
+
+/*TenancyTenantsUpdateOK handles this case with default header values.
+
+TenancyTenantsUpdateOK tenancy tenants update o k
+*/
+type TenancyTenantsUpdateOK struct {
+ Payload *models.WritableTenant
+}
+
+func (o *TenancyTenantsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /tenancy/tenants/{id}/][%d] tenancyTenantsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *TenancyTenantsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableTenant)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_parameters.go
new file mode 100644
index 0000000..c163258
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_parameters.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationChoicesListParams creates a new VirtualizationChoicesListParams object
+// with the default values initialized.
+func NewVirtualizationChoicesListParams() *VirtualizationChoicesListParams {
+
+ return &VirtualizationChoicesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationChoicesListParamsWithTimeout creates a new VirtualizationChoicesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationChoicesListParamsWithTimeout(timeout time.Duration) *VirtualizationChoicesListParams {
+
+ return &VirtualizationChoicesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationChoicesListParamsWithContext creates a new VirtualizationChoicesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationChoicesListParamsWithContext(ctx context.Context) *VirtualizationChoicesListParams {
+
+ return &VirtualizationChoicesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationChoicesListParamsWithHTTPClient creates a new VirtualizationChoicesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationChoicesListParamsWithHTTPClient(client *http.Client) *VirtualizationChoicesListParams {
+
+ return &VirtualizationChoicesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationChoicesListParams contains all the parameters to send to the API endpoint
+for the virtualization choices list operation typically these are written to a http.Request
+*/
+type VirtualizationChoicesListParams struct {
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) WithTimeout(timeout time.Duration) *VirtualizationChoicesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) WithContext(ctx context.Context) *VirtualizationChoicesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) WithHTTPClient(client *http.Client) *VirtualizationChoicesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization choices list params
+func (o *VirtualizationChoicesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_responses.go
new file mode 100644
index 0000000..825915b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_list_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationChoicesListReader is a Reader for the VirtualizationChoicesList structure.
+type VirtualizationChoicesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationChoicesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationChoicesListOK creates a VirtualizationChoicesListOK with default headers values
+func NewVirtualizationChoicesListOK() *VirtualizationChoicesListOK {
+ return &VirtualizationChoicesListOK{}
+}
+
+/*VirtualizationChoicesListOK handles this case with default header values.
+
+VirtualizationChoicesListOK virtualization choices list o k
+*/
+type VirtualizationChoicesListOK struct {
+}
+
+func (o *VirtualizationChoicesListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/_choices/][%d] virtualizationChoicesListOK ", 200)
+}
+
+func (o *VirtualizationChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_parameters.go
new file mode 100644
index 0000000..5936d95
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_parameters.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationChoicesReadParams creates a new VirtualizationChoicesReadParams object
+// with the default values initialized.
+func NewVirtualizationChoicesReadParams() *VirtualizationChoicesReadParams {
+ var ()
+ return &VirtualizationChoicesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationChoicesReadParamsWithTimeout creates a new VirtualizationChoicesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationChoicesReadParamsWithTimeout(timeout time.Duration) *VirtualizationChoicesReadParams {
+ var ()
+ return &VirtualizationChoicesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationChoicesReadParamsWithContext creates a new VirtualizationChoicesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationChoicesReadParamsWithContext(ctx context.Context) *VirtualizationChoicesReadParams {
+ var ()
+ return &VirtualizationChoicesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationChoicesReadParamsWithHTTPClient creates a new VirtualizationChoicesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationChoicesReadParamsWithHTTPClient(client *http.Client) *VirtualizationChoicesReadParams {
+ var ()
+ return &VirtualizationChoicesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationChoicesReadParams contains all the parameters to send to the API endpoint
+for the virtualization choices read operation typically these are written to a http.Request
+*/
+type VirtualizationChoicesReadParams struct {
+
+ /*ID*/
+ ID string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) WithTimeout(timeout time.Duration) *VirtualizationChoicesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) WithContext(ctx context.Context) *VirtualizationChoicesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) WithHTTPClient(client *http.Client) *VirtualizationChoicesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) WithID(id string) *VirtualizationChoicesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization choices read params
+func (o *VirtualizationChoicesReadParams) SetID(id string) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", o.ID); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_responses.go
new file mode 100644
index 0000000..0b0e1c7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_choices_read_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationChoicesReadReader is a Reader for the VirtualizationChoicesRead structure.
+type VirtualizationChoicesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationChoicesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationChoicesReadOK creates a VirtualizationChoicesReadOK with default headers values
+func NewVirtualizationChoicesReadOK() *VirtualizationChoicesReadOK {
+ return &VirtualizationChoicesReadOK{}
+}
+
+/*VirtualizationChoicesReadOK handles this case with default header values.
+
+VirtualizationChoicesReadOK virtualization choices read o k
+*/
+type VirtualizationChoicesReadOK struct {
+}
+
+func (o *VirtualizationChoicesReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/_choices/{id}/][%d] virtualizationChoicesReadOK ", 200)
+}
+
+func (o *VirtualizationChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_client.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_client.go
new file mode 100644
index 0000000..b6368d4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_client.go
@@ -0,0 +1,972 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// New creates a new virtualization API client.
+func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
+ return &Client{transport: transport, formats: formats}
+}
+
+/*
+Client for virtualization API
+*/
+type Client struct {
+ transport runtime.ClientTransport
+ formats strfmt.Registry
+}
+
+/*
+VirtualizationChoicesList virtualization choices list API
+*/
+func (a *Client) VirtualizationChoicesList(params *VirtualizationChoicesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationChoicesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization__choices_list",
+ Method: "GET",
+ PathPattern: "/virtualization/_choices/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationChoicesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationChoicesListOK), nil
+
+}
+
+/*
+VirtualizationChoicesRead virtualization choices read API
+*/
+func (a *Client) VirtualizationChoicesRead(params *VirtualizationChoicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationChoicesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationChoicesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization__choices_read",
+ Method: "GET",
+ PathPattern: "/virtualization/_choices/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationChoicesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationChoicesReadOK), nil
+
+}
+
+/*
+VirtualizationClusterGroupsCreate virtualization cluster groups create API
+*/
+func (a *Client) VirtualizationClusterGroupsCreate(params *VirtualizationClusterGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_create",
+ Method: "POST",
+ PathPattern: "/virtualization/cluster-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsCreateCreated), nil
+
+}
+
+/*
+VirtualizationClusterGroupsDelete virtualization cluster groups delete API
+*/
+func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationClusterGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_delete",
+ Method: "DELETE",
+ PathPattern: "/virtualization/cluster-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsDeleteNoContent), nil
+
+}
+
+/*
+VirtualizationClusterGroupsList virtualization cluster groups list API
+*/
+func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_list",
+ Method: "GET",
+ PathPattern: "/virtualization/cluster-groups/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsListOK), nil
+
+}
+
+/*
+VirtualizationClusterGroupsPartialUpdate virtualization cluster groups partial update API
+*/
+func (a *Client) VirtualizationClusterGroupsPartialUpdate(params *VirtualizationClusterGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_partial_update",
+ Method: "PATCH",
+ PathPattern: "/virtualization/cluster-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsPartialUpdateOK), nil
+
+}
+
+/*
+VirtualizationClusterGroupsRead virtualization cluster groups read API
+*/
+func (a *Client) VirtualizationClusterGroupsRead(params *VirtualizationClusterGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_read",
+ Method: "GET",
+ PathPattern: "/virtualization/cluster-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsReadOK), nil
+
+}
+
+/*
+VirtualizationClusterGroupsUpdate virtualization cluster groups update API
+*/
+func (a *Client) VirtualizationClusterGroupsUpdate(params *VirtualizationClusterGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterGroupsUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterGroupsUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-groups_update",
+ Method: "PUT",
+ PathPattern: "/virtualization/cluster-groups/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterGroupsUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterGroupsUpdateOK), nil
+
+}
+
+/*
+VirtualizationClusterTypesCreate virtualization cluster types create API
+*/
+func (a *Client) VirtualizationClusterTypesCreate(params *VirtualizationClusterTypesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_create",
+ Method: "POST",
+ PathPattern: "/virtualization/cluster-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesCreateCreated), nil
+
+}
+
+/*
+VirtualizationClusterTypesDelete virtualization cluster types delete API
+*/
+func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_delete",
+ Method: "DELETE",
+ PathPattern: "/virtualization/cluster-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesDeleteNoContent), nil
+
+}
+
+/*
+VirtualizationClusterTypesList virtualization cluster types list API
+*/
+func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_list",
+ Method: "GET",
+ PathPattern: "/virtualization/cluster-types/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesListOK), nil
+
+}
+
+/*
+VirtualizationClusterTypesPartialUpdate virtualization cluster types partial update API
+*/
+func (a *Client) VirtualizationClusterTypesPartialUpdate(params *VirtualizationClusterTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_partial_update",
+ Method: "PATCH",
+ PathPattern: "/virtualization/cluster-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesPartialUpdateOK), nil
+
+}
+
+/*
+VirtualizationClusterTypesRead virtualization cluster types read API
+*/
+func (a *Client) VirtualizationClusterTypesRead(params *VirtualizationClusterTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_read",
+ Method: "GET",
+ PathPattern: "/virtualization/cluster-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesReadOK), nil
+
+}
+
+/*
+VirtualizationClusterTypesUpdate virtualization cluster types update API
+*/
+func (a *Client) VirtualizationClusterTypesUpdate(params *VirtualizationClusterTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClusterTypesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClusterTypesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_cluster-types_update",
+ Method: "PUT",
+ PathPattern: "/virtualization/cluster-types/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClusterTypesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClusterTypesUpdateOK), nil
+
+}
+
+/*
+VirtualizationClustersCreate virtualization clusters create API
+*/
+func (a *Client) VirtualizationClustersCreate(params *VirtualizationClustersCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_create",
+ Method: "POST",
+ PathPattern: "/virtualization/clusters/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersCreateCreated), nil
+
+}
+
+/*
+VirtualizationClustersDelete virtualization clusters delete API
+*/
+func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_delete",
+ Method: "DELETE",
+ PathPattern: "/virtualization/clusters/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersDeleteNoContent), nil
+
+}
+
+/*
+VirtualizationClustersList virtualization clusters list API
+*/
+func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_list",
+ Method: "GET",
+ PathPattern: "/virtualization/clusters/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersListOK), nil
+
+}
+
+/*
+VirtualizationClustersPartialUpdate virtualization clusters partial update API
+*/
+func (a *Client) VirtualizationClustersPartialUpdate(params *VirtualizationClustersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_partial_update",
+ Method: "PATCH",
+ PathPattern: "/virtualization/clusters/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersPartialUpdateOK), nil
+
+}
+
+/*
+VirtualizationClustersRead virtualization clusters read API
+*/
+func (a *Client) VirtualizationClustersRead(params *VirtualizationClustersReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_read",
+ Method: "GET",
+ PathPattern: "/virtualization/clusters/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersReadOK), nil
+
+}
+
+/*
+VirtualizationClustersUpdate virtualization clusters update API
+*/
+func (a *Client) VirtualizationClustersUpdate(params *VirtualizationClustersUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationClustersUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationClustersUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_clusters_update",
+ Method: "PUT",
+ PathPattern: "/virtualization/clusters/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationClustersUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationClustersUpdateOK), nil
+
+}
+
+/*
+VirtualizationInterfacesCreate virtualization interfaces create API
+*/
+func (a *Client) VirtualizationInterfacesCreate(params *VirtualizationInterfacesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_create",
+ Method: "POST",
+ PathPattern: "/virtualization/interfaces/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesCreateCreated), nil
+
+}
+
+/*
+VirtualizationInterfacesDelete virtualization interfaces delete API
+*/
+func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_delete",
+ Method: "DELETE",
+ PathPattern: "/virtualization/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesDeleteNoContent), nil
+
+}
+
+/*
+VirtualizationInterfacesList virtualization interfaces list API
+*/
+func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_list",
+ Method: "GET",
+ PathPattern: "/virtualization/interfaces/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesListOK), nil
+
+}
+
+/*
+VirtualizationInterfacesPartialUpdate virtualization interfaces partial update API
+*/
+func (a *Client) VirtualizationInterfacesPartialUpdate(params *VirtualizationInterfacesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_partial_update",
+ Method: "PATCH",
+ PathPattern: "/virtualization/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesPartialUpdateOK), nil
+
+}
+
+/*
+VirtualizationInterfacesRead virtualization interfaces read API
+*/
+func (a *Client) VirtualizationInterfacesRead(params *VirtualizationInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_read",
+ Method: "GET",
+ PathPattern: "/virtualization/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesReadOK), nil
+
+}
+
+/*
+VirtualizationInterfacesUpdate virtualization interfaces update API
+*/
+func (a *Client) VirtualizationInterfacesUpdate(params *VirtualizationInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationInterfacesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationInterfacesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_interfaces_update",
+ Method: "PUT",
+ PathPattern: "/virtualization/interfaces/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationInterfacesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationInterfacesUpdateOK), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesCreate virtualization virtual machines create API
+*/
+func (a *Client) VirtualizationVirtualMachinesCreate(params *VirtualizationVirtualMachinesCreateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesCreateCreated, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesCreateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_create",
+ Method: "POST",
+ PathPattern: "/virtualization/virtual-machines/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesCreateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesCreateCreated), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesDelete virtualization virtual machines delete API
+*/
+func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtualMachinesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesDeleteNoContent, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesDeleteParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_delete",
+ Method: "DELETE",
+ PathPattern: "/virtualization/virtual-machines/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesDeleteReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesDeleteNoContent), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesList virtualization virtual machines list API
+*/
+func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtualMachinesListParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesListOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesListParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_list",
+ Method: "GET",
+ PathPattern: "/virtualization/virtual-machines/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesListReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesListOK), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesPartialUpdate virtualization virtual machines partial update API
+*/
+func (a *Client) VirtualizationVirtualMachinesPartialUpdate(params *VirtualizationVirtualMachinesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesPartialUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesPartialUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_partial_update",
+ Method: "PATCH",
+ PathPattern: "/virtualization/virtual-machines/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesPartialUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesPartialUpdateOK), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesRead virtualization virtual machines read API
+*/
+func (a *Client) VirtualizationVirtualMachinesRead(params *VirtualizationVirtualMachinesReadParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesReadOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesReadParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_read",
+ Method: "GET",
+ PathPattern: "/virtualization/virtual-machines/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesReadReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesReadOK), nil
+
+}
+
+/*
+VirtualizationVirtualMachinesUpdate virtualization virtual machines update API
+*/
+func (a *Client) VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtualMachinesUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualizationVirtualMachinesUpdateOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewVirtualizationVirtualMachinesUpdateParams()
+ }
+
+ result, err := a.transport.Submit(&runtime.ClientOperation{
+ ID: "virtualization_virtual-machines_update",
+ Method: "PUT",
+ PathPattern: "/virtualization/virtual-machines/{id}/",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http"},
+ Params: params,
+ Reader: &VirtualizationVirtualMachinesUpdateReader{formats: a.formats},
+ AuthInfo: authInfo,
+ Context: params.Context,
+ Client: params.HTTPClient,
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.(*VirtualizationVirtualMachinesUpdateOK), nil
+
+}
+
+// SetTransport changes the transport on the client
+func (a *Client) SetTransport(transport runtime.ClientTransport) {
+ a.transport = transport
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go
new file mode 100644
index 0000000..a590acf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterGroupsCreateParams creates a new VirtualizationClusterGroupsCreateParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsCreateParams() *VirtualizationClusterGroupsCreateParams {
+ var ()
+ return &VirtualizationClusterGroupsCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsCreateParamsWithTimeout creates a new VirtualizationClusterGroupsCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsCreateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsCreateParams {
+ var ()
+ return &VirtualizationClusterGroupsCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsCreateParamsWithContext creates a new VirtualizationClusterGroupsCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsCreateParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsCreateParams {
+ var ()
+ return &VirtualizationClusterGroupsCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsCreateParamsWithHTTPClient creates a new VirtualizationClusterGroupsCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsCreateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsCreateParams {
+ var ()
+ return &VirtualizationClusterGroupsCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsCreateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups create operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsCreateParams struct {
+
+ /*Data*/
+ Data *models.ClusterGroup
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) WithData(data *models.ClusterGroup) *VirtualizationClusterGroupsCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster groups create params
+func (o *VirtualizationClusterGroupsCreateParams) SetData(data *models.ClusterGroup) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go
new file mode 100644
index 0000000..e524dfa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterGroupsCreateReader is a Reader for the VirtualizationClusterGroupsCreate structure.
+type VirtualizationClusterGroupsCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewVirtualizationClusterGroupsCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsCreateCreated creates a VirtualizationClusterGroupsCreateCreated with default headers values
+func NewVirtualizationClusterGroupsCreateCreated() *VirtualizationClusterGroupsCreateCreated {
+ return &VirtualizationClusterGroupsCreateCreated{}
+}
+
+/*VirtualizationClusterGroupsCreateCreated handles this case with default header values.
+
+VirtualizationClusterGroupsCreateCreated virtualization cluster groups create created
+*/
+type VirtualizationClusterGroupsCreateCreated struct {
+ Payload *models.ClusterGroup
+}
+
+func (o *VirtualizationClusterGroupsCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /virtualization/cluster-groups/][%d] virtualizationClusterGroupsCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *VirtualizationClusterGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go
new file mode 100644
index 0000000..6650a4b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterGroupsDeleteParams creates a new VirtualizationClusterGroupsDeleteParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsDeleteParams() *VirtualizationClusterGroupsDeleteParams {
+ var ()
+ return &VirtualizationClusterGroupsDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsDeleteParamsWithTimeout creates a new VirtualizationClusterGroupsDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsDeleteParams {
+ var ()
+ return &VirtualizationClusterGroupsDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsDeleteParamsWithContext creates a new VirtualizationClusterGroupsDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsDeleteParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsDeleteParams {
+ var ()
+ return &VirtualizationClusterGroupsDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsDeleteParamsWithHTTPClient creates a new VirtualizationClusterGroupsDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsDeleteParams {
+ var ()
+ return &VirtualizationClusterGroupsDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsDeleteParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups delete operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) WithID(id int64) *VirtualizationClusterGroupsDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster groups delete params
+func (o *VirtualizationClusterGroupsDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go
new file mode 100644
index 0000000..f692975
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationClusterGroupsDeleteReader is a Reader for the VirtualizationClusterGroupsDelete structure.
+type VirtualizationClusterGroupsDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewVirtualizationClusterGroupsDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsDeleteNoContent creates a VirtualizationClusterGroupsDeleteNoContent with default headers values
+func NewVirtualizationClusterGroupsDeleteNoContent() *VirtualizationClusterGroupsDeleteNoContent {
+ return &VirtualizationClusterGroupsDeleteNoContent{}
+}
+
+/*VirtualizationClusterGroupsDeleteNoContent handles this case with default header values.
+
+VirtualizationClusterGroupsDeleteNoContent virtualization cluster groups delete no content
+*/
+type VirtualizationClusterGroupsDeleteNoContent struct {
+}
+
+func (o *VirtualizationClusterGroupsDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsDeleteNoContent ", 204)
+}
+
+func (o *VirtualizationClusterGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go
new file mode 100644
index 0000000..69ec092
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterGroupsListParams creates a new VirtualizationClusterGroupsListParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsListParams() *VirtualizationClusterGroupsListParams {
+ var ()
+ return &VirtualizationClusterGroupsListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsListParamsWithTimeout creates a new VirtualizationClusterGroupsListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsListParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsListParams {
+ var ()
+ return &VirtualizationClusterGroupsListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsListParamsWithContext creates a new VirtualizationClusterGroupsListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsListParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsListParams {
+ var ()
+ return &VirtualizationClusterGroupsListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsListParamsWithHTTPClient creates a new VirtualizationClusterGroupsListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsListParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsListParams {
+ var ()
+ return &VirtualizationClusterGroupsListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsListParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups list operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithLimit(limit *int64) *VirtualizationClusterGroupsListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithName(name *string) *VirtualizationClusterGroupsListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithOffset(offset *int64) *VirtualizationClusterGroupsListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) WithSlug(slug *string) *VirtualizationClusterGroupsListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the virtualization cluster groups list params
+func (o *VirtualizationClusterGroupsListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go
new file mode 100644
index 0000000..d024019
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterGroupsListReader is a Reader for the VirtualizationClusterGroupsList structure.
+type VirtualizationClusterGroupsListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterGroupsListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsListOK creates a VirtualizationClusterGroupsListOK with default headers values
+func NewVirtualizationClusterGroupsListOK() *VirtualizationClusterGroupsListOK {
+ return &VirtualizationClusterGroupsListOK{}
+}
+
+/*VirtualizationClusterGroupsListOK handles this case with default header values.
+
+VirtualizationClusterGroupsListOK virtualization cluster groups list o k
+*/
+type VirtualizationClusterGroupsListOK struct {
+ Payload *models.VirtualizationClusterGroupsListOKBody
+}
+
+func (o *VirtualizationClusterGroupsListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/cluster-groups/][%d] virtualizationClusterGroupsListOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualizationClusterGroupsListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go
new file mode 100644
index 0000000..7f83baa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterGroupsPartialUpdateParams creates a new VirtualizationClusterGroupsPartialUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsPartialUpdateParams() *VirtualizationClusterGroupsPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsPartialUpdateParamsWithTimeout creates a new VirtualizationClusterGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsPartialUpdateParamsWithContext creates a new VirtualizationClusterGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsPartialUpdateParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsPartialUpdateParamsWithHTTPClient creates a new VirtualizationClusterGroupsPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsPartialUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups partial update operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.ClusterGroup
+ /*ID
+ A unique integer value identifying this cluster group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WithData(data *models.ClusterGroup) *VirtualizationClusterGroupsPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) SetData(data *models.ClusterGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WithID(id int64) *VirtualizationClusterGroupsPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster groups partial update params
+func (o *VirtualizationClusterGroupsPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go
new file mode 100644
index 0000000..4056d75
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterGroupsPartialUpdateReader is a Reader for the VirtualizationClusterGroupsPartialUpdate structure.
+type VirtualizationClusterGroupsPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterGroupsPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsPartialUpdateOK creates a VirtualizationClusterGroupsPartialUpdateOK with default headers values
+func NewVirtualizationClusterGroupsPartialUpdateOK() *VirtualizationClusterGroupsPartialUpdateOK {
+ return &VirtualizationClusterGroupsPartialUpdateOK{}
+}
+
+/*VirtualizationClusterGroupsPartialUpdateOK handles this case with default header values.
+
+VirtualizationClusterGroupsPartialUpdateOK virtualization cluster groups partial update o k
+*/
+type VirtualizationClusterGroupsPartialUpdateOK struct {
+ Payload *models.ClusterGroup
+}
+
+func (o *VirtualizationClusterGroupsPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go
new file mode 100644
index 0000000..d6e2cf8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterGroupsReadParams creates a new VirtualizationClusterGroupsReadParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsReadParams() *VirtualizationClusterGroupsReadParams {
+ var ()
+ return &VirtualizationClusterGroupsReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsReadParamsWithTimeout creates a new VirtualizationClusterGroupsReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsReadParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsReadParams {
+ var ()
+ return &VirtualizationClusterGroupsReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsReadParamsWithContext creates a new VirtualizationClusterGroupsReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsReadParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsReadParams {
+ var ()
+ return &VirtualizationClusterGroupsReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsReadParamsWithHTTPClient creates a new VirtualizationClusterGroupsReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsReadParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsReadParams {
+ var ()
+ return &VirtualizationClusterGroupsReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsReadParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups read operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsReadParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) WithID(id int64) *VirtualizationClusterGroupsReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster groups read params
+func (o *VirtualizationClusterGroupsReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go
new file mode 100644
index 0000000..db0c616
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterGroupsReadReader is a Reader for the VirtualizationClusterGroupsRead structure.
+type VirtualizationClusterGroupsReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterGroupsReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsReadOK creates a VirtualizationClusterGroupsReadOK with default headers values
+func NewVirtualizationClusterGroupsReadOK() *VirtualizationClusterGroupsReadOK {
+ return &VirtualizationClusterGroupsReadOK{}
+}
+
+/*VirtualizationClusterGroupsReadOK handles this case with default header values.
+
+VirtualizationClusterGroupsReadOK virtualization cluster groups read o k
+*/
+type VirtualizationClusterGroupsReadOK struct {
+ Payload *models.ClusterGroup
+}
+
+func (o *VirtualizationClusterGroupsReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsReadOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go
new file mode 100644
index 0000000..607ac97
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterGroupsUpdateParams creates a new VirtualizationClusterGroupsUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClusterGroupsUpdateParams() *VirtualizationClusterGroupsUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsUpdateParamsWithTimeout creates a new VirtualizationClusterGroupsUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterGroupsUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterGroupsUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterGroupsUpdateParamsWithContext creates a new VirtualizationClusterGroupsUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterGroupsUpdateParamsWithContext(ctx context.Context) *VirtualizationClusterGroupsUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterGroupsUpdateParamsWithHTTPClient creates a new VirtualizationClusterGroupsUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterGroupsUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterGroupsUpdateParams {
+ var ()
+ return &VirtualizationClusterGroupsUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterGroupsUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster groups update operation typically these are written to a http.Request
+*/
+type VirtualizationClusterGroupsUpdateParams struct {
+
+ /*Data*/
+ Data *models.ClusterGroup
+ /*ID
+ A unique integer value identifying this cluster group.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterGroupsUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) WithContext(ctx context.Context) *VirtualizationClusterGroupsUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterGroupsUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) WithData(data *models.ClusterGroup) *VirtualizationClusterGroupsUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) SetData(data *models.ClusterGroup) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) WithID(id int64) *VirtualizationClusterGroupsUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster groups update params
+func (o *VirtualizationClusterGroupsUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go
new file mode 100644
index 0000000..d520331
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_groups_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterGroupsUpdateReader is a Reader for the VirtualizationClusterGroupsUpdate structure.
+type VirtualizationClusterGroupsUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterGroupsUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterGroupsUpdateOK creates a VirtualizationClusterGroupsUpdateOK with default headers values
+func NewVirtualizationClusterGroupsUpdateOK() *VirtualizationClusterGroupsUpdateOK {
+ return &VirtualizationClusterGroupsUpdateOK{}
+}
+
+/*VirtualizationClusterGroupsUpdateOK handles this case with default header values.
+
+VirtualizationClusterGroupsUpdateOK virtualization cluster groups update o k
+*/
+type VirtualizationClusterGroupsUpdateOK struct {
+ Payload *models.ClusterGroup
+}
+
+func (o *VirtualizationClusterGroupsUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /virtualization/cluster-groups/{id}/][%d] virtualizationClusterGroupsUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterGroup)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go
new file mode 100644
index 0000000..e235ea5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterTypesCreateParams creates a new VirtualizationClusterTypesCreateParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesCreateParams() *VirtualizationClusterTypesCreateParams {
+ var ()
+ return &VirtualizationClusterTypesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesCreateParamsWithTimeout creates a new VirtualizationClusterTypesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesCreateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesCreateParams {
+ var ()
+ return &VirtualizationClusterTypesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesCreateParamsWithContext creates a new VirtualizationClusterTypesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesCreateParamsWithContext(ctx context.Context) *VirtualizationClusterTypesCreateParams {
+ var ()
+ return &VirtualizationClusterTypesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesCreateParamsWithHTTPClient creates a new VirtualizationClusterTypesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesCreateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesCreateParams {
+ var ()
+ return &VirtualizationClusterTypesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesCreateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types create operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesCreateParams struct {
+
+ /*Data*/
+ Data *models.ClusterType
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) WithContext(ctx context.Context) *VirtualizationClusterTypesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) WithData(data *models.ClusterType) *VirtualizationClusterTypesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster types create params
+func (o *VirtualizationClusterTypesCreateParams) SetData(data *models.ClusterType) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_responses.go
new file mode 100644
index 0000000..0993ab1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterTypesCreateReader is a Reader for the VirtualizationClusterTypesCreate structure.
+type VirtualizationClusterTypesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewVirtualizationClusterTypesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesCreateCreated creates a VirtualizationClusterTypesCreateCreated with default headers values
+func NewVirtualizationClusterTypesCreateCreated() *VirtualizationClusterTypesCreateCreated {
+ return &VirtualizationClusterTypesCreateCreated{}
+}
+
+/*VirtualizationClusterTypesCreateCreated handles this case with default header values.
+
+VirtualizationClusterTypesCreateCreated virtualization cluster types create created
+*/
+type VirtualizationClusterTypesCreateCreated struct {
+ Payload *models.ClusterType
+}
+
+func (o *VirtualizationClusterTypesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /virtualization/cluster-types/][%d] virtualizationClusterTypesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *VirtualizationClusterTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go
new file mode 100644
index 0000000..1f25901
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterTypesDeleteParams creates a new VirtualizationClusterTypesDeleteParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesDeleteParams() *VirtualizationClusterTypesDeleteParams {
+ var ()
+ return &VirtualizationClusterTypesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesDeleteParamsWithTimeout creates a new VirtualizationClusterTypesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesDeleteParams {
+ var ()
+ return &VirtualizationClusterTypesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesDeleteParamsWithContext creates a new VirtualizationClusterTypesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesDeleteParamsWithContext(ctx context.Context) *VirtualizationClusterTypesDeleteParams {
+ var ()
+ return &VirtualizationClusterTypesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesDeleteParamsWithHTTPClient creates a new VirtualizationClusterTypesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesDeleteParams {
+ var ()
+ return &VirtualizationClusterTypesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesDeleteParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types delete operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) WithContext(ctx context.Context) *VirtualizationClusterTypesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) WithID(id int64) *VirtualizationClusterTypesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster types delete params
+func (o *VirtualizationClusterTypesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go
new file mode 100644
index 0000000..521bbdc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationClusterTypesDeleteReader is a Reader for the VirtualizationClusterTypesDelete structure.
+type VirtualizationClusterTypesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewVirtualizationClusterTypesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesDeleteNoContent creates a VirtualizationClusterTypesDeleteNoContent with default headers values
+func NewVirtualizationClusterTypesDeleteNoContent() *VirtualizationClusterTypesDeleteNoContent {
+ return &VirtualizationClusterTypesDeleteNoContent{}
+}
+
+/*VirtualizationClusterTypesDeleteNoContent handles this case with default header values.
+
+VirtualizationClusterTypesDeleteNoContent virtualization cluster types delete no content
+*/
+type VirtualizationClusterTypesDeleteNoContent struct {
+}
+
+func (o *VirtualizationClusterTypesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesDeleteNoContent ", 204)
+}
+
+func (o *VirtualizationClusterTypesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go
new file mode 100644
index 0000000..cf4d454
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go
@@ -0,0 +1,253 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterTypesListParams creates a new VirtualizationClusterTypesListParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesListParams() *VirtualizationClusterTypesListParams {
+ var ()
+ return &VirtualizationClusterTypesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesListParamsWithTimeout creates a new VirtualizationClusterTypesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesListParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesListParams {
+ var ()
+ return &VirtualizationClusterTypesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesListParamsWithContext creates a new VirtualizationClusterTypesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesListParamsWithContext(ctx context.Context) *VirtualizationClusterTypesListParams {
+ var ()
+ return &VirtualizationClusterTypesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesListParamsWithHTTPClient creates a new VirtualizationClusterTypesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesListParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesListParams {
+ var ()
+ return &VirtualizationClusterTypesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesListParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types list operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesListParams struct {
+
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Slug*/
+ Slug *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithContext(ctx context.Context) *VirtualizationClusterTypesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithLimit adds the limit to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithLimit(limit *int64) *VirtualizationClusterTypesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithName(name *string) *VirtualizationClusterTypesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithOffset(offset *int64) *VirtualizationClusterTypesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithSlug adds the slug to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) WithSlug(slug *string) *VirtualizationClusterTypesListParams {
+ o.SetSlug(slug)
+ return o
+}
+
+// SetSlug adds the slug to the virtualization cluster types list params
+func (o *VirtualizationClusterTypesListParams) SetSlug(slug *string) {
+ o.Slug = slug
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Slug != nil {
+
+ // query param slug
+ var qrSlug string
+ if o.Slug != nil {
+ qrSlug = *o.Slug
+ }
+ qSlug := qrSlug
+ if qSlug != "" {
+ if err := r.SetQueryParam("slug", qSlug); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_responses.go
new file mode 100644
index 0000000..71e1448
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterTypesListReader is a Reader for the VirtualizationClusterTypesList structure.
+type VirtualizationClusterTypesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterTypesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesListOK creates a VirtualizationClusterTypesListOK with default headers values
+func NewVirtualizationClusterTypesListOK() *VirtualizationClusterTypesListOK {
+ return &VirtualizationClusterTypesListOK{}
+}
+
+/*VirtualizationClusterTypesListOK handles this case with default header values.
+
+VirtualizationClusterTypesListOK virtualization cluster types list o k
+*/
+type VirtualizationClusterTypesListOK struct {
+ Payload *models.VirtualizationClusterTypesListOKBody
+}
+
+func (o *VirtualizationClusterTypesListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/cluster-types/][%d] virtualizationClusterTypesListOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualizationClusterTypesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go
new file mode 100644
index 0000000..5ed9188
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterTypesPartialUpdateParams creates a new VirtualizationClusterTypesPartialUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesPartialUpdateParams() *VirtualizationClusterTypesPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesPartialUpdateParamsWithTimeout creates a new VirtualizationClusterTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesPartialUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesPartialUpdateParamsWithContext creates a new VirtualizationClusterTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesPartialUpdateParamsWithContext(ctx context.Context) *VirtualizationClusterTypesPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesPartialUpdateParamsWithHTTPClient creates a new VirtualizationClusterTypesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesPartialUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesPartialUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types partial update operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.ClusterType
+ /*ID
+ A unique integer value identifying this cluster type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) WithContext(ctx context.Context) *VirtualizationClusterTypesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) WithData(data *models.ClusterType) *VirtualizationClusterTypesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) SetData(data *models.ClusterType) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) WithID(id int64) *VirtualizationClusterTypesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster types partial update params
+func (o *VirtualizationClusterTypesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go
new file mode 100644
index 0000000..433095b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterTypesPartialUpdateReader is a Reader for the VirtualizationClusterTypesPartialUpdate structure.
+type VirtualizationClusterTypesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterTypesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesPartialUpdateOK creates a VirtualizationClusterTypesPartialUpdateOK with default headers values
+func NewVirtualizationClusterTypesPartialUpdateOK() *VirtualizationClusterTypesPartialUpdateOK {
+ return &VirtualizationClusterTypesPartialUpdateOK{}
+}
+
+/*VirtualizationClusterTypesPartialUpdateOK handles this case with default header values.
+
+VirtualizationClusterTypesPartialUpdateOK virtualization cluster types partial update o k
+*/
+type VirtualizationClusterTypesPartialUpdateOK struct {
+ Payload *models.ClusterType
+}
+
+func (o *VirtualizationClusterTypesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go
new file mode 100644
index 0000000..e8813a7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClusterTypesReadParams creates a new VirtualizationClusterTypesReadParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesReadParams() *VirtualizationClusterTypesReadParams {
+ var ()
+ return &VirtualizationClusterTypesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesReadParamsWithTimeout creates a new VirtualizationClusterTypesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesReadParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesReadParams {
+ var ()
+ return &VirtualizationClusterTypesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesReadParamsWithContext creates a new VirtualizationClusterTypesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesReadParamsWithContext(ctx context.Context) *VirtualizationClusterTypesReadParams {
+ var ()
+ return &VirtualizationClusterTypesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesReadParamsWithHTTPClient creates a new VirtualizationClusterTypesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesReadParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesReadParams {
+ var ()
+ return &VirtualizationClusterTypesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesReadParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types read operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) WithContext(ctx context.Context) *VirtualizationClusterTypesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) WithID(id int64) *VirtualizationClusterTypesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster types read params
+func (o *VirtualizationClusterTypesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_responses.go
new file mode 100644
index 0000000..0b76a2a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterTypesReadReader is a Reader for the VirtualizationClusterTypesRead structure.
+type VirtualizationClusterTypesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterTypesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesReadOK creates a VirtualizationClusterTypesReadOK with default headers values
+func NewVirtualizationClusterTypesReadOK() *VirtualizationClusterTypesReadOK {
+ return &VirtualizationClusterTypesReadOK{}
+}
+
+/*VirtualizationClusterTypesReadOK handles this case with default header values.
+
+VirtualizationClusterTypesReadOK virtualization cluster types read o k
+*/
+type VirtualizationClusterTypesReadOK struct {
+ Payload *models.ClusterType
+}
+
+func (o *VirtualizationClusterTypesReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesReadOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go
new file mode 100644
index 0000000..3c610e4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClusterTypesUpdateParams creates a new VirtualizationClusterTypesUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClusterTypesUpdateParams() *VirtualizationClusterTypesUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClusterTypesUpdateParamsWithTimeout creates a new VirtualizationClusterTypesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClusterTypesUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClusterTypesUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClusterTypesUpdateParamsWithContext creates a new VirtualizationClusterTypesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClusterTypesUpdateParamsWithContext(ctx context.Context) *VirtualizationClusterTypesUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClusterTypesUpdateParamsWithHTTPClient creates a new VirtualizationClusterTypesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClusterTypesUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClusterTypesUpdateParams {
+ var ()
+ return &VirtualizationClusterTypesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClusterTypesUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization cluster types update operation typically these are written to a http.Request
+*/
+type VirtualizationClusterTypesUpdateParams struct {
+
+ /*Data*/
+ Data *models.ClusterType
+ /*ID
+ A unique integer value identifying this cluster type.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClusterTypesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) WithContext(ctx context.Context) *VirtualizationClusterTypesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClusterTypesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) WithData(data *models.ClusterType) *VirtualizationClusterTypesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) SetData(data *models.ClusterType) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) WithID(id int64) *VirtualizationClusterTypesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization cluster types update params
+func (o *VirtualizationClusterTypesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClusterTypesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_responses.go
new file mode 100644
index 0000000..30ec8b2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_cluster_types_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClusterTypesUpdateReader is a Reader for the VirtualizationClusterTypesUpdate structure.
+type VirtualizationClusterTypesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClusterTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClusterTypesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClusterTypesUpdateOK creates a VirtualizationClusterTypesUpdateOK with default headers values
+func NewVirtualizationClusterTypesUpdateOK() *VirtualizationClusterTypesUpdateOK {
+ return &VirtualizationClusterTypesUpdateOK{}
+}
+
+/*VirtualizationClusterTypesUpdateOK handles this case with default header values.
+
+VirtualizationClusterTypesUpdateOK virtualization cluster types update o k
+*/
+type VirtualizationClusterTypesUpdateOK struct {
+ Payload *models.ClusterType
+}
+
+func (o *VirtualizationClusterTypesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /virtualization/cluster-types/{id}/][%d] virtualizationClusterTypesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClusterTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.ClusterType)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_parameters.go
new file mode 100644
index 0000000..4bada44
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClustersCreateParams creates a new VirtualizationClustersCreateParams object
+// with the default values initialized.
+func NewVirtualizationClustersCreateParams() *VirtualizationClustersCreateParams {
+ var ()
+ return &VirtualizationClustersCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersCreateParamsWithTimeout creates a new VirtualizationClustersCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersCreateParamsWithTimeout(timeout time.Duration) *VirtualizationClustersCreateParams {
+ var ()
+ return &VirtualizationClustersCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersCreateParamsWithContext creates a new VirtualizationClustersCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersCreateParamsWithContext(ctx context.Context) *VirtualizationClustersCreateParams {
+ var ()
+ return &VirtualizationClustersCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersCreateParamsWithHTTPClient creates a new VirtualizationClustersCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersCreateParamsWithHTTPClient(client *http.Client) *VirtualizationClustersCreateParams {
+ var ()
+ return &VirtualizationClustersCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersCreateParams contains all the parameters to send to the API endpoint
+for the virtualization clusters create operation typically these are written to a http.Request
+*/
+type VirtualizationClustersCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableCluster
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) WithTimeout(timeout time.Duration) *VirtualizationClustersCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) WithContext(ctx context.Context) *VirtualizationClustersCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) WithHTTPClient(client *http.Client) *VirtualizationClustersCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) WithData(data *models.WritableCluster) *VirtualizationClustersCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization clusters create params
+func (o *VirtualizationClustersCreateParams) SetData(data *models.WritableCluster) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_responses.go
new file mode 100644
index 0000000..c53ceac
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClustersCreateReader is a Reader for the VirtualizationClustersCreate structure.
+type VirtualizationClustersCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewVirtualizationClustersCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersCreateCreated creates a VirtualizationClustersCreateCreated with default headers values
+func NewVirtualizationClustersCreateCreated() *VirtualizationClustersCreateCreated {
+ return &VirtualizationClustersCreateCreated{}
+}
+
+/*VirtualizationClustersCreateCreated handles this case with default header values.
+
+VirtualizationClustersCreateCreated virtualization clusters create created
+*/
+type VirtualizationClustersCreateCreated struct {
+ Payload *models.WritableCluster
+}
+
+func (o *VirtualizationClustersCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /virtualization/clusters/][%d] virtualizationClustersCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *VirtualizationClustersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCluster)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_parameters.go
new file mode 100644
index 0000000..50dac18
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClustersDeleteParams creates a new VirtualizationClustersDeleteParams object
+// with the default values initialized.
+func NewVirtualizationClustersDeleteParams() *VirtualizationClustersDeleteParams {
+ var ()
+ return &VirtualizationClustersDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersDeleteParamsWithTimeout creates a new VirtualizationClustersDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationClustersDeleteParams {
+ var ()
+ return &VirtualizationClustersDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersDeleteParamsWithContext creates a new VirtualizationClustersDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersDeleteParamsWithContext(ctx context.Context) *VirtualizationClustersDeleteParams {
+ var ()
+ return &VirtualizationClustersDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersDeleteParamsWithHTTPClient creates a new VirtualizationClustersDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationClustersDeleteParams {
+ var ()
+ return &VirtualizationClustersDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersDeleteParams contains all the parameters to send to the API endpoint
+for the virtualization clusters delete operation typically these are written to a http.Request
+*/
+type VirtualizationClustersDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationClustersDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) WithContext(ctx context.Context) *VirtualizationClustersDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationClustersDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) WithID(id int64) *VirtualizationClustersDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization clusters delete params
+func (o *VirtualizationClustersDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_responses.go
new file mode 100644
index 0000000..1725e2e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationClustersDeleteReader is a Reader for the VirtualizationClustersDelete structure.
+type VirtualizationClustersDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewVirtualizationClustersDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersDeleteNoContent creates a VirtualizationClustersDeleteNoContent with default headers values
+func NewVirtualizationClustersDeleteNoContent() *VirtualizationClustersDeleteNoContent {
+ return &VirtualizationClustersDeleteNoContent{}
+}
+
+/*VirtualizationClustersDeleteNoContent handles this case with default header values.
+
+VirtualizationClustersDeleteNoContent virtualization clusters delete no content
+*/
+type VirtualizationClustersDeleteNoContent struct {
+}
+
+func (o *VirtualizationClustersDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /virtualization/clusters/{id}/][%d] virtualizationClustersDeleteNoContent ", 204)
+}
+
+func (o *VirtualizationClustersDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_parameters.go
new file mode 100644
index 0000000..c1fd970
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_parameters.go
@@ -0,0 +1,459 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClustersListParams creates a new VirtualizationClustersListParams object
+// with the default values initialized.
+func NewVirtualizationClustersListParams() *VirtualizationClustersListParams {
+ var ()
+ return &VirtualizationClustersListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersListParamsWithTimeout creates a new VirtualizationClustersListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersListParamsWithTimeout(timeout time.Duration) *VirtualizationClustersListParams {
+ var ()
+ return &VirtualizationClustersListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersListParamsWithContext creates a new VirtualizationClustersListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersListParamsWithContext(ctx context.Context) *VirtualizationClustersListParams {
+ var ()
+ return &VirtualizationClustersListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersListParamsWithHTTPClient creates a new VirtualizationClustersListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersListParamsWithHTTPClient(client *http.Client) *VirtualizationClustersListParams {
+ var ()
+ return &VirtualizationClustersListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersListParams contains all the parameters to send to the API endpoint
+for the virtualization clusters list operation typically these are written to a http.Request
+*/
+type VirtualizationClustersListParams struct {
+
+ /*Group*/
+ Group *string
+ /*GroupID*/
+ GroupID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Q*/
+ Q *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Type*/
+ Type *string
+ /*TypeID*/
+ TypeID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithTimeout(timeout time.Duration) *VirtualizationClustersListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithContext(ctx context.Context) *VirtualizationClustersListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithHTTPClient(client *http.Client) *VirtualizationClustersListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithGroup adds the group to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithGroup(group *string) *VirtualizationClustersListParams {
+ o.SetGroup(group)
+ return o
+}
+
+// SetGroup adds the group to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetGroup(group *string) {
+ o.Group = group
+}
+
+// WithGroupID adds the groupID to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithGroupID(groupID *string) *VirtualizationClustersListParams {
+ o.SetGroupID(groupID)
+ return o
+}
+
+// SetGroupID adds the groupId to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetGroupID(groupID *string) {
+ o.GroupID = groupID
+}
+
+// WithIDIn adds the iDIn to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithIDIn(iDIn *string) *VirtualizationClustersListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithLimit(limit *int64) *VirtualizationClustersListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithName(name *string) *VirtualizationClustersListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithOffset(offset *int64) *VirtualizationClustersListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithQ adds the q to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithQ(q *string) *VirtualizationClustersListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithSite adds the site to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithSite(site *string) *VirtualizationClustersListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithSiteID(siteID *string) *VirtualizationClustersListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithType adds the typeVar to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithType(typeVar *string) *VirtualizationClustersListParams {
+ o.SetType(typeVar)
+ return o
+}
+
+// SetType adds the type to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetType(typeVar *string) {
+ o.Type = typeVar
+}
+
+// WithTypeID adds the typeID to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) WithTypeID(typeID *string) *VirtualizationClustersListParams {
+ o.SetTypeID(typeID)
+ return o
+}
+
+// SetTypeID adds the typeId to the virtualization clusters list params
+func (o *VirtualizationClustersListParams) SetTypeID(typeID *string) {
+ o.TypeID = typeID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Group != nil {
+
+ // query param group
+ var qrGroup string
+ if o.Group != nil {
+ qrGroup = *o.Group
+ }
+ qGroup := qrGroup
+ if qGroup != "" {
+ if err := r.SetQueryParam("group", qGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.GroupID != nil {
+
+ // query param group_id
+ var qrGroupID string
+ if o.GroupID != nil {
+ qrGroupID = *o.GroupID
+ }
+ qGroupID := qrGroupID
+ if qGroupID != "" {
+ if err := r.SetQueryParam("group_id", qGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Type != nil {
+
+ // query param type
+ var qrType string
+ if o.Type != nil {
+ qrType = *o.Type
+ }
+ qType := qrType
+ if qType != "" {
+ if err := r.SetQueryParam("type", qType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TypeID != nil {
+
+ // query param type_id
+ var qrTypeID string
+ if o.TypeID != nil {
+ qrTypeID = *o.TypeID
+ }
+ qTypeID := qrTypeID
+ if qTypeID != "" {
+ if err := r.SetQueryParam("type_id", qTypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_responses.go
new file mode 100644
index 0000000..c61053f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClustersListReader is a Reader for the VirtualizationClustersList structure.
+type VirtualizationClustersListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClustersListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersListOK creates a VirtualizationClustersListOK with default headers values
+func NewVirtualizationClustersListOK() *VirtualizationClustersListOK {
+ return &VirtualizationClustersListOK{}
+}
+
+/*VirtualizationClustersListOK handles this case with default header values.
+
+VirtualizationClustersListOK virtualization clusters list o k
+*/
+type VirtualizationClustersListOK struct {
+ Payload *models.VirtualizationClustersListOKBody
+}
+
+func (o *VirtualizationClustersListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/clusters/][%d] virtualizationClustersListOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClustersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualizationClustersListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go
new file mode 100644
index 0000000..1d9a3a8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClustersPartialUpdateParams creates a new VirtualizationClustersPartialUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClustersPartialUpdateParams() *VirtualizationClustersPartialUpdateParams {
+ var ()
+ return &VirtualizationClustersPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersPartialUpdateParamsWithTimeout creates a new VirtualizationClustersPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersPartialUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClustersPartialUpdateParams {
+ var ()
+ return &VirtualizationClustersPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersPartialUpdateParamsWithContext creates a new VirtualizationClustersPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersPartialUpdateParamsWithContext(ctx context.Context) *VirtualizationClustersPartialUpdateParams {
+ var ()
+ return &VirtualizationClustersPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersPartialUpdateParamsWithHTTPClient creates a new VirtualizationClustersPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersPartialUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClustersPartialUpdateParams {
+ var ()
+ return &VirtualizationClustersPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersPartialUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization clusters partial update operation typically these are written to a http.Request
+*/
+type VirtualizationClustersPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCluster
+ /*ID
+ A unique integer value identifying this cluster.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClustersPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) WithContext(ctx context.Context) *VirtualizationClustersPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClustersPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) WithData(data *models.WritableCluster) *VirtualizationClustersPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) SetData(data *models.WritableCluster) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) WithID(id int64) *VirtualizationClustersPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization clusters partial update params
+func (o *VirtualizationClustersPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go
new file mode 100644
index 0000000..8539f28
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClustersPartialUpdateReader is a Reader for the VirtualizationClustersPartialUpdate structure.
+type VirtualizationClustersPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClustersPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersPartialUpdateOK creates a VirtualizationClustersPartialUpdateOK with default headers values
+func NewVirtualizationClustersPartialUpdateOK() *VirtualizationClustersPartialUpdateOK {
+ return &VirtualizationClustersPartialUpdateOK{}
+}
+
+/*VirtualizationClustersPartialUpdateOK handles this case with default header values.
+
+VirtualizationClustersPartialUpdateOK virtualization clusters partial update o k
+*/
+type VirtualizationClustersPartialUpdateOK struct {
+ Payload *models.WritableCluster
+}
+
+func (o *VirtualizationClustersPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /virtualization/clusters/{id}/][%d] virtualizationClustersPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClustersPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCluster)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_parameters.go
new file mode 100644
index 0000000..65f3a01
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationClustersReadParams creates a new VirtualizationClustersReadParams object
+// with the default values initialized.
+func NewVirtualizationClustersReadParams() *VirtualizationClustersReadParams {
+ var ()
+ return &VirtualizationClustersReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersReadParamsWithTimeout creates a new VirtualizationClustersReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersReadParamsWithTimeout(timeout time.Duration) *VirtualizationClustersReadParams {
+ var ()
+ return &VirtualizationClustersReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersReadParamsWithContext creates a new VirtualizationClustersReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersReadParamsWithContext(ctx context.Context) *VirtualizationClustersReadParams {
+ var ()
+ return &VirtualizationClustersReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersReadParamsWithHTTPClient creates a new VirtualizationClustersReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersReadParamsWithHTTPClient(client *http.Client) *VirtualizationClustersReadParams {
+ var ()
+ return &VirtualizationClustersReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersReadParams contains all the parameters to send to the API endpoint
+for the virtualization clusters read operation typically these are written to a http.Request
+*/
+type VirtualizationClustersReadParams struct {
+
+ /*ID
+ A unique integer value identifying this cluster.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) WithTimeout(timeout time.Duration) *VirtualizationClustersReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) WithContext(ctx context.Context) *VirtualizationClustersReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) WithHTTPClient(client *http.Client) *VirtualizationClustersReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) WithID(id int64) *VirtualizationClustersReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization clusters read params
+func (o *VirtualizationClustersReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_responses.go
new file mode 100644
index 0000000..b309b87
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClustersReadReader is a Reader for the VirtualizationClustersRead structure.
+type VirtualizationClustersReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClustersReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersReadOK creates a VirtualizationClustersReadOK with default headers values
+func NewVirtualizationClustersReadOK() *VirtualizationClustersReadOK {
+ return &VirtualizationClustersReadOK{}
+}
+
+/*VirtualizationClustersReadOK handles this case with default header values.
+
+VirtualizationClustersReadOK virtualization clusters read o k
+*/
+type VirtualizationClustersReadOK struct {
+ Payload *models.Cluster
+}
+
+func (o *VirtualizationClustersReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/clusters/{id}/][%d] virtualizationClustersReadOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClustersReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Cluster)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_parameters.go
new file mode 100644
index 0000000..484c4bd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationClustersUpdateParams creates a new VirtualizationClustersUpdateParams object
+// with the default values initialized.
+func NewVirtualizationClustersUpdateParams() *VirtualizationClustersUpdateParams {
+ var ()
+ return &VirtualizationClustersUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationClustersUpdateParamsWithTimeout creates a new VirtualizationClustersUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationClustersUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationClustersUpdateParams {
+ var ()
+ return &VirtualizationClustersUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationClustersUpdateParamsWithContext creates a new VirtualizationClustersUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationClustersUpdateParamsWithContext(ctx context.Context) *VirtualizationClustersUpdateParams {
+ var ()
+ return &VirtualizationClustersUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationClustersUpdateParamsWithHTTPClient creates a new VirtualizationClustersUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationClustersUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationClustersUpdateParams {
+ var ()
+ return &VirtualizationClustersUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationClustersUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization clusters update operation typically these are written to a http.Request
+*/
+type VirtualizationClustersUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableCluster
+ /*ID
+ A unique integer value identifying this cluster.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationClustersUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) WithContext(ctx context.Context) *VirtualizationClustersUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationClustersUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) WithData(data *models.WritableCluster) *VirtualizationClustersUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) SetData(data *models.WritableCluster) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) WithID(id int64) *VirtualizationClustersUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization clusters update params
+func (o *VirtualizationClustersUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationClustersUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_responses.go
new file mode 100644
index 0000000..3e969db
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_clusters_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationClustersUpdateReader is a Reader for the VirtualizationClustersUpdate structure.
+type VirtualizationClustersUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationClustersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationClustersUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationClustersUpdateOK creates a VirtualizationClustersUpdateOK with default headers values
+func NewVirtualizationClustersUpdateOK() *VirtualizationClustersUpdateOK {
+ return &VirtualizationClustersUpdateOK{}
+}
+
+/*VirtualizationClustersUpdateOK handles this case with default header values.
+
+VirtualizationClustersUpdateOK virtualization clusters update o k
+*/
+type VirtualizationClustersUpdateOK struct {
+ Payload *models.WritableCluster
+}
+
+func (o *VirtualizationClustersUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /virtualization/clusters/{id}/][%d] virtualizationClustersUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationClustersUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableCluster)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_parameters.go
new file mode 100644
index 0000000..1d3cb0c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationInterfacesCreateParams creates a new VirtualizationInterfacesCreateParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesCreateParams() *VirtualizationInterfacesCreateParams {
+ var ()
+ return &VirtualizationInterfacesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesCreateParamsWithTimeout creates a new VirtualizationInterfacesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesCreateParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesCreateParams {
+ var ()
+ return &VirtualizationInterfacesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesCreateParamsWithContext creates a new VirtualizationInterfacesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesCreateParamsWithContext(ctx context.Context) *VirtualizationInterfacesCreateParams {
+ var ()
+ return &VirtualizationInterfacesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesCreateParamsWithHTTPClient creates a new VirtualizationInterfacesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesCreateParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesCreateParams {
+ var ()
+ return &VirtualizationInterfacesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesCreateParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces create operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) WithContext(ctx context.Context) *VirtualizationInterfacesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) WithData(data *models.WritableInterface) *VirtualizationInterfacesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization interfaces create params
+func (o *VirtualizationInterfacesCreateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_responses.go
new file mode 100644
index 0000000..4aed325
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationInterfacesCreateReader is a Reader for the VirtualizationInterfacesCreate structure.
+type VirtualizationInterfacesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewVirtualizationInterfacesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesCreateCreated creates a VirtualizationInterfacesCreateCreated with default headers values
+func NewVirtualizationInterfacesCreateCreated() *VirtualizationInterfacesCreateCreated {
+ return &VirtualizationInterfacesCreateCreated{}
+}
+
+/*VirtualizationInterfacesCreateCreated handles this case with default header values.
+
+VirtualizationInterfacesCreateCreated virtualization interfaces create created
+*/
+type VirtualizationInterfacesCreateCreated struct {
+ Payload *models.WritableInterface
+}
+
+func (o *VirtualizationInterfacesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /virtualization/interfaces/][%d] virtualizationInterfacesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *VirtualizationInterfacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go
new file mode 100644
index 0000000..b8b9861
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationInterfacesDeleteParams creates a new VirtualizationInterfacesDeleteParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesDeleteParams() *VirtualizationInterfacesDeleteParams {
+ var ()
+ return &VirtualizationInterfacesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesDeleteParamsWithTimeout creates a new VirtualizationInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesDeleteParams {
+ var ()
+ return &VirtualizationInterfacesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesDeleteParamsWithContext creates a new VirtualizationInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesDeleteParamsWithContext(ctx context.Context) *VirtualizationInterfacesDeleteParams {
+ var ()
+ return &VirtualizationInterfacesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesDeleteParamsWithHTTPClient creates a new VirtualizationInterfacesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesDeleteParams {
+ var ()
+ return &VirtualizationInterfacesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesDeleteParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces delete operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) WithContext(ctx context.Context) *VirtualizationInterfacesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) WithID(id int64) *VirtualizationInterfacesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization interfaces delete params
+func (o *VirtualizationInterfacesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_responses.go
new file mode 100644
index 0000000..3a86961
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationInterfacesDeleteReader is a Reader for the VirtualizationInterfacesDelete structure.
+type VirtualizationInterfacesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewVirtualizationInterfacesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesDeleteNoContent creates a VirtualizationInterfacesDeleteNoContent with default headers values
+func NewVirtualizationInterfacesDeleteNoContent() *VirtualizationInterfacesDeleteNoContent {
+ return &VirtualizationInterfacesDeleteNoContent{}
+}
+
+/*VirtualizationInterfacesDeleteNoContent handles this case with default header values.
+
+VirtualizationInterfacesDeleteNoContent virtualization interfaces delete no content
+*/
+type VirtualizationInterfacesDeleteNoContent struct {
+}
+
+func (o *VirtualizationInterfacesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /virtualization/interfaces/{id}/][%d] virtualizationInterfacesDeleteNoContent ", 204)
+}
+
+func (o *VirtualizationInterfacesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_parameters.go
new file mode 100644
index 0000000..3f0b716
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_parameters.go
@@ -0,0 +1,369 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationInterfacesListParams creates a new VirtualizationInterfacesListParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesListParams() *VirtualizationInterfacesListParams {
+ var ()
+ return &VirtualizationInterfacesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesListParamsWithTimeout creates a new VirtualizationInterfacesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesListParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesListParams {
+ var ()
+ return &VirtualizationInterfacesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesListParamsWithContext creates a new VirtualizationInterfacesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesListParamsWithContext(ctx context.Context) *VirtualizationInterfacesListParams {
+ var ()
+ return &VirtualizationInterfacesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesListParamsWithHTTPClient creates a new VirtualizationInterfacesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesListParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesListParams {
+ var ()
+ return &VirtualizationInterfacesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesListParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces list operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesListParams struct {
+
+ /*Enabled*/
+ Enabled *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*MacAddress*/
+ MacAddress *string
+ /*Mtu*/
+ Mtu *float64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*VirtualMachine*/
+ VirtualMachine *string
+ /*VirtualMachineID*/
+ VirtualMachineID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithContext(ctx context.Context) *VirtualizationInterfacesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithEnabled adds the enabled to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithEnabled(enabled *string) *VirtualizationInterfacesListParams {
+ o.SetEnabled(enabled)
+ return o
+}
+
+// SetEnabled adds the enabled to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetEnabled(enabled *string) {
+ o.Enabled = enabled
+}
+
+// WithLimit adds the limit to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithLimit(limit *int64) *VirtualizationInterfacesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithMacAddress adds the macAddress to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithMacAddress(macAddress *string) *VirtualizationInterfacesListParams {
+ o.SetMacAddress(macAddress)
+ return o
+}
+
+// SetMacAddress adds the macAddress to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetMacAddress(macAddress *string) {
+ o.MacAddress = macAddress
+}
+
+// WithMtu adds the mtu to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithMtu(mtu *float64) *VirtualizationInterfacesListParams {
+ o.SetMtu(mtu)
+ return o
+}
+
+// SetMtu adds the mtu to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetMtu(mtu *float64) {
+ o.Mtu = mtu
+}
+
+// WithName adds the name to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithName(name *string) *VirtualizationInterfacesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithOffset(offset *int64) *VirtualizationInterfacesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithVirtualMachine adds the virtualMachine to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithVirtualMachine(virtualMachine *string) *VirtualizationInterfacesListParams {
+ o.SetVirtualMachine(virtualMachine)
+ return o
+}
+
+// SetVirtualMachine adds the virtualMachine to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetVirtualMachine(virtualMachine *string) {
+ o.VirtualMachine = virtualMachine
+}
+
+// WithVirtualMachineID adds the virtualMachineID to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) WithVirtualMachineID(virtualMachineID *string) *VirtualizationInterfacesListParams {
+ o.SetVirtualMachineID(virtualMachineID)
+ return o
+}
+
+// SetVirtualMachineID adds the virtualMachineId to the virtualization interfaces list params
+func (o *VirtualizationInterfacesListParams) SetVirtualMachineID(virtualMachineID *string) {
+ o.VirtualMachineID = virtualMachineID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Enabled != nil {
+
+ // query param enabled
+ var qrEnabled string
+ if o.Enabled != nil {
+ qrEnabled = *o.Enabled
+ }
+ qEnabled := qrEnabled
+ if qEnabled != "" {
+ if err := r.SetQueryParam("enabled", qEnabled); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.MacAddress != nil {
+
+ // query param mac_address
+ var qrMacAddress string
+ if o.MacAddress != nil {
+ qrMacAddress = *o.MacAddress
+ }
+ qMacAddress := qrMacAddress
+ if qMacAddress != "" {
+ if err := r.SetQueryParam("mac_address", qMacAddress); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Mtu != nil {
+
+ // query param mtu
+ var qrMtu float64
+ if o.Mtu != nil {
+ qrMtu = *o.Mtu
+ }
+ qMtu := swag.FormatFloat64(qrMtu)
+ if qMtu != "" {
+ if err := r.SetQueryParam("mtu", qMtu); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachine != nil {
+
+ // query param virtual_machine
+ var qrVirtualMachine string
+ if o.VirtualMachine != nil {
+ qrVirtualMachine = *o.VirtualMachine
+ }
+ qVirtualMachine := qrVirtualMachine
+ if qVirtualMachine != "" {
+ if err := r.SetQueryParam("virtual_machine", qVirtualMachine); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.VirtualMachineID != nil {
+
+ // query param virtual_machine_id
+ var qrVirtualMachineID string
+ if o.VirtualMachineID != nil {
+ qrVirtualMachineID = *o.VirtualMachineID
+ }
+ qVirtualMachineID := qrVirtualMachineID
+ if qVirtualMachineID != "" {
+ if err := r.SetQueryParam("virtual_machine_id", qVirtualMachineID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_responses.go
new file mode 100644
index 0000000..5746fc3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationInterfacesListReader is a Reader for the VirtualizationInterfacesList structure.
+type VirtualizationInterfacesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationInterfacesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesListOK creates a VirtualizationInterfacesListOK with default headers values
+func NewVirtualizationInterfacesListOK() *VirtualizationInterfacesListOK {
+ return &VirtualizationInterfacesListOK{}
+}
+
+/*VirtualizationInterfacesListOK handles this case with default header values.
+
+VirtualizationInterfacesListOK virtualization interfaces list o k
+*/
+type VirtualizationInterfacesListOK struct {
+ Payload *models.VirtualizationInterfacesListOKBody
+}
+
+func (o *VirtualizationInterfacesListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/interfaces/][%d] virtualizationInterfacesListOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationInterfacesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualizationInterfacesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go
new file mode 100644
index 0000000..20ca38e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationInterfacesPartialUpdateParams creates a new VirtualizationInterfacesPartialUpdateParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesPartialUpdateParams() *VirtualizationInterfacesPartialUpdateParams {
+ var ()
+ return &VirtualizationInterfacesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesPartialUpdateParamsWithTimeout creates a new VirtualizationInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesPartialUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesPartialUpdateParams {
+ var ()
+ return &VirtualizationInterfacesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesPartialUpdateParamsWithContext creates a new VirtualizationInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesPartialUpdateParamsWithContext(ctx context.Context) *VirtualizationInterfacesPartialUpdateParams {
+ var ()
+ return &VirtualizationInterfacesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesPartialUpdateParamsWithHTTPClient creates a new VirtualizationInterfacesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesPartialUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesPartialUpdateParams {
+ var ()
+ return &VirtualizationInterfacesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces partial update operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) WithContext(ctx context.Context) *VirtualizationInterfacesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) WithData(data *models.WritableInterface) *VirtualizationInterfacesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) WithID(id int64) *VirtualizationInterfacesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization interfaces partial update params
+func (o *VirtualizationInterfacesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go
new file mode 100644
index 0000000..4d3c73e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationInterfacesPartialUpdateReader is a Reader for the VirtualizationInterfacesPartialUpdate structure.
+type VirtualizationInterfacesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationInterfacesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesPartialUpdateOK creates a VirtualizationInterfacesPartialUpdateOK with default headers values
+func NewVirtualizationInterfacesPartialUpdateOK() *VirtualizationInterfacesPartialUpdateOK {
+ return &VirtualizationInterfacesPartialUpdateOK{}
+}
+
+/*VirtualizationInterfacesPartialUpdateOK handles this case with default header values.
+
+VirtualizationInterfacesPartialUpdateOK virtualization interfaces partial update o k
+*/
+type VirtualizationInterfacesPartialUpdateOK struct {
+ Payload *models.WritableInterface
+}
+
+func (o *VirtualizationInterfacesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /virtualization/interfaces/{id}/][%d] virtualizationInterfacesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationInterfacesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_parameters.go
new file mode 100644
index 0000000..40dc3d7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationInterfacesReadParams creates a new VirtualizationInterfacesReadParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesReadParams() *VirtualizationInterfacesReadParams {
+ var ()
+ return &VirtualizationInterfacesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesReadParamsWithTimeout creates a new VirtualizationInterfacesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesReadParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesReadParams {
+ var ()
+ return &VirtualizationInterfacesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesReadParamsWithContext creates a new VirtualizationInterfacesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesReadParamsWithContext(ctx context.Context) *VirtualizationInterfacesReadParams {
+ var ()
+ return &VirtualizationInterfacesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesReadParamsWithHTTPClient creates a new VirtualizationInterfacesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesReadParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesReadParams {
+ var ()
+ return &VirtualizationInterfacesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesReadParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces read operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) WithContext(ctx context.Context) *VirtualizationInterfacesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) WithID(id int64) *VirtualizationInterfacesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization interfaces read params
+func (o *VirtualizationInterfacesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_responses.go
new file mode 100644
index 0000000..3201e07
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationInterfacesReadReader is a Reader for the VirtualizationInterfacesRead structure.
+type VirtualizationInterfacesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationInterfacesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesReadOK creates a VirtualizationInterfacesReadOK with default headers values
+func NewVirtualizationInterfacesReadOK() *VirtualizationInterfacesReadOK {
+ return &VirtualizationInterfacesReadOK{}
+}
+
+/*VirtualizationInterfacesReadOK handles this case with default header values.
+
+VirtualizationInterfacesReadOK virtualization interfaces read o k
+*/
+type VirtualizationInterfacesReadOK struct {
+ Payload *models.Interface
+}
+
+func (o *VirtualizationInterfacesReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/interfaces/{id}/][%d] virtualizationInterfacesReadOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationInterfacesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.Interface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_parameters.go
new file mode 100644
index 0000000..f9010f1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationInterfacesUpdateParams creates a new VirtualizationInterfacesUpdateParams object
+// with the default values initialized.
+func NewVirtualizationInterfacesUpdateParams() *VirtualizationInterfacesUpdateParams {
+ var ()
+ return &VirtualizationInterfacesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationInterfacesUpdateParamsWithTimeout creates a new VirtualizationInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationInterfacesUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationInterfacesUpdateParams {
+ var ()
+ return &VirtualizationInterfacesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationInterfacesUpdateParamsWithContext creates a new VirtualizationInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationInterfacesUpdateParamsWithContext(ctx context.Context) *VirtualizationInterfacesUpdateParams {
+ var ()
+ return &VirtualizationInterfacesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationInterfacesUpdateParamsWithHTTPClient creates a new VirtualizationInterfacesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationInterfacesUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationInterfacesUpdateParams {
+ var ()
+ return &VirtualizationInterfacesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationInterfacesUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization interfaces update operation typically these are written to a http.Request
+*/
+type VirtualizationInterfacesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableInterface
+ /*ID
+ A unique integer value identifying this interface.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationInterfacesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) WithContext(ctx context.Context) *VirtualizationInterfacesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationInterfacesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) WithData(data *models.WritableInterface) *VirtualizationInterfacesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) SetData(data *models.WritableInterface) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) WithID(id int64) *VirtualizationInterfacesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization interfaces update params
+func (o *VirtualizationInterfacesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationInterfacesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_responses.go
new file mode 100644
index 0000000..09f56f4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_interfaces_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationInterfacesUpdateReader is a Reader for the VirtualizationInterfacesUpdate structure.
+type VirtualizationInterfacesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationInterfacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationInterfacesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationInterfacesUpdateOK creates a VirtualizationInterfacesUpdateOK with default headers values
+func NewVirtualizationInterfacesUpdateOK() *VirtualizationInterfacesUpdateOK {
+ return &VirtualizationInterfacesUpdateOK{}
+}
+
+/*VirtualizationInterfacesUpdateOK handles this case with default header values.
+
+VirtualizationInterfacesUpdateOK virtualization interfaces update o k
+*/
+type VirtualizationInterfacesUpdateOK struct {
+ Payload *models.WritableInterface
+}
+
+func (o *VirtualizationInterfacesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /virtualization/interfaces/{id}/][%d] virtualizationInterfacesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationInterfacesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableInterface)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go
new file mode 100644
index 0000000..18ca35d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_parameters.go
@@ -0,0 +1,151 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationVirtualMachinesCreateParams creates a new VirtualizationVirtualMachinesCreateParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesCreateParams() *VirtualizationVirtualMachinesCreateParams {
+ var ()
+ return &VirtualizationVirtualMachinesCreateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesCreateParamsWithTimeout creates a new VirtualizationVirtualMachinesCreateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesCreateParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesCreateParams {
+ var ()
+ return &VirtualizationVirtualMachinesCreateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesCreateParamsWithContext creates a new VirtualizationVirtualMachinesCreateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesCreateParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesCreateParams {
+ var ()
+ return &VirtualizationVirtualMachinesCreateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesCreateParamsWithHTTPClient creates a new VirtualizationVirtualMachinesCreateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesCreateParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesCreateParams {
+ var ()
+ return &VirtualizationVirtualMachinesCreateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesCreateParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines create operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesCreateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualMachine
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesCreateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesCreateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesCreateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) WithData(data *models.WritableVirtualMachine) *VirtualizationVirtualMachinesCreateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization virtual machines create params
+func (o *VirtualizationVirtualMachinesCreateParams) SetData(data *models.WritableVirtualMachine) {
+ o.Data = data
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go
new file mode 100644
index 0000000..2098b99
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_create_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationVirtualMachinesCreateReader is a Reader for the VirtualizationVirtualMachinesCreate structure.
+type VirtualizationVirtualMachinesCreateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 201:
+ result := NewVirtualizationVirtualMachinesCreateCreated()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesCreateCreated creates a VirtualizationVirtualMachinesCreateCreated with default headers values
+func NewVirtualizationVirtualMachinesCreateCreated() *VirtualizationVirtualMachinesCreateCreated {
+ return &VirtualizationVirtualMachinesCreateCreated{}
+}
+
+/*VirtualizationVirtualMachinesCreateCreated handles this case with default header values.
+
+VirtualizationVirtualMachinesCreateCreated virtualization virtual machines create created
+*/
+type VirtualizationVirtualMachinesCreateCreated struct {
+ Payload *models.WritableVirtualMachine
+}
+
+func (o *VirtualizationVirtualMachinesCreateCreated) Error() string {
+ return fmt.Sprintf("[POST /virtualization/virtual-machines/][%d] virtualizationVirtualMachinesCreateCreated %+v", 201, o.Payload)
+}
+
+func (o *VirtualizationVirtualMachinesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualMachine)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go
new file mode 100644
index 0000000..b8bb7ca
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationVirtualMachinesDeleteParams creates a new VirtualizationVirtualMachinesDeleteParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesDeleteParams() *VirtualizationVirtualMachinesDeleteParams {
+ var ()
+ return &VirtualizationVirtualMachinesDeleteParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesDeleteParamsWithTimeout creates a new VirtualizationVirtualMachinesDeleteParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesDeleteParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesDeleteParams {
+ var ()
+ return &VirtualizationVirtualMachinesDeleteParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesDeleteParamsWithContext creates a new VirtualizationVirtualMachinesDeleteParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesDeleteParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesDeleteParams {
+ var ()
+ return &VirtualizationVirtualMachinesDeleteParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesDeleteParamsWithHTTPClient creates a new VirtualizationVirtualMachinesDeleteParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesDeleteParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesDeleteParams {
+ var ()
+ return &VirtualizationVirtualMachinesDeleteParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesDeleteParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines delete operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesDeleteParams struct {
+
+ /*ID
+ A unique integer value identifying this virtual machine.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesDeleteParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesDeleteParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesDeleteParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) WithID(id int64) *VirtualizationVirtualMachinesDeleteParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization virtual machines delete params
+func (o *VirtualizationVirtualMachinesDeleteParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go
new file mode 100644
index 0000000..246fce7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_delete_responses.go
@@ -0,0 +1,70 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// VirtualizationVirtualMachinesDeleteReader is a Reader for the VirtualizationVirtualMachinesDelete structure.
+type VirtualizationVirtualMachinesDeleteReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 204:
+ result := NewVirtualizationVirtualMachinesDeleteNoContent()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesDeleteNoContent creates a VirtualizationVirtualMachinesDeleteNoContent with default headers values
+func NewVirtualizationVirtualMachinesDeleteNoContent() *VirtualizationVirtualMachinesDeleteNoContent {
+ return &VirtualizationVirtualMachinesDeleteNoContent{}
+}
+
+/*VirtualizationVirtualMachinesDeleteNoContent handles this case with default header values.
+
+VirtualizationVirtualMachinesDeleteNoContent virtualization virtual machines delete no content
+*/
+type VirtualizationVirtualMachinesDeleteNoContent struct {
+}
+
+func (o *VirtualizationVirtualMachinesDeleteNoContent) Error() string {
+ return fmt.Sprintf("[DELETE /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesDeleteNoContent ", 204)
+}
+
+func (o *VirtualizationVirtualMachinesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go
new file mode 100644
index 0000000..7330761
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go
@@ -0,0 +1,720 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationVirtualMachinesListParams creates a new VirtualizationVirtualMachinesListParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesListParams() *VirtualizationVirtualMachinesListParams {
+ var ()
+ return &VirtualizationVirtualMachinesListParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesListParamsWithTimeout creates a new VirtualizationVirtualMachinesListParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesListParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesListParams {
+ var ()
+ return &VirtualizationVirtualMachinesListParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesListParamsWithContext creates a new VirtualizationVirtualMachinesListParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesListParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesListParams {
+ var ()
+ return &VirtualizationVirtualMachinesListParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesListParamsWithHTTPClient creates a new VirtualizationVirtualMachinesListParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesListParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesListParams {
+ var ()
+ return &VirtualizationVirtualMachinesListParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesListParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines list operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesListParams struct {
+
+ /*Cluster*/
+ Cluster *string
+ /*ClusterGroup*/
+ ClusterGroup *string
+ /*ClusterGroupID*/
+ ClusterGroupID *string
+ /*ClusterID*/
+ ClusterID *string
+ /*ClusterType*/
+ ClusterType *string
+ /*ClusterTypeID*/
+ ClusterTypeID *string
+ /*IDIn
+ Multiple values may be separated by commas.
+
+ */
+ IDIn *string
+ /*Limit
+ Number of results to return per page.
+
+ */
+ Limit *int64
+ /*Name*/
+ Name *string
+ /*Offset
+ The initial index from which to return the results.
+
+ */
+ Offset *int64
+ /*Platform*/
+ Platform *string
+ /*PlatformID*/
+ PlatformID *string
+ /*Q*/
+ Q *string
+ /*Role*/
+ Role *string
+ /*RoleID*/
+ RoleID *string
+ /*Site*/
+ Site *string
+ /*SiteID*/
+ SiteID *string
+ /*Status*/
+ Status *string
+ /*Tenant*/
+ Tenant *string
+ /*TenantID*/
+ TenantID *string
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesListParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesListParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesListParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithCluster adds the cluster to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithCluster(cluster *string) *VirtualizationVirtualMachinesListParams {
+ o.SetCluster(cluster)
+ return o
+}
+
+// SetCluster adds the cluster to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetCluster(cluster *string) {
+ o.Cluster = cluster
+}
+
+// WithClusterGroup adds the clusterGroup to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithClusterGroup(clusterGroup *string) *VirtualizationVirtualMachinesListParams {
+ o.SetClusterGroup(clusterGroup)
+ return o
+}
+
+// SetClusterGroup adds the clusterGroup to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetClusterGroup(clusterGroup *string) {
+ o.ClusterGroup = clusterGroup
+}
+
+// WithClusterGroupID adds the clusterGroupID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithClusterGroupID(clusterGroupID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetClusterGroupID(clusterGroupID)
+ return o
+}
+
+// SetClusterGroupID adds the clusterGroupId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetClusterGroupID(clusterGroupID *string) {
+ o.ClusterGroupID = clusterGroupID
+}
+
+// WithClusterID adds the clusterID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithClusterID(clusterID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetClusterID(clusterID)
+ return o
+}
+
+// SetClusterID adds the clusterId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetClusterID(clusterID *string) {
+ o.ClusterID = clusterID
+}
+
+// WithClusterType adds the clusterType to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithClusterType(clusterType *string) *VirtualizationVirtualMachinesListParams {
+ o.SetClusterType(clusterType)
+ return o
+}
+
+// SetClusterType adds the clusterType to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetClusterType(clusterType *string) {
+ o.ClusterType = clusterType
+}
+
+// WithClusterTypeID adds the clusterTypeID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithClusterTypeID(clusterTypeID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetClusterTypeID(clusterTypeID)
+ return o
+}
+
+// SetClusterTypeID adds the clusterTypeId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetClusterTypeID(clusterTypeID *string) {
+ o.ClusterTypeID = clusterTypeID
+}
+
+// WithIDIn adds the iDIn to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithIDIn(iDIn *string) *VirtualizationVirtualMachinesListParams {
+ o.SetIDIn(iDIn)
+ return o
+}
+
+// SetIDIn adds the idIn to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetIDIn(iDIn *string) {
+ o.IDIn = iDIn
+}
+
+// WithLimit adds the limit to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithLimit(limit *int64) *VirtualizationVirtualMachinesListParams {
+ o.SetLimit(limit)
+ return o
+}
+
+// SetLimit adds the limit to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetLimit(limit *int64) {
+ o.Limit = limit
+}
+
+// WithName adds the name to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithName(name *string) *VirtualizationVirtualMachinesListParams {
+ o.SetName(name)
+ return o
+}
+
+// SetName adds the name to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetName(name *string) {
+ o.Name = name
+}
+
+// WithOffset adds the offset to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithOffset(offset *int64) *VirtualizationVirtualMachinesListParams {
+ o.SetOffset(offset)
+ return o
+}
+
+// SetOffset adds the offset to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetOffset(offset *int64) {
+ o.Offset = offset
+}
+
+// WithPlatform adds the platform to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithPlatform(platform *string) *VirtualizationVirtualMachinesListParams {
+ o.SetPlatform(platform)
+ return o
+}
+
+// SetPlatform adds the platform to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetPlatform(platform *string) {
+ o.Platform = platform
+}
+
+// WithPlatformID adds the platformID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithPlatformID(platformID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetPlatformID(platformID)
+ return o
+}
+
+// SetPlatformID adds the platformId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetPlatformID(platformID *string) {
+ o.PlatformID = platformID
+}
+
+// WithQ adds the q to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithQ(q *string) *VirtualizationVirtualMachinesListParams {
+ o.SetQ(q)
+ return o
+}
+
+// SetQ adds the q to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetQ(q *string) {
+ o.Q = q
+}
+
+// WithRole adds the role to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithRole(role *string) *VirtualizationVirtualMachinesListParams {
+ o.SetRole(role)
+ return o
+}
+
+// SetRole adds the role to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetRole(role *string) {
+ o.Role = role
+}
+
+// WithRoleID adds the roleID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithRoleID(roleID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetRoleID(roleID)
+ return o
+}
+
+// SetRoleID adds the roleId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetRoleID(roleID *string) {
+ o.RoleID = roleID
+}
+
+// WithSite adds the site to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithSite(site *string) *VirtualizationVirtualMachinesListParams {
+ o.SetSite(site)
+ return o
+}
+
+// SetSite adds the site to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetSite(site *string) {
+ o.Site = site
+}
+
+// WithSiteID adds the siteID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithSiteID(siteID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetSiteID(siteID)
+ return o
+}
+
+// SetSiteID adds the siteId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetSiteID(siteID *string) {
+ o.SiteID = siteID
+}
+
+// WithStatus adds the status to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithStatus(status *string) *VirtualizationVirtualMachinesListParams {
+ o.SetStatus(status)
+ return o
+}
+
+// SetStatus adds the status to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetStatus(status *string) {
+ o.Status = status
+}
+
+// WithTenant adds the tenant to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithTenant(tenant *string) *VirtualizationVirtualMachinesListParams {
+ o.SetTenant(tenant)
+ return o
+}
+
+// SetTenant adds the tenant to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetTenant(tenant *string) {
+ o.Tenant = tenant
+}
+
+// WithTenantID adds the tenantID to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) WithTenantID(tenantID *string) *VirtualizationVirtualMachinesListParams {
+ o.SetTenantID(tenantID)
+ return o
+}
+
+// SetTenantID adds the tenantId to the virtualization virtual machines list params
+func (o *VirtualizationVirtualMachinesListParams) SetTenantID(tenantID *string) {
+ o.TenantID = tenantID
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Cluster != nil {
+
+ // query param cluster
+ var qrCluster string
+ if o.Cluster != nil {
+ qrCluster = *o.Cluster
+ }
+ qCluster := qrCluster
+ if qCluster != "" {
+ if err := r.SetQueryParam("cluster", qCluster); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterGroup != nil {
+
+ // query param cluster_group
+ var qrClusterGroup string
+ if o.ClusterGroup != nil {
+ qrClusterGroup = *o.ClusterGroup
+ }
+ qClusterGroup := qrClusterGroup
+ if qClusterGroup != "" {
+ if err := r.SetQueryParam("cluster_group", qClusterGroup); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterGroupID != nil {
+
+ // query param cluster_group_id
+ var qrClusterGroupID string
+ if o.ClusterGroupID != nil {
+ qrClusterGroupID = *o.ClusterGroupID
+ }
+ qClusterGroupID := qrClusterGroupID
+ if qClusterGroupID != "" {
+ if err := r.SetQueryParam("cluster_group_id", qClusterGroupID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterID != nil {
+
+ // query param cluster_id
+ var qrClusterID string
+ if o.ClusterID != nil {
+ qrClusterID = *o.ClusterID
+ }
+ qClusterID := qrClusterID
+ if qClusterID != "" {
+ if err := r.SetQueryParam("cluster_id", qClusterID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterType != nil {
+
+ // query param cluster_type
+ var qrClusterType string
+ if o.ClusterType != nil {
+ qrClusterType = *o.ClusterType
+ }
+ qClusterType := qrClusterType
+ if qClusterType != "" {
+ if err := r.SetQueryParam("cluster_type", qClusterType); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.ClusterTypeID != nil {
+
+ // query param cluster_type_id
+ var qrClusterTypeID string
+ if o.ClusterTypeID != nil {
+ qrClusterTypeID = *o.ClusterTypeID
+ }
+ qClusterTypeID := qrClusterTypeID
+ if qClusterTypeID != "" {
+ if err := r.SetQueryParam("cluster_type_id", qClusterTypeID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.IDIn != nil {
+
+ // query param id__in
+ var qrIDIn string
+ if o.IDIn != nil {
+ qrIDIn = *o.IDIn
+ }
+ qIDIn := qrIDIn
+ if qIDIn != "" {
+ if err := r.SetQueryParam("id__in", qIDIn); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Limit != nil {
+
+ // query param limit
+ var qrLimit int64
+ if o.Limit != nil {
+ qrLimit = *o.Limit
+ }
+ qLimit := swag.FormatInt64(qrLimit)
+ if qLimit != "" {
+ if err := r.SetQueryParam("limit", qLimit); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Name != nil {
+
+ // query param name
+ var qrName string
+ if o.Name != nil {
+ qrName = *o.Name
+ }
+ qName := qrName
+ if qName != "" {
+ if err := r.SetQueryParam("name", qName); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Offset != nil {
+
+ // query param offset
+ var qrOffset int64
+ if o.Offset != nil {
+ qrOffset = *o.Offset
+ }
+ qOffset := swag.FormatInt64(qrOffset)
+ if qOffset != "" {
+ if err := r.SetQueryParam("offset", qOffset); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Platform != nil {
+
+ // query param platform
+ var qrPlatform string
+ if o.Platform != nil {
+ qrPlatform = *o.Platform
+ }
+ qPlatform := qrPlatform
+ if qPlatform != "" {
+ if err := r.SetQueryParam("platform", qPlatform); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.PlatformID != nil {
+
+ // query param platform_id
+ var qrPlatformID string
+ if o.PlatformID != nil {
+ qrPlatformID = *o.PlatformID
+ }
+ qPlatformID := qrPlatformID
+ if qPlatformID != "" {
+ if err := r.SetQueryParam("platform_id", qPlatformID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Q != nil {
+
+ // query param q
+ var qrQ string
+ if o.Q != nil {
+ qrQ = *o.Q
+ }
+ qQ := qrQ
+ if qQ != "" {
+ if err := r.SetQueryParam("q", qQ); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Role != nil {
+
+ // query param role
+ var qrRole string
+ if o.Role != nil {
+ qrRole = *o.Role
+ }
+ qRole := qrRole
+ if qRole != "" {
+ if err := r.SetQueryParam("role", qRole); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.RoleID != nil {
+
+ // query param role_id
+ var qrRoleID string
+ if o.RoleID != nil {
+ qrRoleID = *o.RoleID
+ }
+ qRoleID := qrRoleID
+ if qRoleID != "" {
+ if err := r.SetQueryParam("role_id", qRoleID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Site != nil {
+
+ // query param site
+ var qrSite string
+ if o.Site != nil {
+ qrSite = *o.Site
+ }
+ qSite := qrSite
+ if qSite != "" {
+ if err := r.SetQueryParam("site", qSite); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.SiteID != nil {
+
+ // query param site_id
+ var qrSiteID string
+ if o.SiteID != nil {
+ qrSiteID = *o.SiteID
+ }
+ qSiteID := qrSiteID
+ if qSiteID != "" {
+ if err := r.SetQueryParam("site_id", qSiteID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Status != nil {
+
+ // query param status
+ var qrStatus string
+ if o.Status != nil {
+ qrStatus = *o.Status
+ }
+ qStatus := qrStatus
+ if qStatus != "" {
+ if err := r.SetQueryParam("status", qStatus); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.Tenant != nil {
+
+ // query param tenant
+ var qrTenant string
+ if o.Tenant != nil {
+ qrTenant = *o.Tenant
+ }
+ qTenant := qrTenant
+ if qTenant != "" {
+ if err := r.SetQueryParam("tenant", qTenant); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if o.TenantID != nil {
+
+ // query param tenant_id
+ var qrTenantID string
+ if o.TenantID != nil {
+ qrTenantID = *o.TenantID
+ }
+ qTenantID := qrTenantID
+ if qTenantID != "" {
+ if err := r.SetQueryParam("tenant_id", qTenantID); err != nil {
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go
new file mode 100644
index 0000000..c1793ec
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationVirtualMachinesListReader is a Reader for the VirtualizationVirtualMachinesList structure.
+type VirtualizationVirtualMachinesListReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationVirtualMachinesListOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesListOK creates a VirtualizationVirtualMachinesListOK with default headers values
+func NewVirtualizationVirtualMachinesListOK() *VirtualizationVirtualMachinesListOK {
+ return &VirtualizationVirtualMachinesListOK{}
+}
+
+/*VirtualizationVirtualMachinesListOK handles this case with default header values.
+
+VirtualizationVirtualMachinesListOK virtualization virtual machines list o k
+*/
+type VirtualizationVirtualMachinesListOK struct {
+ Payload *models.VirtualizationVirtualMachinesListOKBody
+}
+
+func (o *VirtualizationVirtualMachinesListOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/virtual-machines/][%d] virtualizationVirtualMachinesListOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationVirtualMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualizationVirtualMachinesListOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go
new file mode 100644
index 0000000..ff186f3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationVirtualMachinesPartialUpdateParams creates a new VirtualizationVirtualMachinesPartialUpdateParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesPartialUpdateParams() *VirtualizationVirtualMachinesPartialUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesPartialUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesPartialUpdateParamsWithTimeout creates a new VirtualizationVirtualMachinesPartialUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesPartialUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesPartialUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesPartialUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesPartialUpdateParamsWithContext creates a new VirtualizationVirtualMachinesPartialUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesPartialUpdateParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesPartialUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesPartialUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesPartialUpdateParamsWithHTTPClient creates a new VirtualizationVirtualMachinesPartialUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesPartialUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesPartialUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesPartialUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesPartialUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines partial update operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesPartialUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualMachine
+ /*ID
+ A unique integer value identifying this virtual machine.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesPartialUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesPartialUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesPartialUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WithData(data *models.WritableVirtualMachine) *VirtualizationVirtualMachinesPartialUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) SetData(data *models.WritableVirtualMachine) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WithID(id int64) *VirtualizationVirtualMachinesPartialUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization virtual machines partial update params
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go
new file mode 100644
index 0000000..f68ed8e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_partial_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationVirtualMachinesPartialUpdateReader is a Reader for the VirtualizationVirtualMachinesPartialUpdate structure.
+type VirtualizationVirtualMachinesPartialUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationVirtualMachinesPartialUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesPartialUpdateOK creates a VirtualizationVirtualMachinesPartialUpdateOK with default headers values
+func NewVirtualizationVirtualMachinesPartialUpdateOK() *VirtualizationVirtualMachinesPartialUpdateOK {
+ return &VirtualizationVirtualMachinesPartialUpdateOK{}
+}
+
+/*VirtualizationVirtualMachinesPartialUpdateOK handles this case with default header values.
+
+VirtualizationVirtualMachinesPartialUpdateOK virtualization virtual machines partial update o k
+*/
+type VirtualizationVirtualMachinesPartialUpdateOK struct {
+ Payload *models.WritableVirtualMachine
+}
+
+func (o *VirtualizationVirtualMachinesPartialUpdateOK) Error() string {
+ return fmt.Sprintf("[PATCH /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesPartialUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationVirtualMachinesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualMachine)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go
new file mode 100644
index 0000000..9d6888b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_parameters.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+)
+
+// NewVirtualizationVirtualMachinesReadParams creates a new VirtualizationVirtualMachinesReadParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesReadParams() *VirtualizationVirtualMachinesReadParams {
+ var ()
+ return &VirtualizationVirtualMachinesReadParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesReadParamsWithTimeout creates a new VirtualizationVirtualMachinesReadParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesReadParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesReadParams {
+ var ()
+ return &VirtualizationVirtualMachinesReadParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesReadParamsWithContext creates a new VirtualizationVirtualMachinesReadParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesReadParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesReadParams {
+ var ()
+ return &VirtualizationVirtualMachinesReadParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesReadParamsWithHTTPClient creates a new VirtualizationVirtualMachinesReadParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesReadParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesReadParams {
+ var ()
+ return &VirtualizationVirtualMachinesReadParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesReadParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines read operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesReadParams struct {
+
+ /*ID
+ A unique integer value identifying this virtual machine.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesReadParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesReadParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesReadParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithID adds the id to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) WithID(id int64) *VirtualizationVirtualMachinesReadParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization virtual machines read params
+func (o *VirtualizationVirtualMachinesReadParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go
new file mode 100644
index 0000000..3e8b2ee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_read_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationVirtualMachinesReadReader is a Reader for the VirtualizationVirtualMachinesRead structure.
+type VirtualizationVirtualMachinesReadReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationVirtualMachinesReadOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesReadOK creates a VirtualizationVirtualMachinesReadOK with default headers values
+func NewVirtualizationVirtualMachinesReadOK() *VirtualizationVirtualMachinesReadOK {
+ return &VirtualizationVirtualMachinesReadOK{}
+}
+
+/*VirtualizationVirtualMachinesReadOK handles this case with default header values.
+
+VirtualizationVirtualMachinesReadOK virtualization virtual machines read o k
+*/
+type VirtualizationVirtualMachinesReadOK struct {
+ Payload *models.VirtualMachine
+}
+
+func (o *VirtualizationVirtualMachinesReadOK) Error() string {
+ return fmt.Sprintf("[GET /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesReadOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationVirtualMachinesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.VirtualMachine)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go
new file mode 100644
index 0000000..1a0088b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_parameters.go
@@ -0,0 +1,173 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "net/http"
+ "time"
+
+ "golang.org/x/net/context"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/swag"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// NewVirtualizationVirtualMachinesUpdateParams creates a new VirtualizationVirtualMachinesUpdateParams object
+// with the default values initialized.
+func NewVirtualizationVirtualMachinesUpdateParams() *VirtualizationVirtualMachinesUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesUpdateParams{
+
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesUpdateParamsWithTimeout creates a new VirtualizationVirtualMachinesUpdateParams object
+// with the default values initialized, and the ability to set a timeout on a request
+func NewVirtualizationVirtualMachinesUpdateParamsWithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesUpdateParams{
+
+ timeout: timeout,
+ }
+}
+
+// NewVirtualizationVirtualMachinesUpdateParamsWithContext creates a new VirtualizationVirtualMachinesUpdateParams object
+// with the default values initialized, and the ability to set a context for a request
+func NewVirtualizationVirtualMachinesUpdateParamsWithContext(ctx context.Context) *VirtualizationVirtualMachinesUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesUpdateParams{
+
+ Context: ctx,
+ }
+}
+
+// NewVirtualizationVirtualMachinesUpdateParamsWithHTTPClient creates a new VirtualizationVirtualMachinesUpdateParams object
+// with the default values initialized, and the ability to set a custom HTTPClient for a request
+func NewVirtualizationVirtualMachinesUpdateParamsWithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesUpdateParams {
+ var ()
+ return &VirtualizationVirtualMachinesUpdateParams{
+ HTTPClient: client,
+ }
+}
+
+/*VirtualizationVirtualMachinesUpdateParams contains all the parameters to send to the API endpoint
+for the virtualization virtual machines update operation typically these are written to a http.Request
+*/
+type VirtualizationVirtualMachinesUpdateParams struct {
+
+ /*Data*/
+ Data *models.WritableVirtualMachine
+ /*ID
+ A unique integer value identifying this virtual machine.
+
+ */
+ ID int64
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithTimeout adds the timeout to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) WithTimeout(timeout time.Duration) *VirtualizationVirtualMachinesUpdateParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) WithContext(ctx context.Context) *VirtualizationVirtualMachinesUpdateParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) WithHTTPClient(client *http.Client) *VirtualizationVirtualMachinesUpdateParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithData adds the data to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) WithData(data *models.WritableVirtualMachine) *VirtualizationVirtualMachinesUpdateParams {
+ o.SetData(data)
+ return o
+}
+
+// SetData adds the data to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) SetData(data *models.WritableVirtualMachine) {
+ o.Data = data
+}
+
+// WithID adds the id to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) WithID(id int64) *VirtualizationVirtualMachinesUpdateParams {
+ o.SetID(id)
+ return o
+}
+
+// SetID adds the id to the virtualization virtual machines update params
+func (o *VirtualizationVirtualMachinesUpdateParams) SetID(id int64) {
+ o.ID = id
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *VirtualizationVirtualMachinesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+
+ if o.Data != nil {
+ if err := r.SetBodyParam(o.Data); err != nil {
+ return err
+ }
+ }
+
+ // path param id
+ if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go
new file mode 100644
index 0000000..e5abe21
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/virtualization/virtualization_virtual_machines_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package virtualization
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/go-openapi/runtime"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// VirtualizationVirtualMachinesUpdateReader is a Reader for the VirtualizationVirtualMachinesUpdate structure.
+type VirtualizationVirtualMachinesUpdateReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *VirtualizationVirtualMachinesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+
+ case 200:
+ result := NewVirtualizationVirtualMachinesUpdateOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+
+ default:
+ return nil, runtime.NewAPIError("unknown error", response, response.Code())
+ }
+}
+
+// NewVirtualizationVirtualMachinesUpdateOK creates a VirtualizationVirtualMachinesUpdateOK with default headers values
+func NewVirtualizationVirtualMachinesUpdateOK() *VirtualizationVirtualMachinesUpdateOK {
+ return &VirtualizationVirtualMachinesUpdateOK{}
+}
+
+/*VirtualizationVirtualMachinesUpdateOK handles this case with default header values.
+
+VirtualizationVirtualMachinesUpdateOK virtualization virtual machines update o k
+*/
+type VirtualizationVirtualMachinesUpdateOK struct {
+ Payload *models.WritableVirtualMachine
+}
+
+func (o *VirtualizationVirtualMachinesUpdateOK) Error() string {
+ return fmt.Sprintf("[PUT /virtualization/virtual-machines/{id}/][%d] virtualizationVirtualMachinesUpdateOK %+v", 200, o.Payload)
+}
+
+func (o *VirtualizationVirtualMachinesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+ o.Payload = new(models.WritableVirtualMachine)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/aggregate.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/aggregate.go
new file mode 100644
index 0000000..d0c730b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/aggregate.go
@@ -0,0 +1,192 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Aggregate aggregate
+// swagger:model Aggregate
+type Aggregate struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Date added
+ DateAdded strfmt.Date `json:"date_added,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Family
+ // Required: true
+ Family *int64 `json:"family"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Prefix
+ // Required: true
+ Prefix *string `json:"prefix"`
+
+ // rir
+ // Required: true
+ Rir *NestedRIR `json:"rir"`
+}
+
+// Validate validates this aggregate
+func (m *Aggregate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFamily(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrefix(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRir(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Aggregate) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var aggregateTypeFamilyPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[4,6]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ aggregateTypeFamilyPropEnum = append(aggregateTypeFamilyPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *Aggregate) validateFamilyEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, aggregateTypeFamilyPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *Aggregate) validateFamily(formats strfmt.Registry) error {
+
+ if err := validate.Required("family", "body", m.Family); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateFamilyEnum("family", "body", *m.Family); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Aggregate) validatePrefix(formats strfmt.Registry) error {
+
+ if err := validate.Required("prefix", "body", m.Prefix); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Aggregate) validateRir(formats strfmt.Registry) error {
+
+ if err := validate.Required("rir", "body", m.Rir); err != nil {
+ return err
+ }
+
+ if m.Rir != nil {
+
+ if err := m.Rir.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("rir")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Aggregate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Aggregate) UnmarshalBinary(b []byte) error {
+ var res Aggregate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit.go
new file mode 100644
index 0000000..c3c5953
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit.go
@@ -0,0 +1,266 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Circuit circuit
+// swagger:model Circuit
+type Circuit struct {
+
+ // Circuit ID
+ // Required: true
+ // Max Length: 50
+ Cid *string `json:"cid"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Commit rate (Kbps)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ CommitRate *int64 `json:"commit_rate,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Date installed
+ InstallDate strfmt.Date `json:"install_date,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // provider
+ // Required: true
+ Provider *NestedProvider `json:"provider"`
+
+ // status
+ // Required: true
+ Status *CircuitStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // type
+ // Required: true
+ Type *NestedCircuitType `json:"type"`
+}
+
+// Validate validates this circuit
+func (m *Circuit) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateCommitRate(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateProvider(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Circuit) validateCid(formats strfmt.Registry) error {
+
+ if err := validate.Required("cid", "body", m.Cid); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("cid", "body", string(*m.Cid), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateCommitRate(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.CommitRate) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("commit_rate", "body", int64(*m.CommitRate), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("commit_rate", "body", int64(*m.CommitRate), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateProvider(formats strfmt.Registry) error {
+
+ if err := validate.Required("provider", "body", m.Provider); err != nil {
+ return err
+ }
+
+ if m.Provider != nil {
+
+ if err := m.Provider.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("provider")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Circuit) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if m.Type != nil {
+
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Circuit) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Circuit) UnmarshalBinary(b []byte) error {
+ var res Circuit
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_status.go
new file mode 100644
index 0000000..e309e96
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitStatus Status
+// swagger:model circuitStatus
+type CircuitStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this circuit status
+func (m *CircuitStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitStatus) UnmarshalBinary(b []byte) error {
+ var res CircuitStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_termination.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_termination.go
new file mode 100644
index 0000000..264aec0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_termination.go
@@ -0,0 +1,302 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitTermination circuit termination
+// swagger:model CircuitTermination
+type CircuitTermination struct {
+
+ // circuit
+ // Required: true
+ Circuit *NestedCircuit `json:"circuit"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // interface
+ // Required: true
+ Interface *Interface `json:"interface"`
+
+ // Port speed (Kbps)
+ // Required: true
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ PortSpeed *int64 `json:"port_speed"`
+
+ // Patch panel/port(s)
+ // Max Length: 100
+ PpInfo string `json:"pp_info,omitempty"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // Termination
+ // Required: true
+ TermSide *string `json:"term_side"`
+
+ // Upstream speed (Kbps)
+ //
+ // Upstream speed, if different from port speed
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ UpstreamSpeed *int64 `json:"upstream_speed,omitempty"`
+
+ // Cross-connect ID
+ // Max Length: 50
+ XconnectID string `json:"xconnect_id,omitempty"`
+}
+
+// Validate validates this circuit termination
+func (m *CircuitTermination) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCircuit(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterface(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePortSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePpInfo(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTermSide(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUpstreamSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateXconnectID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitTermination) validateCircuit(formats strfmt.Registry) error {
+
+ if err := validate.Required("circuit", "body", m.Circuit); err != nil {
+ return err
+ }
+
+ if m.Circuit != nil {
+
+ if err := m.Circuit.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("circuit")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validateInterface(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface", "body", m.Interface); err != nil {
+ return err
+ }
+
+ if m.Interface != nil {
+
+ if err := m.Interface.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("interface")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validatePortSpeed(formats strfmt.Registry) error {
+
+ if err := validate.Required("port_speed", "body", m.PortSpeed); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("port_speed", "body", int64(*m.PortSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("port_speed", "body", int64(*m.PortSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validatePpInfo(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PpInfo) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("pp_info", "body", string(m.PpInfo), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+var circuitTerminationTypeTermSidePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["A","Z"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ circuitTerminationTypeTermSidePropEnum = append(circuitTerminationTypeTermSidePropEnum, v)
+ }
+}
+
+const (
+ // CircuitTerminationTermSideA captures enum value "A"
+ CircuitTerminationTermSideA string = "A"
+ // CircuitTerminationTermSideZ captures enum value "Z"
+ CircuitTerminationTermSideZ string = "Z"
+)
+
+// prop value enum
+func (m *CircuitTermination) validateTermSideEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, circuitTerminationTypeTermSidePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *CircuitTermination) validateTermSide(formats strfmt.Registry) error {
+
+ if err := validate.Required("term_side", "body", m.TermSide); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateTermSideEnum("term_side", "body", *m.TermSide); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validateUpstreamSpeed(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UpstreamSpeed) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitTermination) validateXconnectID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.XconnectID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("xconnect_id", "body", string(m.XconnectID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitTermination) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitTermination) UnmarshalBinary(b []byte) error {
+ var res CircuitTermination
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_type.go
new file mode 100644
index 0000000..cb820ab
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuit_type.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitType circuit type
+// swagger:model CircuitType
+type CircuitType struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this circuit type
+func (m *CircuitType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitType) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitType) UnmarshalBinary(b []byte) error {
+ var res CircuitType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody.go
new file mode 100644
index 0000000..a10eb0c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitsCircuitTerminationsListOKBody circuits circuit terminations list o k body
+// swagger:model circuitsCircuitTerminationsListOKBody
+type CircuitsCircuitTerminationsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results CircuitsCircuitTerminationsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this circuits circuit terminations list o k body
+func (m *CircuitsCircuitTerminationsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitsCircuitTerminationsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitsCircuitTerminationsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitsCircuitTerminationsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitsCircuitTerminationsListOKBody) UnmarshalBinary(b []byte) error {
+ var res CircuitsCircuitTerminationsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody_results.go
new file mode 100644
index 0000000..0c876ba
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_terminations_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// CircuitsCircuitTerminationsListOKBodyResults circuits circuit terminations list o k body results
+// swagger:model circuitsCircuitTerminationsListOKBodyResults
+type CircuitsCircuitTerminationsListOKBodyResults []*CircuitTermination
+
+// Validate validates this circuits circuit terminations list o k body results
+func (m CircuitsCircuitTerminationsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody.go
new file mode 100644
index 0000000..e0fd7d1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitsCircuitTypesListOKBody circuits circuit types list o k body
+// swagger:model circuitsCircuitTypesListOKBody
+type CircuitsCircuitTypesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results CircuitsCircuitTypesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this circuits circuit types list o k body
+func (m *CircuitsCircuitTypesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitsCircuitTypesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitsCircuitTypesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitsCircuitTypesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitsCircuitTypesListOKBody) UnmarshalBinary(b []byte) error {
+ var res CircuitsCircuitTypesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody_results.go
new file mode 100644
index 0000000..857830a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuit_types_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// CircuitsCircuitTypesListOKBodyResults circuits circuit types list o k body results
+// swagger:model circuitsCircuitTypesListOKBodyResults
+type CircuitsCircuitTypesListOKBodyResults []*CircuitType
+
+// Validate validates this circuits circuit types list o k body results
+func (m CircuitsCircuitTypesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody.go
new file mode 100644
index 0000000..7e3d10c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitsCircuitsListOKBody circuits circuits list o k body
+// swagger:model circuitsCircuitsListOKBody
+type CircuitsCircuitsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results CircuitsCircuitsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this circuits circuits list o k body
+func (m *CircuitsCircuitsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitsCircuitsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitsCircuitsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitsCircuitsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitsCircuitsListOKBody) UnmarshalBinary(b []byte) error {
+ var res CircuitsCircuitsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody_results.go
new file mode 100644
index 0000000..6033ace
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_circuits_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// CircuitsCircuitsListOKBodyResults circuits circuits list o k body results
+// swagger:model circuitsCircuitsListOKBodyResults
+type CircuitsCircuitsListOKBodyResults []*Circuit
+
+// Validate validates this circuits circuits list o k body results
+func (m CircuitsCircuitsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody.go
new file mode 100644
index 0000000..d1fa3cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// CircuitsProvidersListOKBody circuits providers list o k body
+// swagger:model circuitsProvidersListOKBody
+type CircuitsProvidersListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results CircuitsProvidersListOKBodyResults `json:"results"`
+}
+
+// Validate validates this circuits providers list o k body
+func (m *CircuitsProvidersListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *CircuitsProvidersListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *CircuitsProvidersListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *CircuitsProvidersListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *CircuitsProvidersListOKBody) UnmarshalBinary(b []byte) error {
+ var res CircuitsProvidersListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody_results.go
new file mode 100644
index 0000000..22d02c9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/circuits_providers_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// CircuitsProvidersListOKBodyResults circuits providers list o k body results
+// swagger:model circuitsProvidersListOKBodyResults
+type CircuitsProvidersListOKBodyResults []*Provider
+
+// Validate validates this circuits providers list o k body results
+func (m CircuitsProvidersListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster.go
new file mode 100644
index 0000000..d3d4ad6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster.go
@@ -0,0 +1,186 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Cluster cluster
+// swagger:model Cluster
+type Cluster struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // group
+ // Required: true
+ Group *NestedClusterGroup `json:"group"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // type
+ // Required: true
+ Type *NestedClusterType `json:"type"`
+}
+
+// Validate validates this cluster
+func (m *Cluster) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateGroup(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Cluster) validateGroup(formats strfmt.Registry) error {
+
+ if err := validate.Required("group", "body", m.Group); err != nil {
+ return err
+ }
+
+ if m.Group != nil {
+
+ if err := m.Group.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("group")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Cluster) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Cluster) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Cluster) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if m.Type != nil {
+
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Cluster) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Cluster) UnmarshalBinary(b []byte) error {
+ var res Cluster
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_group.go
new file mode 100644
index 0000000..917d539
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_group.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ClusterGroup cluster group
+// swagger:model ClusterGroup
+type ClusterGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this cluster group
+func (m *ClusterGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ClusterGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ClusterGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ClusterGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ClusterGroup) UnmarshalBinary(b []byte) error {
+ var res ClusterGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_type.go
new file mode 100644
index 0000000..7cf330b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/cluster_type.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ClusterType cluster type
+// swagger:model ClusterType
+type ClusterType struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this cluster type
+func (m *ClusterType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ClusterType) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ClusterType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ClusterType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ClusterType) UnmarshalBinary(b []byte) error {
+ var res ClusterType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port.go
new file mode 100644
index 0000000..0646b44
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port.go
@@ -0,0 +1,188 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ConsolePort console port
+// swagger:model ConsolePort
+type ConsolePort struct {
+
+ // Connection status
+ ConnectionStatus bool `json:"connection_status,omitempty"`
+
+ // cs port
+ // Required: true
+ CsPort *ConsoleServerPort `json:"cs_port"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this console port
+func (m *ConsolePort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateCsPort(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var consolePortTypeConnectionStatusPropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ consolePortTypeConnectionStatusPropEnum = append(consolePortTypeConnectionStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *ConsolePort) validateConnectionStatusEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, consolePortTypeConnectionStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *ConsolePort) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ConnectionStatus) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateConnectionStatusEnum("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ConsolePort) validateCsPort(formats strfmt.Registry) error {
+
+ if err := validate.Required("cs_port", "body", m.CsPort); err != nil {
+ return err
+ }
+
+ if m.CsPort != nil {
+
+ if err := m.CsPort.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("cs_port")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ConsolePort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ConsolePort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ConsolePort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ConsolePort) UnmarshalBinary(b []byte) error {
+ var res ConsolePort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port_template.go
new file mode 100644
index 0000000..3c623ac
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_port_template.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ConsolePortTemplate console port template
+// swagger:model ConsolePortTemplate
+type ConsolePortTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this console port template
+func (m *ConsolePortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ConsolePortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ConsolePortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ConsolePortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ConsolePortTemplate) UnmarshalBinary(b []byte) error {
+ var res ConsolePortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port.go
new file mode 100644
index 0000000..8ce6dc1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ConsoleServerPort Cs port
+// swagger:model ConsoleServerPort
+type ConsoleServerPort struct {
+
+ // Connected console
+ // Read Only: true
+ ConnectedConsole string `json:"connected_console,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this console server port
+func (m *ConsoleServerPort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ConsoleServerPort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ConsoleServerPort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ConsoleServerPort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ConsoleServerPort) UnmarshalBinary(b []byte) error {
+ var res ConsoleServerPort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port_template.go
new file mode 100644
index 0000000..f10cb09
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/console_server_port_template.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ConsoleServerPortTemplate console server port template
+// swagger:model ConsoleServerPortTemplate
+type ConsoleServerPortTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this console server port template
+func (m *ConsoleServerPortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ConsoleServerPortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *ConsoleServerPortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ConsoleServerPortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ConsoleServerPortTemplate) UnmarshalBinary(b []byte) error {
+ var res ConsoleServerPortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody.go
new file mode 100644
index 0000000..cf16ad8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimConsoleConnectionsListOKBody dcim console connections list o k body
+// swagger:model dcimConsoleConnectionsListOKBody
+type DcimConsoleConnectionsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimConsoleConnectionsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim console connections list o k body
+func (m *DcimConsoleConnectionsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimConsoleConnectionsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimConsoleConnectionsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimConsoleConnectionsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimConsoleConnectionsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimConsoleConnectionsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody_results.go
new file mode 100644
index 0000000..fb6e026
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_connections_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimConsoleConnectionsListOKBodyResults dcim console connections list o k body results
+// swagger:model dcimConsoleConnectionsListOKBodyResults
+type DcimConsoleConnectionsListOKBodyResults []*ConsolePort
+
+// Validate validates this dcim console connections list o k body results
+func (m DcimConsoleConnectionsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody.go
new file mode 100644
index 0000000..4e01c12
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimConsolePortTemplatesListOKBody dcim console port templates list o k body
+// swagger:model dcimConsolePortTemplatesListOKBody
+type DcimConsolePortTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimConsolePortTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim console port templates list o k body
+func (m *DcimConsolePortTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimConsolePortTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimConsolePortTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimConsolePortTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimConsolePortTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimConsolePortTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody_results.go
new file mode 100644
index 0000000..cdee33b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_port_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimConsolePortTemplatesListOKBodyResults dcim console port templates list o k body results
+// swagger:model dcimConsolePortTemplatesListOKBodyResults
+type DcimConsolePortTemplatesListOKBodyResults []*ConsolePortTemplate
+
+// Validate validates this dcim console port templates list o k body results
+func (m DcimConsolePortTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody.go
new file mode 100644
index 0000000..1a9065d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimConsolePortsListOKBody dcim console ports list o k body
+// swagger:model dcimConsolePortsListOKBody
+type DcimConsolePortsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimConsolePortsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim console ports list o k body
+func (m *DcimConsolePortsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimConsolePortsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimConsolePortsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimConsolePortsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimConsolePortsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimConsolePortsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody_results.go
new file mode 100644
index 0000000..d7fcd4a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_ports_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimConsolePortsListOKBodyResults dcim console ports list o k body results
+// swagger:model dcimConsolePortsListOKBodyResults
+type DcimConsolePortsListOKBodyResults []*ConsolePort
+
+// Validate validates this dcim console ports list o k body results
+func (m DcimConsolePortsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody.go
new file mode 100644
index 0000000..1b0b571
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimConsoleServerPortTemplatesListOKBody dcim console server port templates list o k body
+// swagger:model dcimConsoleServerPortTemplatesListOKBody
+type DcimConsoleServerPortTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimConsoleServerPortTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim console server port templates list o k body
+func (m *DcimConsoleServerPortTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimConsoleServerPortTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimConsoleServerPortTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimConsoleServerPortTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimConsoleServerPortTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimConsoleServerPortTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody_results.go
new file mode 100644
index 0000000..406849d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_port_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimConsoleServerPortTemplatesListOKBodyResults dcim console server port templates list o k body results
+// swagger:model dcimConsoleServerPortTemplatesListOKBodyResults
+type DcimConsoleServerPortTemplatesListOKBodyResults []*ConsoleServerPortTemplate
+
+// Validate validates this dcim console server port templates list o k body results
+func (m DcimConsoleServerPortTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody.go
new file mode 100644
index 0000000..2071f35
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimConsoleServerPortsListOKBody dcim console server ports list o k body
+// swagger:model dcimConsoleServerPortsListOKBody
+type DcimConsoleServerPortsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimConsoleServerPortsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim console server ports list o k body
+func (m *DcimConsoleServerPortsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimConsoleServerPortsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimConsoleServerPortsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimConsoleServerPortsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimConsoleServerPortsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimConsoleServerPortsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody_results.go
new file mode 100644
index 0000000..ab2dd1c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_console_server_ports_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimConsoleServerPortsListOKBodyResults dcim console server ports list o k body results
+// swagger:model dcimConsoleServerPortsListOKBodyResults
+type DcimConsoleServerPortsListOKBodyResults []*ConsoleServerPort
+
+// Validate validates this dcim console server ports list o k body results
+func (m DcimConsoleServerPortsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody.go
new file mode 100644
index 0000000..8a33f6c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimDeviceBayTemplatesListOKBody dcim device bay templates list o k body
+// swagger:model dcimDeviceBayTemplatesListOKBody
+type DcimDeviceBayTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimDeviceBayTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim device bay templates list o k body
+func (m *DcimDeviceBayTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimDeviceBayTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimDeviceBayTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimDeviceBayTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimDeviceBayTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimDeviceBayTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody_results.go
new file mode 100644
index 0000000..ed0287b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bay_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimDeviceBayTemplatesListOKBodyResults dcim device bay templates list o k body results
+// swagger:model dcimDeviceBayTemplatesListOKBodyResults
+type DcimDeviceBayTemplatesListOKBodyResults []*DeviceBayTemplate
+
+// Validate validates this dcim device bay templates list o k body results
+func (m DcimDeviceBayTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody.go
new file mode 100644
index 0000000..8227102
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimDeviceBaysListOKBody dcim device bays list o k body
+// swagger:model dcimDeviceBaysListOKBody
+type DcimDeviceBaysListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimDeviceBaysListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim device bays list o k body
+func (m *DcimDeviceBaysListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimDeviceBaysListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimDeviceBaysListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimDeviceBaysListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimDeviceBaysListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimDeviceBaysListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody_results.go
new file mode 100644
index 0000000..15655a1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_bays_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimDeviceBaysListOKBodyResults dcim device bays list o k body results
+// swagger:model dcimDeviceBaysListOKBodyResults
+type DcimDeviceBaysListOKBodyResults []*DeviceBay
+
+// Validate validates this dcim device bays list o k body results
+func (m DcimDeviceBaysListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody.go
new file mode 100644
index 0000000..1ebd30d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimDeviceRolesListOKBody dcim device roles list o k body
+// swagger:model dcimDeviceRolesListOKBody
+type DcimDeviceRolesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimDeviceRolesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim device roles list o k body
+func (m *DcimDeviceRolesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimDeviceRolesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimDeviceRolesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimDeviceRolesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimDeviceRolesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimDeviceRolesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody_results.go
new file mode 100644
index 0000000..a5f50a5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_roles_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimDeviceRolesListOKBodyResults dcim device roles list o k body results
+// swagger:model dcimDeviceRolesListOKBodyResults
+type DcimDeviceRolesListOKBodyResults []*DeviceRole
+
+// Validate validates this dcim device roles list o k body results
+func (m DcimDeviceRolesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody.go
new file mode 100644
index 0000000..24e86cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimDeviceTypesListOKBody dcim device types list o k body
+// swagger:model dcimDeviceTypesListOKBody
+type DcimDeviceTypesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimDeviceTypesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim device types list o k body
+func (m *DcimDeviceTypesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimDeviceTypesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimDeviceTypesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimDeviceTypesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimDeviceTypesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimDeviceTypesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody_results.go
new file mode 100644
index 0000000..08343bd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_device_types_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimDeviceTypesListOKBodyResults dcim device types list o k body results
+// swagger:model dcimDeviceTypesListOKBodyResults
+type DcimDeviceTypesListOKBodyResults []*DeviceType
+
+// Validate validates this dcim device types list o k body results
+func (m DcimDeviceTypesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody.go
new file mode 100644
index 0000000..068262b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimDevicesListOKBody dcim devices list o k body
+// swagger:model dcimDevicesListOKBody
+type DcimDevicesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimDevicesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim devices list o k body
+func (m *DcimDevicesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimDevicesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimDevicesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimDevicesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimDevicesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimDevicesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody_results.go
new file mode 100644
index 0000000..eddebb2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_devices_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimDevicesListOKBodyResults dcim devices list o k body results
+// swagger:model dcimDevicesListOKBodyResults
+type DcimDevicesListOKBodyResults []*Device
+
+// Validate validates this dcim devices list o k body results
+func (m DcimDevicesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody.go
new file mode 100644
index 0000000..34437c3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimInterfaceConnectionsListOKBody dcim interface connections list o k body
+// swagger:model dcimInterfaceConnectionsListOKBody
+type DcimInterfaceConnectionsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimInterfaceConnectionsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim interface connections list o k body
+func (m *DcimInterfaceConnectionsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimInterfaceConnectionsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimInterfaceConnectionsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimInterfaceConnectionsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimInterfaceConnectionsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimInterfaceConnectionsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody_results.go
new file mode 100644
index 0000000..afba2ef
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_connections_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimInterfaceConnectionsListOKBodyResults dcim interface connections list o k body results
+// swagger:model dcimInterfaceConnectionsListOKBodyResults
+type DcimInterfaceConnectionsListOKBodyResults []*InterfaceConnection
+
+// Validate validates this dcim interface connections list o k body results
+func (m DcimInterfaceConnectionsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody.go
new file mode 100644
index 0000000..32f05ee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimInterfaceTemplatesListOKBody dcim interface templates list o k body
+// swagger:model dcimInterfaceTemplatesListOKBody
+type DcimInterfaceTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimInterfaceTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim interface templates list o k body
+func (m *DcimInterfaceTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimInterfaceTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimInterfaceTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimInterfaceTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimInterfaceTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimInterfaceTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody_results.go
new file mode 100644
index 0000000..7964a72
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interface_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimInterfaceTemplatesListOKBodyResults dcim interface templates list o k body results
+// swagger:model dcimInterfaceTemplatesListOKBodyResults
+type DcimInterfaceTemplatesListOKBodyResults []*InterfaceTemplate
+
+// Validate validates this dcim interface templates list o k body results
+func (m DcimInterfaceTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody.go
new file mode 100644
index 0000000..fea5146
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimInterfacesListOKBody dcim interfaces list o k body
+// swagger:model dcimInterfacesListOKBody
+type DcimInterfacesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimInterfacesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim interfaces list o k body
+func (m *DcimInterfacesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimInterfacesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimInterfacesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimInterfacesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimInterfacesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimInterfacesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody_results.go
new file mode 100644
index 0000000..de0818f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_interfaces_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimInterfacesListOKBodyResults dcim interfaces list o k body results
+// swagger:model dcimInterfacesListOKBodyResults
+type DcimInterfacesListOKBodyResults []*Interface
+
+// Validate validates this dcim interfaces list o k body results
+func (m DcimInterfacesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody.go
new file mode 100644
index 0000000..fbb7037
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimInventoryItemsListOKBody dcim inventory items list o k body
+// swagger:model dcimInventoryItemsListOKBody
+type DcimInventoryItemsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimInventoryItemsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim inventory items list o k body
+func (m *DcimInventoryItemsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimInventoryItemsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimInventoryItemsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimInventoryItemsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimInventoryItemsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimInventoryItemsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody_results.go
new file mode 100644
index 0000000..606ff82
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_inventory_items_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimInventoryItemsListOKBodyResults dcim inventory items list o k body results
+// swagger:model dcimInventoryItemsListOKBodyResults
+type DcimInventoryItemsListOKBodyResults []*InventoryItem
+
+// Validate validates this dcim inventory items list o k body results
+func (m DcimInventoryItemsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody.go
new file mode 100644
index 0000000..887f493
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimManufacturersListOKBody dcim manufacturers list o k body
+// swagger:model dcimManufacturersListOKBody
+type DcimManufacturersListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimManufacturersListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim manufacturers list o k body
+func (m *DcimManufacturersListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimManufacturersListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimManufacturersListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimManufacturersListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimManufacturersListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimManufacturersListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody_results.go
new file mode 100644
index 0000000..e780b03
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_manufacturers_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimManufacturersListOKBodyResults dcim manufacturers list o k body results
+// swagger:model dcimManufacturersListOKBodyResults
+type DcimManufacturersListOKBodyResults []*Manufacturer
+
+// Validate validates this dcim manufacturers list o k body results
+func (m DcimManufacturersListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody.go
new file mode 100644
index 0000000..b36ae49
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPlatformsListOKBody dcim platforms list o k body
+// swagger:model dcimPlatformsListOKBody
+type DcimPlatformsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPlatformsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim platforms list o k body
+func (m *DcimPlatformsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPlatformsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPlatformsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPlatformsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPlatformsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPlatformsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody_results.go
new file mode 100644
index 0000000..4ae6d12
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_platforms_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPlatformsListOKBodyResults dcim platforms list o k body results
+// swagger:model dcimPlatformsListOKBodyResults
+type DcimPlatformsListOKBodyResults []*Platform
+
+// Validate validates this dcim platforms list o k body results
+func (m DcimPlatformsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody.go
new file mode 100644
index 0000000..b6b0dd6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPowerConnectionsListOKBody dcim power connections list o k body
+// swagger:model dcimPowerConnectionsListOKBody
+type DcimPowerConnectionsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPowerConnectionsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim power connections list o k body
+func (m *DcimPowerConnectionsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPowerConnectionsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPowerConnectionsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPowerConnectionsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPowerConnectionsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPowerConnectionsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody_results.go
new file mode 100644
index 0000000..6fb485c
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_connections_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPowerConnectionsListOKBodyResults dcim power connections list o k body results
+// swagger:model dcimPowerConnectionsListOKBodyResults
+type DcimPowerConnectionsListOKBodyResults []*PowerPort
+
+// Validate validates this dcim power connections list o k body results
+func (m DcimPowerConnectionsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody.go
new file mode 100644
index 0000000..5401da8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPowerOutletTemplatesListOKBody dcim power outlet templates list o k body
+// swagger:model dcimPowerOutletTemplatesListOKBody
+type DcimPowerOutletTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPowerOutletTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim power outlet templates list o k body
+func (m *DcimPowerOutletTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPowerOutletTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPowerOutletTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPowerOutletTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPowerOutletTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPowerOutletTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody_results.go
new file mode 100644
index 0000000..79074c1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlet_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPowerOutletTemplatesListOKBodyResults dcim power outlet templates list o k body results
+// swagger:model dcimPowerOutletTemplatesListOKBodyResults
+type DcimPowerOutletTemplatesListOKBodyResults []*PowerOutletTemplate
+
+// Validate validates this dcim power outlet templates list o k body results
+func (m DcimPowerOutletTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody.go
new file mode 100644
index 0000000..9cc35d1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPowerOutletsListOKBody dcim power outlets list o k body
+// swagger:model dcimPowerOutletsListOKBody
+type DcimPowerOutletsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPowerOutletsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim power outlets list o k body
+func (m *DcimPowerOutletsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPowerOutletsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPowerOutletsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPowerOutletsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPowerOutletsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPowerOutletsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody_results.go
new file mode 100644
index 0000000..5e7299e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_outlets_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPowerOutletsListOKBodyResults dcim power outlets list o k body results
+// swagger:model dcimPowerOutletsListOKBodyResults
+type DcimPowerOutletsListOKBodyResults []*PowerOutlet
+
+// Validate validates this dcim power outlets list o k body results
+func (m DcimPowerOutletsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody.go
new file mode 100644
index 0000000..9681270
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPowerPortTemplatesListOKBody dcim power port templates list o k body
+// swagger:model dcimPowerPortTemplatesListOKBody
+type DcimPowerPortTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPowerPortTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim power port templates list o k body
+func (m *DcimPowerPortTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPowerPortTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPowerPortTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPowerPortTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPowerPortTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPowerPortTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody_results.go
new file mode 100644
index 0000000..9363353
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_port_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPowerPortTemplatesListOKBodyResults dcim power port templates list o k body results
+// swagger:model dcimPowerPortTemplatesListOKBodyResults
+type DcimPowerPortTemplatesListOKBodyResults []*PowerPortTemplate
+
+// Validate validates this dcim power port templates list o k body results
+func (m DcimPowerPortTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody.go
new file mode 100644
index 0000000..e435e12
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimPowerPortsListOKBody dcim power ports list o k body
+// swagger:model dcimPowerPortsListOKBody
+type DcimPowerPortsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimPowerPortsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim power ports list o k body
+func (m *DcimPowerPortsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimPowerPortsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimPowerPortsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimPowerPortsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimPowerPortsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimPowerPortsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody_results.go
new file mode 100644
index 0000000..1162134
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_power_ports_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimPowerPortsListOKBodyResults dcim power ports list o k body results
+// swagger:model dcimPowerPortsListOKBodyResults
+type DcimPowerPortsListOKBodyResults []*PowerPort
+
+// Validate validates this dcim power ports list o k body results
+func (m DcimPowerPortsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody.go
new file mode 100644
index 0000000..9ef16d6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimRackGroupsListOKBody dcim rack groups list o k body
+// swagger:model dcimRackGroupsListOKBody
+type DcimRackGroupsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimRackGroupsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim rack groups list o k body
+func (m *DcimRackGroupsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimRackGroupsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimRackGroupsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimRackGroupsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimRackGroupsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimRackGroupsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody_results.go
new file mode 100644
index 0000000..50967e1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_groups_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimRackGroupsListOKBodyResults dcim rack groups list o k body results
+// swagger:model dcimRackGroupsListOKBodyResults
+type DcimRackGroupsListOKBodyResults []*RackGroup
+
+// Validate validates this dcim rack groups list o k body results
+func (m DcimRackGroupsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody.go
new file mode 100644
index 0000000..4b5d7d7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimRackReservationsListOKBody dcim rack reservations list o k body
+// swagger:model dcimRackReservationsListOKBody
+type DcimRackReservationsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimRackReservationsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim rack reservations list o k body
+func (m *DcimRackReservationsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimRackReservationsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimRackReservationsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimRackReservationsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimRackReservationsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimRackReservationsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody_results.go
new file mode 100644
index 0000000..8e8a4d1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_reservations_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimRackReservationsListOKBodyResults dcim rack reservations list o k body results
+// swagger:model dcimRackReservationsListOKBodyResults
+type DcimRackReservationsListOKBodyResults []*RackReservation
+
+// Validate validates this dcim rack reservations list o k body results
+func (m DcimRackReservationsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody.go
new file mode 100644
index 0000000..c357233
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimRackRolesListOKBody dcim rack roles list o k body
+// swagger:model dcimRackRolesListOKBody
+type DcimRackRolesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimRackRolesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim rack roles list o k body
+func (m *DcimRackRolesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimRackRolesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimRackRolesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimRackRolesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimRackRolesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimRackRolesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody_results.go
new file mode 100644
index 0000000..f594fe6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_rack_roles_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimRackRolesListOKBodyResults dcim rack roles list o k body results
+// swagger:model dcimRackRolesListOKBodyResults
+type DcimRackRolesListOKBodyResults []*RackRole
+
+// Validate validates this dcim rack roles list o k body results
+func (m DcimRackRolesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody.go
new file mode 100644
index 0000000..96cd252
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimRacksListOKBody dcim racks list o k body
+// swagger:model dcimRacksListOKBody
+type DcimRacksListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimRacksListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim racks list o k body
+func (m *DcimRacksListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimRacksListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimRacksListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimRacksListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimRacksListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimRacksListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody_results.go
new file mode 100644
index 0000000..cc7d7b8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_racks_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimRacksListOKBodyResults dcim racks list o k body results
+// swagger:model dcimRacksListOKBodyResults
+type DcimRacksListOKBodyResults []*Rack
+
+// Validate validates this dcim racks list o k body results
+func (m DcimRacksListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody.go
new file mode 100644
index 0000000..31ee20b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimRegionsListOKBody dcim regions list o k body
+// swagger:model dcimRegionsListOKBody
+type DcimRegionsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimRegionsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim regions list o k body
+func (m *DcimRegionsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimRegionsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimRegionsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimRegionsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimRegionsListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimRegionsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody_results.go
new file mode 100644
index 0000000..1514014
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_regions_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimRegionsListOKBodyResults dcim regions list o k body results
+// swagger:model dcimRegionsListOKBodyResults
+type DcimRegionsListOKBodyResults []*Region
+
+// Validate validates this dcim regions list o k body results
+func (m DcimRegionsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody.go
new file mode 100644
index 0000000..4747a37
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimSitesListOKBody dcim sites list o k body
+// swagger:model dcimSitesListOKBody
+type DcimSitesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimSitesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim sites list o k body
+func (m *DcimSitesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimSitesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimSitesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimSitesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimSitesListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimSitesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody_results.go
new file mode 100644
index 0000000..837a658
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_sites_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimSitesListOKBodyResults dcim sites list o k body results
+// swagger:model dcimSitesListOKBodyResults
+type DcimSitesListOKBodyResults []*Site
+
+// Validate validates this dcim sites list o k body results
+func (m DcimSitesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody.go
new file mode 100644
index 0000000..15c3dcf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DcimVirtualChassisListOKBody dcim virtual chassis list o k body
+// swagger:model dcimVirtualChassisListOKBody
+type DcimVirtualChassisListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results DcimVirtualChassisListOKBodyResults `json:"results"`
+}
+
+// Validate validates this dcim virtual chassis list o k body
+func (m *DcimVirtualChassisListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DcimVirtualChassisListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DcimVirtualChassisListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DcimVirtualChassisListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DcimVirtualChassisListOKBody) UnmarshalBinary(b []byte) error {
+ var res DcimVirtualChassisListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody_results.go
new file mode 100644
index 0000000..c93a342
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/dcim_virtual_chassis_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// DcimVirtualChassisListOKBodyResults dcim virtual chassis list o k body results
+// swagger:model dcimVirtualChassisListOKBodyResults
+type DcimVirtualChassisListOKBodyResults []*VirtualChassis
+
+// Validate validates this dcim virtual chassis list o k body results
+func (m DcimVirtualChassisListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device.go
new file mode 100644
index 0000000..5b4486a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device.go
@@ -0,0 +1,604 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Device device
+// swagger:model Device
+type Device struct {
+
+ // Asset tag
+ //
+ // A unique tag used to identify this device
+ // Max Length: 50
+ AssetTag string `json:"asset_tag,omitempty"`
+
+ // cluster
+ // Required: true
+ Cluster *NestedCluster `json:"cluster"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // device role
+ // Required: true
+ DeviceRole *NestedDeviceRole `json:"device_role"`
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // face
+ // Required: true
+ Face *DeviceFace `json:"face"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Max Length: 64
+ Name string `json:"name,omitempty"`
+
+ // Parent device
+ // Read Only: true
+ ParentDevice string `json:"parent_device,omitempty"`
+
+ // platform
+ // Required: true
+ Platform *NestedPlatform `json:"platform"`
+
+ // Position (U)
+ //
+ // The lowest-numbered unit occupied by the device
+ // Required: true
+ // Maximum: 32767
+ // Minimum: 1
+ Position *int64 `json:"position"`
+
+ // primary ip
+ // Required: true
+ PrimaryIP *DeviceIPAddress `json:"primary_ip"`
+
+ // primary ip4
+ // Required: true
+ PrimaryIp4 *DeviceIPAddress `json:"primary_ip4"`
+
+ // primary ip6
+ // Required: true
+ PrimaryIp6 *DeviceIPAddress `json:"primary_ip6"`
+
+ // rack
+ // Required: true
+ Rack *NestedRack `json:"rack"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // status
+ // Required: true
+ Status *DeviceStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // Vc position
+ // Required: true
+ // Maximum: 255
+ // Minimum: 0
+ VcPosition *int64 `json:"vc_position"`
+
+ // Vc priority
+ // Maximum: 255
+ // Minimum: 0
+ VcPriority *int64 `json:"vc_priority,omitempty"`
+
+ // virtual chassis
+ // Required: true
+ VirtualChassis *DeviceVirtualChassis `json:"virtual_chassis"`
+}
+
+// Validate validates this device
+func (m *Device) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAssetTag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateCluster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDeviceRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFace(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePlatform(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePosition(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIP(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIp4(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIp6(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRack(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcPosition(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcPriority(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVirtualChassis(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Device) validateAssetTag(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.AssetTag) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("asset_tag", "body", string(m.AssetTag), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validateCluster(formats strfmt.Registry) error {
+
+ if err := validate.Required("cluster", "body", m.Cluster); err != nil {
+ return err
+ }
+
+ if m.Cluster != nil {
+
+ if err := m.Cluster.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("cluster")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateDeviceRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_role", "body", m.DeviceRole); err != nil {
+ return err
+ }
+
+ if m.DeviceRole != nil {
+
+ if err := m.DeviceRole.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateFace(formats strfmt.Registry) error {
+
+ if err := validate.Required("face", "body", m.Face); err != nil {
+ return err
+ }
+
+ if m.Face != nil {
+
+ if err := m.Face.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("face")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validatePlatform(formats strfmt.Registry) error {
+
+ if err := validate.Required("platform", "body", m.Platform); err != nil {
+ return err
+ }
+
+ if m.Platform != nil {
+
+ if err := m.Platform.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("platform")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validatePosition(formats strfmt.Registry) error {
+
+ if err := validate.Required("position", "body", m.Position); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("position", "body", int64(*m.Position), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("position", "body", int64(*m.Position), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validatePrimaryIP(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip", "body", m.PrimaryIP); err != nil {
+ return err
+ }
+
+ if m.PrimaryIP != nil {
+
+ if err := m.PrimaryIP.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validatePrimaryIp4(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip4", "body", m.PrimaryIp4); err != nil {
+ return err
+ }
+
+ if m.PrimaryIp4 != nil {
+
+ if err := m.PrimaryIp4.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip4")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validatePrimaryIp6(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip6", "body", m.PrimaryIp6); err != nil {
+ return err
+ }
+
+ if m.PrimaryIp6 != nil {
+
+ if err := m.PrimaryIp6.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip6")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateRack(formats strfmt.Registry) error {
+
+ if err := validate.Required("rack", "body", m.Rack); err != nil {
+ return err
+ }
+
+ if m.Rack != nil {
+
+ if err := m.Rack.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("rack")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Device) validateVcPosition(formats strfmt.Registry) error {
+
+ if err := validate.Required("vc_position", "body", m.VcPosition); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("vc_position", "body", int64(*m.VcPosition), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vc_position", "body", int64(*m.VcPosition), 255, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validateVcPriority(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.VcPriority) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("vc_priority", "body", int64(*m.VcPriority), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vc_priority", "body", int64(*m.VcPriority), 255, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Device) validateVirtualChassis(formats strfmt.Registry) error {
+
+ if err := validate.Required("virtual_chassis", "body", m.VirtualChassis); err != nil {
+ return err
+ }
+
+ if m.VirtualChassis != nil {
+
+ if err := m.VirtualChassis.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("virtual_chassis")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Device) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Device) UnmarshalBinary(b []byte) error {
+ var res Device
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay.go
new file mode 100644
index 0000000..9843586
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceBay device bay
+// swagger:model DeviceBay
+type DeviceBay struct {
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // installed device
+ // Required: true
+ InstalledDevice *NestedDevice `json:"installed_device"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this device bay
+func (m *DeviceBay) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInstalledDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceBay) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceBay) validateInstalledDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("installed_device", "body", m.InstalledDevice); err != nil {
+ return err
+ }
+
+ if m.InstalledDevice != nil {
+
+ if err := m.InstalledDevice.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("installed_device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceBay) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceBay) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceBay) UnmarshalBinary(b []byte) error {
+ var res DeviceBay
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay_template.go
new file mode 100644
index 0000000..a88e332
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_bay_template.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceBayTemplate device bay template
+// swagger:model DeviceBayTemplate
+type DeviceBayTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this device bay template
+func (m *DeviceBayTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceBayTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceBayTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceBayTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceBayTemplate) UnmarshalBinary(b []byte) error {
+ var res DeviceBayTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_face.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_face.go
new file mode 100644
index 0000000..5b87c77
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_face.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceFace Face
+// swagger:model deviceFace
+type DeviceFace struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this device face
+func (m *DeviceFace) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceFace) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceFace) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceFace) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceFace) UnmarshalBinary(b []byte) error {
+ var res DeviceFace
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_ip_address.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_ip_address.go
new file mode 100644
index 0000000..6d265fd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_ip_address.go
@@ -0,0 +1,93 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceIPAddress Primary ip
+// swagger:model DeviceIPAddress
+type DeviceIPAddress struct {
+
+ // Address
+ //
+ // IPv4 or IPv6 address (with mask)
+ // Required: true
+ Address *string `json:"address"`
+
+ // Family
+ // Read Only: true
+ Family int64 `json:"family,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this device IP address
+func (m *DeviceIPAddress) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceIPAddress) validateAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("address", "body", m.Address); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceIPAddress) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceIPAddress) UnmarshalBinary(b []byte) error {
+ var res DeviceIPAddress
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_role.go
new file mode 100644
index 0000000..4413d05
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_role.go
@@ -0,0 +1,149 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceRole device role
+// swagger:model DeviceRole
+type DeviceRole struct {
+
+ // Color
+ // Required: true
+ // Max Length: 6
+ // Pattern: ^[0-9a-f]{6}$
+ Color *string `json:"color"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // VM Role
+ //
+ // Virtual machines may be assigned to this role
+ VMRole bool `json:"vm_role,omitempty"`
+}
+
+// Validate validates this device role
+func (m *DeviceRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateColor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceRole) validateColor(formats strfmt.Registry) error {
+
+ if err := validate.Required("color", "body", m.Color); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("color", "body", string(*m.Color), 6); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("color", "body", string(*m.Color), `^[0-9a-f]{6}$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceRole) UnmarshalBinary(b []byte) error {
+ var res DeviceRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_status.go
new file mode 100644
index 0000000..cf2f5aa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceStatus Status
+// swagger:model deviceStatus
+type DeviceStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this device status
+func (m *DeviceStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceStatus) UnmarshalBinary(b []byte) error {
+ var res DeviceStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type.go
new file mode 100644
index 0000000..e6c167a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type.go
@@ -0,0 +1,281 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceType device type
+// swagger:model DeviceType
+type DeviceType struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Instance count
+ // Read Only: true
+ InstanceCount int64 `json:"instance_count,omitempty"`
+
+ // interface ordering
+ // Required: true
+ InterfaceOrdering *DeviceTypeInterfaceOrdering `json:"interface_ordering"`
+
+ // Is a console server
+ //
+ // This type of device has console server ports
+ IsConsoleServer bool `json:"is_console_server,omitempty"`
+
+ // Is full depth
+ //
+ // Device consumes both front and rear rack faces
+ IsFullDepth bool `json:"is_full_depth,omitempty"`
+
+ // Is a network device
+ //
+ // This type of device has network interfaces
+ IsNetworkDevice bool `json:"is_network_device,omitempty"`
+
+ // Is a PDU
+ //
+ // This type of device has power outlets
+ IsPdu bool `json:"is_pdu,omitempty"`
+
+ // manufacturer
+ // Required: true
+ Manufacturer *NestedManufacturer `json:"manufacturer"`
+
+ // Model
+ // Required: true
+ // Max Length: 50
+ Model *string `json:"model"`
+
+ // Part number
+ //
+ // Discrete part number (optional)
+ // Max Length: 50
+ PartNumber string `json:"part_number,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // subdevice role
+ // Required: true
+ SubdeviceRole *DeviceTypeSubdeviceRole `json:"subdevice_role"`
+
+ // Height (U)
+ // Maximum: 32767
+ // Minimum: 0
+ UHeight *int64 `json:"u_height,omitempty"`
+}
+
+// Validate validates this device type
+func (m *DeviceType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateInterfaceOrdering(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateManufacturer(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateModel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePartNumber(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSubdeviceRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUHeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceType) validateInterfaceOrdering(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface_ordering", "body", m.InterfaceOrdering); err != nil {
+ return err
+ }
+
+ if m.InterfaceOrdering != nil {
+
+ if err := m.InterfaceOrdering.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("interface_ordering")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validateManufacturer(formats strfmt.Registry) error {
+
+ if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil {
+ return err
+ }
+
+ if m.Manufacturer != nil {
+
+ if err := m.Manufacturer.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("manufacturer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validateModel(formats strfmt.Registry) error {
+
+ if err := validate.Required("model", "body", m.Model); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("model", "body", string(*m.Model), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validatePartNumber(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PartNumber) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("part_number", "body", string(m.PartNumber), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validateSubdeviceRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("subdevice_role", "body", m.SubdeviceRole); err != nil {
+ return err
+ }
+
+ if m.SubdeviceRole != nil {
+
+ if err := m.SubdeviceRole.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("subdevice_role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *DeviceType) validateUHeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UHeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("u_height", "body", int64(*m.UHeight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("u_height", "body", int64(*m.UHeight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceType) UnmarshalBinary(b []byte) error {
+ var res DeviceType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_interface_ordering.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_interface_ordering.go
new file mode 100644
index 0000000..cc49a40
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_interface_ordering.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceTypeInterfaceOrdering Interface ordering
+// swagger:model deviceTypeInterfaceOrdering
+type DeviceTypeInterfaceOrdering struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this device type interface ordering
+func (m *DeviceTypeInterfaceOrdering) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceTypeInterfaceOrdering) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceTypeInterfaceOrdering) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceTypeInterfaceOrdering) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceTypeInterfaceOrdering) UnmarshalBinary(b []byte) error {
+ var res DeviceTypeInterfaceOrdering
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_subdevice_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_subdevice_role.go
new file mode 100644
index 0000000..10566f9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_type_subdevice_role.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceTypeSubdeviceRole Subdevice role
+// swagger:model deviceTypeSubdeviceRole
+type DeviceTypeSubdeviceRole struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *bool `json:"value"`
+}
+
+// Validate validates this device type subdevice role
+func (m *DeviceTypeSubdeviceRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceTypeSubdeviceRole) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *DeviceTypeSubdeviceRole) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceTypeSubdeviceRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceTypeSubdeviceRole) UnmarshalBinary(b []byte) error {
+ var res DeviceTypeSubdeviceRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_virtual_chassis.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_virtual_chassis.go
new file mode 100644
index 0000000..16b2841
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/device_virtual_chassis.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// DeviceVirtualChassis Virtual chassis
+// swagger:model DeviceVirtualChassis
+type DeviceVirtualChassis struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // master
+ // Required: true
+ Master *NestedDevice `json:"master"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this device virtual chassis
+func (m *DeviceVirtualChassis) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateMaster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *DeviceVirtualChassis) validateMaster(formats strfmt.Registry) error {
+
+ if err := validate.Required("master", "body", m.Master); err != nil {
+ return err
+ }
+
+ if m.Master != nil {
+
+ if err := m.Master.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("master")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *DeviceVirtualChassis) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *DeviceVirtualChassis) UnmarshalBinary(b []byte) error {
+ var res DeviceVirtualChassis
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/export_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/export_template.go
new file mode 100644
index 0000000..740c074
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/export_template.go
@@ -0,0 +1,190 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExportTemplate export template
+// swagger:model ExportTemplate
+type ExportTemplate struct {
+
+ // Content type
+ // Required: true
+ ContentType *int64 `json:"content_type"`
+
+ // Description
+ // Max Length: 200
+ Description string `json:"description,omitempty"`
+
+ // File extension
+ // Max Length: 15
+ FileExtension string `json:"file_extension,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Mime type
+ // Max Length: 15
+ MimeType string `json:"mime_type,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Template code
+ // Required: true
+ TemplateCode *string `json:"template_code"`
+}
+
+// Validate validates this export template
+func (m *ExportTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateContentType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFileExtension(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMimeType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTemplateCode(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExportTemplate) validateContentType(formats strfmt.Registry) error {
+
+ if err := validate.Required("content_type", "body", m.ContentType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExportTemplate) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 200); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExportTemplate) validateFileExtension(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.FileExtension) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("file_extension", "body", string(m.FileExtension), 15); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExportTemplate) validateMimeType(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.MimeType) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("mime_type", "body", string(m.MimeType), 15); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExportTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExportTemplate) validateTemplateCode(formats strfmt.Registry) error {
+
+ if err := validate.Required("template_code", "body", m.TemplateCode); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExportTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExportTemplate) UnmarshalBinary(b []byte) error {
+ var res ExportTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody.go
new file mode 100644
index 0000000..f5ba7a1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExtrasExportTemplatesListOKBody extras export templates list o k body
+// swagger:model extrasExportTemplatesListOKBody
+type ExtrasExportTemplatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results ExtrasExportTemplatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this extras export templates list o k body
+func (m *ExtrasExportTemplatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExtrasExportTemplatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExtrasExportTemplatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExtrasExportTemplatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExtrasExportTemplatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res ExtrasExportTemplatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody_results.go
new file mode 100644
index 0000000..db9fad6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_export_templates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ExtrasExportTemplatesListOKBodyResults extras export templates list o k body results
+// swagger:model extrasExportTemplatesListOKBodyResults
+type ExtrasExportTemplatesListOKBodyResults []*ExportTemplate
+
+// Validate validates this extras export templates list o k body results
+func (m ExtrasExportTemplatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody.go
new file mode 100644
index 0000000..7bca5ea
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExtrasGraphsListOKBody extras graphs list o k body
+// swagger:model extrasGraphsListOKBody
+type ExtrasGraphsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results ExtrasGraphsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this extras graphs list o k body
+func (m *ExtrasGraphsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExtrasGraphsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExtrasGraphsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExtrasGraphsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExtrasGraphsListOKBody) UnmarshalBinary(b []byte) error {
+ var res ExtrasGraphsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody_results.go
new file mode 100644
index 0000000..909d4a0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_graphs_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ExtrasGraphsListOKBodyResults extras graphs list o k body results
+// swagger:model extrasGraphsListOKBodyResults
+type ExtrasGraphsListOKBodyResults []*Graph
+
+// Validate validates this extras graphs list o k body results
+func (m ExtrasGraphsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody.go
new file mode 100644
index 0000000..6e0c278
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExtrasImageAttachmentsListOKBody extras image attachments list o k body
+// swagger:model extrasImageAttachmentsListOKBody
+type ExtrasImageAttachmentsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results ExtrasImageAttachmentsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this extras image attachments list o k body
+func (m *ExtrasImageAttachmentsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExtrasImageAttachmentsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExtrasImageAttachmentsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExtrasImageAttachmentsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExtrasImageAttachmentsListOKBody) UnmarshalBinary(b []byte) error {
+ var res ExtrasImageAttachmentsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody_results.go
new file mode 100644
index 0000000..b40eb83
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_image_attachments_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ExtrasImageAttachmentsListOKBodyResults extras image attachments list o k body results
+// swagger:model extrasImageAttachmentsListOKBodyResults
+type ExtrasImageAttachmentsListOKBodyResults []*ImageAttachment
+
+// Validate validates this extras image attachments list o k body results
+func (m ExtrasImageAttachmentsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody.go
new file mode 100644
index 0000000..96eeabb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExtrasRecentActivityListOKBody extras recent activity list o k body
+// swagger:model extrasRecentActivityListOKBody
+type ExtrasRecentActivityListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results ExtrasRecentActivityListOKBodyResults `json:"results"`
+}
+
+// Validate validates this extras recent activity list o k body
+func (m *ExtrasRecentActivityListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExtrasRecentActivityListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExtrasRecentActivityListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExtrasRecentActivityListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExtrasRecentActivityListOKBody) UnmarshalBinary(b []byte) error {
+ var res ExtrasRecentActivityListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody_results.go
new file mode 100644
index 0000000..2b6623f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_recent_activity_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ExtrasRecentActivityListOKBodyResults extras recent activity list o k body results
+// swagger:model extrasRecentActivityListOKBodyResults
+type ExtrasRecentActivityListOKBodyResults []*UserAction
+
+// Validate validates this extras recent activity list o k body results
+func (m ExtrasRecentActivityListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody.go
new file mode 100644
index 0000000..005d8d8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ExtrasTopologyMapsListOKBody extras topology maps list o k body
+// swagger:model extrasTopologyMapsListOKBody
+type ExtrasTopologyMapsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results ExtrasTopologyMapsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this extras topology maps list o k body
+func (m *ExtrasTopologyMapsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ExtrasTopologyMapsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ExtrasTopologyMapsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ExtrasTopologyMapsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ExtrasTopologyMapsListOKBody) UnmarshalBinary(b []byte) error {
+ var res ExtrasTopologyMapsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody_results.go
new file mode 100644
index 0000000..731cc66
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/extras_topology_maps_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ExtrasTopologyMapsListOKBodyResults extras topology maps list o k body results
+// swagger:model extrasTopologyMapsListOKBodyResults
+type ExtrasTopologyMapsListOKBodyResults []*TopologyMap
+
+// Validate validates this extras topology maps list o k body results
+func (m ExtrasTopologyMapsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph.go
new file mode 100644
index 0000000..43ca2da
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph.go
@@ -0,0 +1,192 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Graph graph
+// swagger:model Graph
+type Graph struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Link URL
+ // Max Length: 200
+ Link strfmt.URI `json:"link,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Source URL
+ // Required: true
+ // Max Length: 500
+ Source *string `json:"source"`
+
+ // type
+ // Required: true
+ Type *GraphType `json:"type"`
+
+ // Weight
+ // Maximum: 32767
+ // Minimum: 0
+ Weight *int64 `json:"weight,omitempty"`
+}
+
+// Validate validates this graph
+func (m *Graph) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLink(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSource(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateWeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Graph) validateLink(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Link) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("link", "body", string(m.Link), 200); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("link", "body", "uri", m.Link.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Graph) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Graph) validateSource(formats strfmt.Registry) error {
+
+ if err := validate.Required("source", "body", m.Source); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("source", "body", string(*m.Source), 500); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Graph) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if m.Type != nil {
+
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Graph) validateWeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Weight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Graph) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Graph) UnmarshalBinary(b []byte) error {
+ var res Graph
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph_type.go
new file mode 100644
index 0000000..62187fc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/graph_type.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// GraphType Type
+// swagger:model graphType
+type GraphType struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this graph type
+func (m *GraphType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *GraphType) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *GraphType) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *GraphType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *GraphType) UnmarshalBinary(b []byte) error {
+ var res GraphType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/image_attachment.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/image_attachment.go
new file mode 100644
index 0000000..0149233
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/image_attachment.go
@@ -0,0 +1,174 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ImageAttachment image attachment
+// swagger:model ImageAttachment
+type ImageAttachment struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.DateTime `json:"created,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Image
+ // Required: true
+ // Read Only: true
+ Image strfmt.URI `json:"image"`
+
+ // Image height
+ // Required: true
+ // Maximum: 32767
+ // Minimum: 0
+ ImageHeight *int64 `json:"image_height"`
+
+ // Image width
+ // Required: true
+ // Maximum: 32767
+ // Minimum: 0
+ ImageWidth *int64 `json:"image_width"`
+
+ // Name
+ // Max Length: 50
+ Name string `json:"name,omitempty"`
+
+ // Parent
+ // Read Only: true
+ Parent string `json:"parent,omitempty"`
+}
+
+// Validate validates this image attachment
+func (m *ImageAttachment) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateImage(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateImageHeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateImageWidth(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ImageAttachment) validateImage(formats strfmt.Registry) error {
+
+ if err := validate.Required("image", "body", strfmt.URI(m.Image)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("image", "body", "uri", m.Image.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ImageAttachment) validateImageHeight(formats strfmt.Registry) error {
+
+ if err := validate.Required("image_height", "body", m.ImageHeight); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("image_height", "body", int64(*m.ImageHeight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("image_height", "body", int64(*m.ImageHeight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ImageAttachment) validateImageWidth(formats strfmt.Registry) error {
+
+ if err := validate.Required("image_width", "body", m.ImageWidth); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("image_width", "body", int64(*m.ImageWidth), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("image_width", "body", int64(*m.ImageWidth), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ImageAttachment) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ImageAttachment) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ImageAttachment) UnmarshalBinary(b []byte) error {
+ var res ImageAttachment
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface.go
new file mode 100644
index 0000000..e36fbb4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface.go
@@ -0,0 +1,349 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Interface Interface
+// swagger:model Interface
+type Interface struct {
+
+ // circuit termination
+ // Required: true
+ CircuitTermination *InterfaceCircuitTermination `json:"circuit_termination"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // Enabled
+ Enabled bool `json:"enabled,omitempty"`
+
+ // form factor
+ // Required: true
+ FormFactor *InterfaceFormFactor `json:"form_factor"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Interface connection
+ // Read Only: true
+ InterfaceConnection string `json:"interface_connection,omitempty"`
+
+ // Is connected
+ // Read Only: true
+ IsConnected string `json:"is_connected,omitempty"`
+
+ // lag
+ // Required: true
+ Lag *NestedInterface `json:"lag"`
+
+ // MAC Address
+ MacAddress string `json:"mac_address,omitempty"`
+
+ // OOB Management
+ //
+ // This interface is used only for out-of-band management
+ MgmtOnly bool `json:"mgmt_only,omitempty"`
+
+ // mode
+ // Required: true
+ Mode *InterfaceMode `json:"mode"`
+
+ // MTU
+ // Maximum: 32767
+ // Minimum: 0
+ Mtu *int64 `json:"mtu,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // tagged vlans
+ // Required: true
+ TaggedVlans InterfaceTaggedVlans `json:"tagged_vlans"`
+
+ // untagged vlan
+ // Required: true
+ UntaggedVlan *InterfaceVLAN `json:"untagged_vlan"`
+}
+
+// Validate validates this interface
+func (m *Interface) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCircuitTermination(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFormFactor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateLag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMode(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMtu(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTaggedVlans(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUntaggedVlan(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Interface) validateCircuitTermination(formats strfmt.Registry) error {
+
+ if err := validate.Required("circuit_termination", "body", m.CircuitTermination); err != nil {
+ return err
+ }
+
+ if m.CircuitTermination != nil {
+
+ if err := m.CircuitTermination.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("circuit_termination")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Interface) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Interface) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Interface) validateFormFactor(formats strfmt.Registry) error {
+
+ if err := validate.Required("form_factor", "body", m.FormFactor); err != nil {
+ return err
+ }
+
+ if m.FormFactor != nil {
+
+ if err := m.FormFactor.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("form_factor")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Interface) validateLag(formats strfmt.Registry) error {
+
+ if err := validate.Required("lag", "body", m.Lag); err != nil {
+ return err
+ }
+
+ if m.Lag != nil {
+
+ if err := m.Lag.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("lag")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Interface) validateMode(formats strfmt.Registry) error {
+
+ if err := validate.Required("mode", "body", m.Mode); err != nil {
+ return err
+ }
+
+ if m.Mode != nil {
+
+ if err := m.Mode.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("mode")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Interface) validateMtu(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Mtu) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("mtu", "body", int64(*m.Mtu), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("mtu", "body", int64(*m.Mtu), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Interface) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Interface) validateTaggedVlans(formats strfmt.Registry) error {
+
+ if err := validate.Required("tagged_vlans", "body", m.TaggedVlans); err != nil {
+ return err
+ }
+
+ if err := m.TaggedVlans.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tagged_vlans")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Interface) validateUntaggedVlan(formats strfmt.Registry) error {
+
+ if err := validate.Required("untagged_vlan", "body", m.UntaggedVlan); err != nil {
+ return err
+ }
+
+ if m.UntaggedVlan != nil {
+
+ if err := m.UntaggedVlan.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("untagged_vlan")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Interface) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Interface) UnmarshalBinary(b []byte) error {
+ var res Interface
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_circuit_termination.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_circuit_termination.go
new file mode 100644
index 0000000..6aff3dd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_circuit_termination.go
@@ -0,0 +1,246 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceCircuitTermination Circuit termination
+// swagger:model InterfaceCircuitTermination
+type InterfaceCircuitTermination struct {
+
+ // circuit
+ // Required: true
+ Circuit *InterfaceNestedCircuit `json:"circuit"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Port speed (Kbps)
+ // Required: true
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ PortSpeed *int64 `json:"port_speed"`
+
+ // Patch panel/port(s)
+ // Max Length: 100
+ PpInfo string `json:"pp_info,omitempty"`
+
+ // Termination
+ // Required: true
+ TermSide *string `json:"term_side"`
+
+ // Upstream speed (Kbps)
+ //
+ // Upstream speed, if different from port speed
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ UpstreamSpeed *int64 `json:"upstream_speed,omitempty"`
+
+ // Cross-connect ID
+ // Max Length: 50
+ XconnectID string `json:"xconnect_id,omitempty"`
+}
+
+// Validate validates this interface circuit termination
+func (m *InterfaceCircuitTermination) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCircuit(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePortSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePpInfo(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTermSide(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUpstreamSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateXconnectID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validateCircuit(formats strfmt.Registry) error {
+
+ if err := validate.Required("circuit", "body", m.Circuit); err != nil {
+ return err
+ }
+
+ if m.Circuit != nil {
+
+ if err := m.Circuit.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("circuit")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validatePortSpeed(formats strfmt.Registry) error {
+
+ if err := validate.Required("port_speed", "body", m.PortSpeed); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("port_speed", "body", int64(*m.PortSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("port_speed", "body", int64(*m.PortSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validatePpInfo(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PpInfo) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("pp_info", "body", string(m.PpInfo), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var interfaceCircuitTerminationTypeTermSidePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["A","Z"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ interfaceCircuitTerminationTypeTermSidePropEnum = append(interfaceCircuitTerminationTypeTermSidePropEnum, v)
+ }
+}
+
+const (
+ // InterfaceCircuitTerminationTermSideA captures enum value "A"
+ InterfaceCircuitTerminationTermSideA string = "A"
+ // InterfaceCircuitTerminationTermSideZ captures enum value "Z"
+ InterfaceCircuitTerminationTermSideZ string = "Z"
+)
+
+// prop value enum
+func (m *InterfaceCircuitTermination) validateTermSideEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, interfaceCircuitTerminationTypeTermSidePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validateTermSide(formats strfmt.Registry) error {
+
+ if err := validate.Required("term_side", "body", m.TermSide); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateTermSideEnum("term_side", "body", *m.TermSide); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validateUpstreamSpeed(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UpstreamSpeed) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceCircuitTermination) validateXconnectID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.XconnectID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("xconnect_id", "body", string(m.XconnectID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceCircuitTermination) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceCircuitTermination) UnmarshalBinary(b []byte) error {
+ var res InterfaceCircuitTermination
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection.go
new file mode 100644
index 0000000..bfd036d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection.go
@@ -0,0 +1,149 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceConnection interface connection
+// swagger:model InterfaceConnection
+type InterfaceConnection struct {
+
+ // connection status
+ // Required: true
+ ConnectionStatus *InterfaceConnectionConnectionStatus `json:"connection_status"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // interface a
+ // Required: true
+ InterfaceA *PeerInterface `json:"interface_a"`
+
+ // interface b
+ // Required: true
+ InterfaceB *PeerInterface `json:"interface_b"`
+}
+
+// Validate validates this interface connection
+func (m *InterfaceConnection) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterfaceA(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterfaceB(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceConnection) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ if m.ConnectionStatus != nil {
+
+ if err := m.ConnectionStatus.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("connection_status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InterfaceConnection) validateInterfaceA(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface_a", "body", m.InterfaceA); err != nil {
+ return err
+ }
+
+ if m.InterfaceA != nil {
+
+ if err := m.InterfaceA.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("interface_a")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InterfaceConnection) validateInterfaceB(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface_b", "body", m.InterfaceB); err != nil {
+ return err
+ }
+
+ if m.InterfaceB != nil {
+
+ if err := m.InterfaceB.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("interface_b")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceConnection) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceConnection) UnmarshalBinary(b []byte) error {
+ var res InterfaceConnection
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection_connection_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection_connection_status.go
new file mode 100644
index 0000000..37766d7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_connection_connection_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceConnectionConnectionStatus Connection status
+// swagger:model interfaceConnectionConnectionStatus
+type InterfaceConnectionConnectionStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *bool `json:"value"`
+}
+
+// Validate validates this interface connection connection status
+func (m *InterfaceConnectionConnectionStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceConnectionConnectionStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceConnectionConnectionStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceConnectionConnectionStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceConnectionConnectionStatus) UnmarshalBinary(b []byte) error {
+ var res InterfaceConnectionConnectionStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_form_factor.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_form_factor.go
new file mode 100644
index 0000000..bfb96b7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_form_factor.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceFormFactor Form factor
+// swagger:model interfaceFormFactor
+type InterfaceFormFactor struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this interface form factor
+func (m *InterfaceFormFactor) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceFormFactor) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceFormFactor) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceFormFactor) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceFormFactor) UnmarshalBinary(b []byte) error {
+ var res InterfaceFormFactor
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_mode.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_mode.go
new file mode 100644
index 0000000..417aa81
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_mode.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceMode Mode
+// swagger:model interfaceMode
+type InterfaceMode struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this interface mode
+func (m *InterfaceMode) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceMode) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceMode) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceMode) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceMode) UnmarshalBinary(b []byte) error {
+ var res InterfaceMode
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_nested_circuit.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_nested_circuit.go
new file mode 100644
index 0000000..9f1bca8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_nested_circuit.go
@@ -0,0 +1,92 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceNestedCircuit Circuit
+// swagger:model InterfaceNestedCircuit
+type InterfaceNestedCircuit struct {
+
+ // Circuit ID
+ // Required: true
+ // Max Length: 50
+ Cid *string `json:"cid"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this interface nested circuit
+func (m *InterfaceNestedCircuit) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceNestedCircuit) validateCid(formats strfmt.Registry) error {
+
+ if err := validate.Required("cid", "body", m.Cid); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("cid", "body", string(*m.Cid), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceNestedCircuit) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceNestedCircuit) UnmarshalBinary(b []byte) error {
+ var res InterfaceNestedCircuit
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_tagged_vlans.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_tagged_vlans.go
new file mode 100644
index 0000000..8771a55
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_tagged_vlans.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// InterfaceTaggedVlans interface tagged vlans
+// swagger:model interfaceTaggedVlans
+type InterfaceTaggedVlans []*InterfaceVLAN
+
+// Validate validates this interface tagged vlans
+func (m InterfaceTaggedVlans) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template.go
new file mode 100644
index 0000000..d3f7ed8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template.go
@@ -0,0 +1,147 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceTemplate interface template
+// swagger:model InterfaceTemplate
+type InterfaceTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // form factor
+ // Required: true
+ FormFactor *InterfaceTemplateFormFactor `json:"form_factor"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Management only
+ MgmtOnly bool `json:"mgmt_only,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+}
+
+// Validate validates this interface template
+func (m *InterfaceTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFormFactor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InterfaceTemplate) validateFormFactor(formats strfmt.Registry) error {
+
+ if err := validate.Required("form_factor", "body", m.FormFactor); err != nil {
+ return err
+ }
+
+ if m.FormFactor != nil {
+
+ if err := m.FormFactor.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("form_factor")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InterfaceTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceTemplate) UnmarshalBinary(b []byte) error {
+ var res InterfaceTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template_form_factor.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template_form_factor.go
new file mode 100644
index 0000000..89e8a1f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_template_form_factor.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceTemplateFormFactor Form factor
+// swagger:model interfaceTemplateFormFactor
+type InterfaceTemplateFormFactor struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this interface template form factor
+func (m *InterfaceTemplateFormFactor) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceTemplateFormFactor) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceTemplateFormFactor) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceTemplateFormFactor) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceTemplateFormFactor) UnmarshalBinary(b []byte) error {
+ var res InterfaceTemplateFormFactor
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_vlan.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_vlan.go
new file mode 100644
index 0000000..99d4154
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/interface_vlan.go
@@ -0,0 +1,124 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InterfaceVLAN Untagged vlan
+// swagger:model InterfaceVLAN
+type InterfaceVLAN struct {
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+
+ // ID
+ // Required: true
+ // Maximum: 4094
+ // Minimum: 1
+ Vid *int64 `json:"vid"`
+}
+
+// Validate validates this interface v l a n
+func (m *InterfaceVLAN) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InterfaceVLAN) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InterfaceVLAN) validateVid(formats strfmt.Registry) error {
+
+ if err := validate.Required("vid", "body", m.Vid); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("vid", "body", int64(*m.Vid), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vid", "body", int64(*m.Vid), 4094, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InterfaceVLAN) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InterfaceVLAN) UnmarshalBinary(b []byte) error {
+ var res InterfaceVLAN
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/inventory_item.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/inventory_item.go
new file mode 100644
index 0000000..3b7883b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/inventory_item.go
@@ -0,0 +1,255 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// InventoryItem inventory item
+// swagger:model InventoryItem
+type InventoryItem struct {
+
+ // Asset tag
+ //
+ // A unique tag used to identify this item
+ // Max Length: 50
+ AssetTag string `json:"asset_tag,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // Discovered
+ Discovered bool `json:"discovered,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // manufacturer
+ // Required: true
+ Manufacturer *NestedManufacturer `json:"manufacturer"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Parent
+ // Required: true
+ Parent *int64 `json:"parent"`
+
+ // Part ID
+ // Max Length: 50
+ PartID string `json:"part_id,omitempty"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+}
+
+// Validate validates this inventory item
+func (m *InventoryItem) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAssetTag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateManufacturer(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateParent(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePartID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *InventoryItem) validateAssetTag(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.AssetTag) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("asset_tag", "body", string(m.AssetTag), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateManufacturer(formats strfmt.Registry) error {
+
+ if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil {
+ return err
+ }
+
+ if m.Manufacturer != nil {
+
+ if err := m.Manufacturer.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("manufacturer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateParent(formats strfmt.Registry) error {
+
+ if err := validate.Required("parent", "body", m.Parent); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validatePartID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PartID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("part_id", "body", string(m.PartID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *InventoryItem) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *InventoryItem) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *InventoryItem) UnmarshalBinary(b []byte) error {
+ var res InventoryItem
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address.go
new file mode 100644
index 0000000..32c582d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address.go
@@ -0,0 +1,318 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAddress IP address
+// swagger:model IPAddress
+type IPAddress struct {
+
+ // Address
+ //
+ // IPv4 or IPv6 address (with mask)
+ // Required: true
+ Address *string `json:"address"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Family
+ // Read Only: true
+ Family int64 `json:"family,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // interface
+ // Required: true
+ Interface *IPAddressInterface `json:"interface"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // nat inside
+ // Required: true
+ NatInside *NestedIPAddress `json:"nat_inside"`
+
+ // nat outside
+ // Required: true
+ NatOutside *NestedIPAddress `json:"nat_outside"`
+
+ // role
+ // Required: true
+ Role *IPAddressRole `json:"role"`
+
+ // status
+ // Required: true
+ Status *IPAddressStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // vrf
+ // Required: true
+ Vrf *NestedVRF `json:"vrf"`
+}
+
+// Validate validates this IP address
+func (m *IPAddress) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterface(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateNatInside(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateNatOutside(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVrf(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAddress) validateAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("address", "body", m.Address); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateInterface(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface", "body", m.Interface); err != nil {
+ return err
+ }
+
+ if m.Interface != nil {
+
+ if err := m.Interface.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("interface")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateNatInside(formats strfmt.Registry) error {
+
+ if err := validate.Required("nat_inside", "body", m.NatInside); err != nil {
+ return err
+ }
+
+ if m.NatInside != nil {
+
+ if err := m.NatInside.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("nat_inside")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateNatOutside(formats strfmt.Registry) error {
+
+ if err := validate.Required("nat_outside", "body", m.NatOutside); err != nil {
+ return err
+ }
+
+ if m.NatOutside != nil {
+
+ if err := m.NatOutside.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("nat_outside")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddress) validateVrf(formats strfmt.Registry) error {
+
+ if err := validate.Required("vrf", "body", m.Vrf); err != nil {
+ return err
+ }
+
+ if m.Vrf != nil {
+
+ if err := m.Vrf.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("vrf")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAddress) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAddress) UnmarshalBinary(b []byte) error {
+ var res IPAddress
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_interface.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_interface.go
new file mode 100644
index 0000000..4138ae4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_interface.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAddressInterface Interface
+// swagger:model IPAddressInterface
+type IPAddressInterface struct {
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL string `json:"url,omitempty"`
+
+ // virtual machine
+ // Required: true
+ VirtualMachine *NestedVirtualMachine `json:"virtual_machine"`
+}
+
+// Validate validates this IP address interface
+func (m *IPAddressInterface) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVirtualMachine(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAddressInterface) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *IPAddressInterface) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAddressInterface) validateVirtualMachine(formats strfmt.Registry) error {
+
+ if err := validate.Required("virtual_machine", "body", m.VirtualMachine); err != nil {
+ return err
+ }
+
+ if m.VirtualMachine != nil {
+
+ if err := m.VirtualMachine.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("virtual_machine")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAddressInterface) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAddressInterface) UnmarshalBinary(b []byte) error {
+ var res IPAddressInterface
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_role.go
new file mode 100644
index 0000000..cd8441e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_role.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAddressRole Role
+// swagger:model ipAddressRole
+type IPAddressRole struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this ip address role
+func (m *IPAddressRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAddressRole) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAddressRole) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAddressRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAddressRole) UnmarshalBinary(b []byte) error {
+ var res IPAddressRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_status.go
new file mode 100644
index 0000000..54ec03e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_address_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAddressStatus Status
+// swagger:model ipAddressStatus
+type IPAddressStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this ip address status
+func (m *IPAddressStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAddressStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAddressStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAddressStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAddressStatus) UnmarshalBinary(b []byte) error {
+ var res IPAddressStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody.go
new file mode 100644
index 0000000..e43ff0a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMAggregatesListOKBody ipam aggregates list o k body
+// swagger:model ipamAggregatesListOKBody
+type IPAMAggregatesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMAggregatesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam aggregates list o k body
+func (m *IPAMAggregatesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMAggregatesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMAggregatesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMAggregatesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMAggregatesListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMAggregatesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody_results.go
new file mode 100644
index 0000000..e93c2aa
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amaggregates_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMAggregatesListOKBodyResults ipam aggregates list o k body results
+// swagger:model ipamAggregatesListOKBodyResults
+type IPAMAggregatesListOKBodyResults []*Aggregate
+
+// Validate validates this ipam aggregates list o k body results
+func (m IPAMAggregatesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody.go
new file mode 100644
index 0000000..3453bfd
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMIPAddressesListOKBody ipam Ip addresses list o k body
+// swagger:model ipamIpAddressesListOKBody
+type IPAMIPAddressesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMIPAddressesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam Ip addresses list o k body
+func (m *IPAMIPAddressesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMIPAddressesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMIPAddressesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMIPAddressesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMIPAddressesListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMIPAddressesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody_results.go
new file mode 100644
index 0000000..86968c6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amip_addresses_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMIPAddressesListOKBodyResults ipam Ip addresses list o k body results
+// swagger:model ipamIpAddressesListOKBodyResults
+type IPAMIPAddressesListOKBodyResults []*IPAddress
+
+// Validate validates this ipam Ip addresses list o k body results
+func (m IPAMIPAddressesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody.go
new file mode 100644
index 0000000..3a0455f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMPrefixesListOKBody ipam prefixes list o k body
+// swagger:model ipamPrefixesListOKBody
+type IPAMPrefixesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMPrefixesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam prefixes list o k body
+func (m *IPAMPrefixesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMPrefixesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMPrefixesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMPrefixesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMPrefixesListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMPrefixesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody_results.go
new file mode 100644
index 0000000..7d5ae3a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amprefixes_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMPrefixesListOKBodyResults ipam prefixes list o k body results
+// swagger:model ipamPrefixesListOKBodyResults
+type IPAMPrefixesListOKBodyResults []*Prefix
+
+// Validate validates this ipam prefixes list o k body results
+func (m IPAMPrefixesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody.go
new file mode 100644
index 0000000..97aab23
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMRirsListOKBody ipam rirs list o k body
+// swagger:model ipamRirsListOKBody
+type IPAMRirsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMRirsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam rirs list o k body
+func (m *IPAMRirsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMRirsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMRirsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMRirsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMRirsListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMRirsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody_results.go
new file mode 100644
index 0000000..a817774
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amrirs_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMRirsListOKBodyResults ipam rirs list o k body results
+// swagger:model ipamRirsListOKBodyResults
+type IPAMRirsListOKBodyResults []*RIR
+
+// Validate validates this ipam rirs list o k body results
+func (m IPAMRirsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody.go
new file mode 100644
index 0000000..044fa6b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMRolesListOKBody ipam roles list o k body
+// swagger:model ipamRolesListOKBody
+type IPAMRolesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMRolesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam roles list o k body
+func (m *IPAMRolesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMRolesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMRolesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMRolesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMRolesListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMRolesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody_results.go
new file mode 100644
index 0000000..eda1619
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amroles_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMRolesListOKBodyResults ipam roles list o k body results
+// swagger:model ipamRolesListOKBodyResults
+type IPAMRolesListOKBodyResults []*Role
+
+// Validate validates this ipam roles list o k body results
+func (m IPAMRolesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody.go
new file mode 100644
index 0000000..43866d0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMServicesListOKBody ipam services list o k body
+// swagger:model ipamServicesListOKBody
+type IPAMServicesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMServicesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam services list o k body
+func (m *IPAMServicesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMServicesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMServicesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMServicesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMServicesListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMServicesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody_results.go
new file mode 100644
index 0000000..6b88015
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amservices_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMServicesListOKBodyResults ipam services list o k body results
+// swagger:model ipamServicesListOKBodyResults
+type IPAMServicesListOKBodyResults []*Service
+
+// Validate validates this ipam services list o k body results
+func (m IPAMServicesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody.go
new file mode 100644
index 0000000..c423bca
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMVlanGroupsListOKBody ipam vlan groups list o k body
+// swagger:model ipamVlanGroupsListOKBody
+type IPAMVlanGroupsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMVlanGroupsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam vlan groups list o k body
+func (m *IPAMVlanGroupsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMVlanGroupsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMVlanGroupsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMVlanGroupsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMVlanGroupsListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMVlanGroupsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody_results.go
new file mode 100644
index 0000000..eca9774
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlan_groups_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMVlanGroupsListOKBodyResults ipam vlan groups list o k body results
+// swagger:model ipamVlanGroupsListOKBodyResults
+type IPAMVlanGroupsListOKBodyResults []*VLANGroup
+
+// Validate validates this ipam vlan groups list o k body results
+func (m IPAMVlanGroupsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody.go
new file mode 100644
index 0000000..7154bca
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMVlansListOKBody ipam vlans list o k body
+// swagger:model ipamVlansListOKBody
+type IPAMVlansListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMVlansListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam vlans list o k body
+func (m *IPAMVlansListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMVlansListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMVlansListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMVlansListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMVlansListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMVlansListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody_results.go
new file mode 100644
index 0000000..86a1ba0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvlans_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMVlansListOKBodyResults ipam vlans list o k body results
+// swagger:model ipamVlansListOKBodyResults
+type IPAMVlansListOKBodyResults []*VLAN
+
+// Validate validates this ipam vlans list o k body results
+func (m IPAMVlansListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody.go
new file mode 100644
index 0000000..5fefe55
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// IPAMVrfsListOKBody ipam vrfs list o k body
+// swagger:model ipamVrfsListOKBody
+type IPAMVrfsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results IPAMVrfsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this ipam vrfs list o k body
+func (m *IPAMVrfsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *IPAMVrfsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *IPAMVrfsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *IPAMVrfsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *IPAMVrfsListOKBody) UnmarshalBinary(b []byte) error {
+ var res IPAMVrfsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody_results.go
new file mode 100644
index 0000000..7d069d8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/ip_amvrfs_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// IPAMVrfsListOKBodyResults ipam vrfs list o k body results
+// swagger:model ipamVrfsListOKBodyResults
+type IPAMVrfsListOKBodyResults []*VRF
+
+// Validate validates this ipam vrfs list o k body results
+func (m IPAMVrfsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/manufacturer.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/manufacturer.go
new file mode 100644
index 0000000..9f4f211
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/manufacturer.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Manufacturer manufacturer
+// swagger:model Manufacturer
+type Manufacturer struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this manufacturer
+func (m *Manufacturer) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Manufacturer) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Manufacturer) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Manufacturer) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Manufacturer) UnmarshalBinary(b []byte) error {
+ var res Manufacturer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit.go
new file mode 100644
index 0000000..14a77d9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit.go
@@ -0,0 +1,92 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedCircuit Circuit
+// swagger:model NestedCircuit
+type NestedCircuit struct {
+
+ // Circuit ID
+ // Required: true
+ // Max Length: 50
+ Cid *string `json:"cid"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested circuit
+func (m *NestedCircuit) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedCircuit) validateCid(formats strfmt.Registry) error {
+
+ if err := validate.Required("cid", "body", m.Cid); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("cid", "body", string(*m.Cid), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedCircuit) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedCircuit) UnmarshalBinary(b []byte) error {
+ var res NestedCircuit
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit_type.go
new file mode 100644
index 0000000..b85491e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_circuit_type.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedCircuitType Type
+// swagger:model NestedCircuitType
+type NestedCircuitType struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested circuit type
+func (m *NestedCircuitType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedCircuitType) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedCircuitType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedCircuitType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedCircuitType) UnmarshalBinary(b []byte) error {
+ var res NestedCircuitType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster.go
new file mode 100644
index 0000000..01f2973
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster.go
@@ -0,0 +1,92 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedCluster Cluster
+// swagger:model NestedCluster
+type NestedCluster struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested cluster
+func (m *NestedCluster) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedCluster) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedCluster) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedCluster) UnmarshalBinary(b []byte) error {
+ var res NestedCluster
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_group.go
new file mode 100644
index 0000000..8ecd05e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_group.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedClusterGroup Group
+// swagger:model NestedClusterGroup
+type NestedClusterGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested cluster group
+func (m *NestedClusterGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedClusterGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedClusterGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedClusterGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedClusterGroup) UnmarshalBinary(b []byte) error {
+ var res NestedClusterGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_type.go
new file mode 100644
index 0000000..37e547b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_cluster_type.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedClusterType Type
+// swagger:model NestedClusterType
+type NestedClusterType struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested cluster type
+func (m *NestedClusterType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedClusterType) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedClusterType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedClusterType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedClusterType) UnmarshalBinary(b []byte) error {
+ var res NestedClusterType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device.go
new file mode 100644
index 0000000..4d562a8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device.go
@@ -0,0 +1,95 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedDevice Device
+// swagger:model NestedDevice
+type NestedDevice struct {
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Max Length: 64
+ Name string `json:"name,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested device
+func (m *NestedDevice) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedDevice) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedDevice) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedDevice) UnmarshalBinary(b []byte) error {
+ var res NestedDevice
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_role.go
new file mode 100644
index 0000000..f1fc28e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_role.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedDeviceRole Device role
+// swagger:model NestedDeviceRole
+type NestedDeviceRole struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested device role
+func (m *NestedDeviceRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedDeviceRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedDeviceRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedDeviceRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedDeviceRole) UnmarshalBinary(b []byte) error {
+ var res NestedDeviceRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_type.go
new file mode 100644
index 0000000..1fb87ee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_device_type.go
@@ -0,0 +1,148 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedDeviceType Device type
+// swagger:model NestedDeviceType
+type NestedDeviceType struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // manufacturer
+ // Required: true
+ Manufacturer *NestedManufacturer `json:"manufacturer"`
+
+ // Model
+ // Required: true
+ // Max Length: 50
+ Model *string `json:"model"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested device type
+func (m *NestedDeviceType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateManufacturer(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateModel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedDeviceType) validateManufacturer(formats strfmt.Registry) error {
+
+ if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil {
+ return err
+ }
+
+ if m.Manufacturer != nil {
+
+ if err := m.Manufacturer.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("manufacturer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *NestedDeviceType) validateModel(formats strfmt.Registry) error {
+
+ if err := validate.Required("model", "body", m.Model); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("model", "body", string(*m.Model), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedDeviceType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedDeviceType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedDeviceType) UnmarshalBinary(b []byte) error {
+ var res NestedDeviceType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_interface.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_interface.go
new file mode 100644
index 0000000..f764ad9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_interface.go
@@ -0,0 +1,92 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedInterface Lag
+// swagger:model NestedInterface
+type NestedInterface struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested interface
+func (m *NestedInterface) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedInterface) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedInterface) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedInterface) UnmarshalBinary(b []byte) error {
+ var res NestedInterface
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_ip_address.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_ip_address.go
new file mode 100644
index 0000000..b4cf100
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_ip_address.go
@@ -0,0 +1,93 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedIPAddress Nat inside
+// swagger:model NestedIPAddress
+type NestedIPAddress struct {
+
+ // Address
+ //
+ // IPv4 or IPv6 address (with mask)
+ // Required: true
+ Address *string `json:"address"`
+
+ // Family
+ // Read Only: true
+ Family int64 `json:"family,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested IP address
+func (m *NestedIPAddress) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedIPAddress) validateAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("address", "body", m.Address); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedIPAddress) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedIPAddress) UnmarshalBinary(b []byte) error {
+ var res NestedIPAddress
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_manufacturer.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_manufacturer.go
new file mode 100644
index 0000000..a0868af
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_manufacturer.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedManufacturer Manufacturer
+// swagger:model NestedManufacturer
+type NestedManufacturer struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested manufacturer
+func (m *NestedManufacturer) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedManufacturer) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedManufacturer) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedManufacturer) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedManufacturer) UnmarshalBinary(b []byte) error {
+ var res NestedManufacturer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_platform.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_platform.go
new file mode 100644
index 0000000..25e19ce
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_platform.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedPlatform Platform
+// swagger:model NestedPlatform
+type NestedPlatform struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested platform
+func (m *NestedPlatform) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedPlatform) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedPlatform) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedPlatform) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedPlatform) UnmarshalBinary(b []byte) error {
+ var res NestedPlatform
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_provider.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_provider.go
new file mode 100644
index 0000000..2fa4752
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_provider.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedProvider Provider
+// swagger:model NestedProvider
+type NestedProvider struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested provider
+func (m *NestedProvider) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedProvider) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedProvider) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedProvider) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedProvider) UnmarshalBinary(b []byte) error {
+ var res NestedProvider
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack.go
new file mode 100644
index 0000000..08c5b42
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack.go
@@ -0,0 +1,96 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRack Rack
+// swagger:model NestedRack
+type NestedRack struct {
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested rack
+func (m *NestedRack) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRack) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRack) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRack) UnmarshalBinary(b []byte) error {
+ var res NestedRack
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_group.go
new file mode 100644
index 0000000..0f736ff
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_group.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRackGroup Group
+// swagger:model NestedRackGroup
+type NestedRackGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested rack group
+func (m *NestedRackGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRackGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedRackGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRackGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRackGroup) UnmarshalBinary(b []byte) error {
+ var res NestedRackGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_role.go
new file mode 100644
index 0000000..191fe3a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rack_role.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRackRole Role
+// swagger:model NestedRackRole
+type NestedRackRole struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested rack role
+func (m *NestedRackRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRackRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedRackRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRackRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRackRole) UnmarshalBinary(b []byte) error {
+ var res NestedRackRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_region.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_region.go
new file mode 100644
index 0000000..0945a67
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_region.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRegion Parent
+// swagger:model NestedRegion
+type NestedRegion struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested region
+func (m *NestedRegion) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRegion) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedRegion) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRegion) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRegion) UnmarshalBinary(b []byte) error {
+ var res NestedRegion
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rir.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rir.go
new file mode 100644
index 0000000..33c67b4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_rir.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRIR Rir
+// swagger:model NestedRIR
+type NestedRIR struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested r i r
+func (m *NestedRIR) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRIR) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedRIR) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRIR) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRIR) UnmarshalBinary(b []byte) error {
+ var res NestedRIR
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_role.go
new file mode 100644
index 0000000..8486baf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_role.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedRole Role
+// swagger:model NestedRole
+type NestedRole struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested role
+func (m *NestedRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedRole) UnmarshalBinary(b []byte) error {
+ var res NestedRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_secret_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_secret_role.go
new file mode 100644
index 0000000..ce948db
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_secret_role.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedSecretRole Role
+// swagger:model NestedSecretRole
+type NestedSecretRole struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested secret role
+func (m *NestedSecretRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedSecretRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedSecretRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedSecretRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedSecretRole) UnmarshalBinary(b []byte) error {
+ var res NestedSecretRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_site.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_site.go
new file mode 100644
index 0000000..3a3a7cb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_site.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedSite Site
+// swagger:model NestedSite
+type NestedSite struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested site
+func (m *NestedSite) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedSite) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedSite) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedSite) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedSite) UnmarshalBinary(b []byte) error {
+ var res NestedSite
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant.go
new file mode 100644
index 0000000..149c6b5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedTenant Tenant
+// swagger:model NestedTenant
+type NestedTenant struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 30
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested tenant
+func (m *NestedTenant) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedTenant) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedTenant) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedTenant) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedTenant) UnmarshalBinary(b []byte) error {
+ var res NestedTenant
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant_group.go
new file mode 100644
index 0000000..a31c47a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_tenant_group.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedTenantGroup Group
+// swagger:model NestedTenantGroup
+type NestedTenantGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested tenant group
+func (m *NestedTenantGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedTenantGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedTenantGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedTenantGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedTenantGroup) UnmarshalBinary(b []byte) error {
+ var res NestedTenantGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_user.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_user.go
new file mode 100644
index 0000000..aaf5c83
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_user.go
@@ -0,0 +1,95 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedUser User
+// swagger:model NestedUser
+type NestedUser struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Username
+ //
+ // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
+ // Required: true
+ // Max Length: 150
+ // Pattern: ^[\w.@+-]+$
+ Username *string `json:"username"`
+}
+
+// Validate validates this nested user
+func (m *NestedUser) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateUsername(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedUser) validateUsername(formats strfmt.Registry) error {
+
+ if err := validate.Required("username", "body", m.Username); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("username", "body", string(*m.Username), 150); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("username", "body", string(*m.Username), `^[\w.@+-]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedUser) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedUser) UnmarshalBinary(b []byte) error {
+ var res NestedUser
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_virtual_machine.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_virtual_machine.go
new file mode 100644
index 0000000..0068bfb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_virtual_machine.go
@@ -0,0 +1,92 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedVirtualMachine Virtual machine
+// swagger:model NestedVirtualMachine
+type NestedVirtualMachine struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested virtual machine
+func (m *NestedVirtualMachine) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedVirtualMachine) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedVirtualMachine) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedVirtualMachine) UnmarshalBinary(b []byte) error {
+ var res NestedVirtualMachine
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlan.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlan.go
new file mode 100644
index 0000000..a9b0dc5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlan.go
@@ -0,0 +1,124 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedVLAN Vlan
+// swagger:model NestedVLAN
+type NestedVLAN struct {
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+
+ // ID
+ // Required: true
+ // Maximum: 4094
+ // Minimum: 1
+ Vid *int64 `json:"vid"`
+}
+
+// Validate validates this nested v l a n
+func (m *NestedVLAN) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedVLAN) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedVLAN) validateVid(formats strfmt.Registry) error {
+
+ if err := validate.Required("vid", "body", m.Vid); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("vid", "body", int64(*m.Vid), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vid", "body", int64(*m.Vid), 4094, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedVLAN) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedVLAN) UnmarshalBinary(b []byte) error {
+ var res NestedVLAN
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlangroup.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlangroup.go
new file mode 100644
index 0000000..89b2498
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vlangroup.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedVLANGroup Group
+// swagger:model NestedVLANGroup
+type NestedVLANGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested v l a n group
+func (m *NestedVLANGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedVLANGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedVLANGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedVLANGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedVLANGroup) UnmarshalBinary(b []byte) error {
+ var res NestedVLANGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vrf.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vrf.go
new file mode 100644
index 0000000..d7c0556
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/nested_vrf.go
@@ -0,0 +1,115 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// NestedVRF Vrf
+// swagger:model NestedVRF
+type NestedVRF struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Route distinguisher
+ // Required: true
+ // Max Length: 21
+ Rd *string `json:"rd"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this nested v r f
+func (m *NestedVRF) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRd(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *NestedVRF) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *NestedVRF) validateRd(formats strfmt.Registry) error {
+
+ if err := validate.Required("rd", "body", m.Rd); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("rd", "body", string(*m.Rd), 21); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *NestedVRF) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *NestedVRF) UnmarshalBinary(b []byte) error {
+ var res NestedVRF
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface.go
new file mode 100644
index 0000000..c10a366
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface.go
@@ -0,0 +1,236 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PeerInterface Interface a
+// swagger:model PeerInterface
+type PeerInterface struct {
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // Enabled
+ Enabled bool `json:"enabled,omitempty"`
+
+ // form factor
+ // Required: true
+ FormFactor *PeerInterfaceFormFactor `json:"form_factor"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // lag
+ // Required: true
+ Lag *NestedInterface `json:"lag"`
+
+ // MAC Address
+ MacAddress string `json:"mac_address,omitempty"`
+
+ // OOB Management
+ //
+ // This interface is used only for out-of-band management
+ MgmtOnly bool `json:"mgmt_only,omitempty"`
+
+ // MTU
+ // Maximum: 32767
+ // Minimum: 0
+ Mtu *int64 `json:"mtu,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this peer interface
+func (m *PeerInterface) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFormFactor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateLag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMtu(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PeerInterface) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PeerInterface) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PeerInterface) validateFormFactor(formats strfmt.Registry) error {
+
+ if err := validate.Required("form_factor", "body", m.FormFactor); err != nil {
+ return err
+ }
+
+ if m.FormFactor != nil {
+
+ if err := m.FormFactor.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("form_factor")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PeerInterface) validateLag(formats strfmt.Registry) error {
+
+ if err := validate.Required("lag", "body", m.Lag); err != nil {
+ return err
+ }
+
+ if m.Lag != nil {
+
+ if err := m.Lag.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("lag")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PeerInterface) validateMtu(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Mtu) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("mtu", "body", int64(*m.Mtu), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("mtu", "body", int64(*m.Mtu), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PeerInterface) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PeerInterface) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PeerInterface) UnmarshalBinary(b []byte) error {
+ var res PeerInterface
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface_form_factor.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface_form_factor.go
new file mode 100644
index 0000000..9964edc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/peer_interface_form_factor.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PeerInterfaceFormFactor Form factor
+// swagger:model peerInterfaceFormFactor
+type PeerInterfaceFormFactor struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this peer interface form factor
+func (m *PeerInterfaceFormFactor) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PeerInterfaceFormFactor) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PeerInterfaceFormFactor) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PeerInterfaceFormFactor) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PeerInterfaceFormFactor) UnmarshalBinary(b []byte) error {
+ var res PeerInterfaceFormFactor
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/platform.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/platform.go
new file mode 100644
index 0000000..64e0074
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/platform.go
@@ -0,0 +1,221 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Platform platform
+// swagger:model Platform
+type Platform struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // manufacturer
+ // Required: true
+ Manufacturer *NestedManufacturer `json:"manufacturer"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // NAPALM driver
+ //
+ // The name of the NAPALM driver to use when interacting with devices
+ // Max Length: 50
+ NapalmDriver string `json:"napalm_driver,omitempty"`
+
+ // Legacy RPC client
+ RPCClient string `json:"rpc_client,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this platform
+func (m *Platform) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateManufacturer(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateNapalmDriver(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRPCClient(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Platform) validateManufacturer(formats strfmt.Registry) error {
+
+ if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil {
+ return err
+ }
+
+ if m.Manufacturer != nil {
+
+ if err := m.Manufacturer.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("manufacturer")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Platform) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Platform) validateNapalmDriver(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.NapalmDriver) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("napalm_driver", "body", string(m.NapalmDriver), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var platformTypeRPCClientPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["juniper-junos","cisco-ios","opengear"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ platformTypeRPCClientPropEnum = append(platformTypeRPCClientPropEnum, v)
+ }
+}
+
+const (
+ // PlatformRPCClientJuniperJunos captures enum value "juniper-junos"
+ PlatformRPCClientJuniperJunos string = "juniper-junos"
+ // PlatformRPCClientCiscoIos captures enum value "cisco-ios"
+ PlatformRPCClientCiscoIos string = "cisco-ios"
+ // PlatformRPCClientOpengear captures enum value "opengear"
+ PlatformRPCClientOpengear string = "opengear"
+)
+
+// prop value enum
+func (m *Platform) validateRPCClientEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, platformTypeRPCClientPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *Platform) validateRPCClient(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.RPCClient) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateRPCClientEnum("rpc_client", "body", m.RPCClient); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Platform) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Platform) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Platform) UnmarshalBinary(b []byte) error {
+ var res Platform
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet.go
new file mode 100644
index 0000000..85a2c7d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet.go
@@ -0,0 +1,120 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PowerOutlet Power outlet
+// swagger:model PowerOutlet
+type PowerOutlet struct {
+
+ // Connected port
+ // Read Only: true
+ ConnectedPort string `json:"connected_port,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this power outlet
+func (m *PowerOutlet) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PowerOutlet) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PowerOutlet) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PowerOutlet) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PowerOutlet) UnmarshalBinary(b []byte) error {
+ var res PowerOutlet
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet_template.go
new file mode 100644
index 0000000..a393cb2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_outlet_template.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PowerOutletTemplate power outlet template
+// swagger:model PowerOutletTemplate
+type PowerOutletTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this power outlet template
+func (m *PowerOutletTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PowerOutletTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PowerOutletTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PowerOutletTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PowerOutletTemplate) UnmarshalBinary(b []byte) error {
+ var res PowerOutletTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port.go
new file mode 100644
index 0000000..6b1fc4b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port.go
@@ -0,0 +1,188 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PowerPort power port
+// swagger:model PowerPort
+type PowerPort struct {
+
+ // Connection status
+ ConnectionStatus bool `json:"connection_status,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // power outlet
+ // Required: true
+ PowerOutlet *PowerOutlet `json:"power_outlet"`
+}
+
+// Validate validates this power port
+func (m *PowerPort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePowerOutlet(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var powerPortTypeConnectionStatusPropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ powerPortTypeConnectionStatusPropEnum = append(powerPortTypeConnectionStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *PowerPort) validateConnectionStatusEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, powerPortTypeConnectionStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *PowerPort) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ConnectionStatus) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateConnectionStatusEnum("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PowerPort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PowerPort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PowerPort) validatePowerOutlet(formats strfmt.Registry) error {
+
+ if err := validate.Required("power_outlet", "body", m.PowerOutlet); err != nil {
+ return err
+ }
+
+ if m.PowerOutlet != nil {
+
+ if err := m.PowerOutlet.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("power_outlet")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PowerPort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PowerPort) UnmarshalBinary(b []byte) error {
+ var res PowerPort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port_template.go
new file mode 100644
index 0000000..7b628bb
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/power_port_template.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PowerPortTemplate power port template
+// swagger:model PowerPortTemplate
+type PowerPortTemplate struct {
+
+ // device type
+ // Required: true
+ DeviceType *NestedDeviceType `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this power port template
+func (m *PowerPortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PowerPortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ if m.DeviceType != nil {
+
+ if err := m.DeviceType.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device_type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *PowerPortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PowerPortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PowerPortTemplate) UnmarshalBinary(b []byte) error {
+ var res PowerPortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix.go
new file mode 100644
index 0000000..a5ea409
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix.go
@@ -0,0 +1,295 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Prefix prefix
+// swagger:model Prefix
+type Prefix struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Family
+ // Read Only: true
+ Family int64 `json:"family,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Is a pool
+ //
+ // All IP addresses within this prefix are considered usable
+ IsPool bool `json:"is_pool,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Prefix
+ //
+ // IPv4 or IPv6 network with mask
+ // Required: true
+ Prefix *string `json:"prefix"`
+
+ // role
+ // Required: true
+ Role *NestedRole `json:"role"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // status
+ // Required: true
+ Status *PrefixStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // vlan
+ // Required: true
+ Vlan *NestedVLAN `json:"vlan"`
+
+ // vrf
+ // Required: true
+ Vrf *NestedVRF `json:"vrf"`
+}
+
+// Validate validates this prefix
+func (m *Prefix) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrefix(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVlan(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVrf(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Prefix) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Prefix) validatePrefix(formats strfmt.Registry) error {
+
+ if err := validate.Required("prefix", "body", m.Prefix); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateVlan(formats strfmt.Registry) error {
+
+ if err := validate.Required("vlan", "body", m.Vlan); err != nil {
+ return err
+ }
+
+ if m.Vlan != nil {
+
+ if err := m.Vlan.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("vlan")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Prefix) validateVrf(formats strfmt.Registry) error {
+
+ if err := validate.Required("vrf", "body", m.Vrf); err != nil {
+ return err
+ }
+
+ if m.Vrf != nil {
+
+ if err := m.Vrf.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("vrf")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Prefix) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Prefix) UnmarshalBinary(b []byte) error {
+ var res Prefix
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix_status.go
new file mode 100644
index 0000000..15c2528
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/prefix_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// PrefixStatus Status
+// swagger:model prefixStatus
+type PrefixStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this prefix status
+func (m *PrefixStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PrefixStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *PrefixStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PrefixStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PrefixStatus) UnmarshalBinary(b []byte) error {
+ var res PrefixStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/provider.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/provider.go
new file mode 100644
index 0000000..e3add7a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/provider.go
@@ -0,0 +1,211 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Provider provider
+// swagger:model Provider
+type Provider struct {
+
+ // Account number
+ // Max Length: 30
+ Account string `json:"account,omitempty"`
+
+ // Admin contact
+ AdminContact string `json:"admin_contact,omitempty"`
+
+ // ASN
+ // Maximum: 4.294967295e+09
+ // Minimum: 1
+ Asn int64 `json:"asn,omitempty"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // NOC contact
+ NocContact string `json:"noc_contact,omitempty"`
+
+ // Portal
+ // Max Length: 200
+ PortalURL strfmt.URI `json:"portal_url,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this provider
+func (m *Provider) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAccount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateAsn(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePortalURL(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Provider) validateAccount(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Account) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("account", "body", string(m.Account), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Provider) validateAsn(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Asn) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("asn", "body", int64(m.Asn), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("asn", "body", int64(m.Asn), 4.294967295e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Provider) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Provider) validatePortalURL(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PortalURL) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("portal_url", "body", string(m.PortalURL), 200); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("portal_url", "body", "uri", m.PortalURL.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Provider) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Provider) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Provider) UnmarshalBinary(b []byte) error {
+ var res Provider
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack.go
new file mode 100644
index 0000000..539df81
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack.go
@@ -0,0 +1,351 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Rack rack
+// swagger:model Rack
+type Rack struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Descending units
+ //
+ // Units are numbered top-to-bottom
+ DescUnits bool `json:"desc_units,omitempty"`
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // Facility ID
+ // Required: true
+ // Max Length: 50
+ FacilityID *string `json:"facility_id"`
+
+ // group
+ // Required: true
+ Group *NestedRackGroup `json:"group"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // role
+ // Required: true
+ Role *NestedRackRole `json:"role"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // type
+ // Required: true
+ Type *RackType `json:"type"`
+
+ // Height (U)
+ // Maximum: 100
+ // Minimum: 1
+ UHeight int64 `json:"u_height,omitempty"`
+
+ // width
+ // Required: true
+ Width *RackWidth `json:"width"`
+}
+
+// Validate validates this rack
+func (m *Rack) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateFacilityID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateGroup(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUHeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateWidth(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Rack) validateFacilityID(formats strfmt.Registry) error {
+
+ if err := validate.Required("facility_id", "body", m.FacilityID); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("facility_id", "body", string(*m.FacilityID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Rack) validateGroup(formats strfmt.Registry) error {
+
+ if err := validate.Required("group", "body", m.Group); err != nil {
+ return err
+ }
+
+ if m.Group != nil {
+
+ if err := m.Group.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("group")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Rack) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Rack) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Rack) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Rack) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Rack) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Rack) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ if m.Type != nil {
+
+ if err := m.Type.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("type")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Rack) validateUHeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UHeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("u_height", "body", int64(m.UHeight), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("u_height", "body", int64(m.UHeight), 100, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Rack) validateWidth(formats strfmt.Registry) error {
+
+ if err := validate.Required("width", "body", m.Width); err != nil {
+ return err
+ }
+
+ if m.Width != nil {
+
+ if err := m.Width.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("width")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Rack) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Rack) UnmarshalBinary(b []byte) error {
+ var res Rack
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_group.go
new file mode 100644
index 0000000..fadd59e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_group.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RackGroup rack group
+// swagger:model RackGroup
+type RackGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this rack group
+func (m *RackGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RackGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackGroup) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *RackGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RackGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RackGroup) UnmarshalBinary(b []byte) error {
+ var res RackGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_reservation.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_reservation.go
new file mode 100644
index 0000000..6b0a1a2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_reservation.go
@@ -0,0 +1,212 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RackReservation rack reservation
+// swagger:model RackReservation
+type RackReservation struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.DateTime `json:"created,omitempty"`
+
+ // Description
+ // Required: true
+ // Max Length: 100
+ Description *string `json:"description"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // rack
+ // Required: true
+ Rack *NestedRack `json:"rack"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // units
+ // Required: true
+ Units []*int64 `json:"units"`
+
+ // user
+ // Required: true
+ User *NestedUser `json:"user"`
+}
+
+// Validate validates this rack reservation
+func (m *RackReservation) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRack(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUnits(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUser(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RackReservation) validateDescription(formats strfmt.Registry) error {
+
+ if err := validate.Required("description", "body", m.Description); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("description", "body", string(*m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackReservation) validateRack(formats strfmt.Registry) error {
+
+ if err := validate.Required("rack", "body", m.Rack); err != nil {
+ return err
+ }
+
+ if m.Rack != nil {
+
+ if err := m.Rack.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("rack")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *RackReservation) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *RackReservation) validateUnits(formats strfmt.Registry) error {
+
+ if err := validate.Required("units", "body", m.Units); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.Units); i++ {
+
+ if swag.IsZero(m.Units[i]) { // not required
+ continue
+ }
+
+ if err := validate.MinimumInt("units"+"."+strconv.Itoa(i), "body", int64(*m.Units[i]), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("units"+"."+strconv.Itoa(i), "body", int64(*m.Units[i]), 32767, false); err != nil {
+ return err
+ }
+
+ }
+
+ return nil
+}
+
+func (m *RackReservation) validateUser(formats strfmt.Registry) error {
+
+ if err := validate.Required("user", "body", m.User); err != nil {
+ return err
+ }
+
+ if m.User != nil {
+
+ if err := m.User.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("user")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RackReservation) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RackReservation) UnmarshalBinary(b []byte) error {
+ var res RackReservation
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_role.go
new file mode 100644
index 0000000..b0f6787
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_role.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RackRole rack role
+// swagger:model RackRole
+type RackRole struct {
+
+ // Color
+ // Required: true
+ // Max Length: 6
+ // Pattern: ^[0-9a-f]{6}$
+ Color *string `json:"color"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this rack role
+func (m *RackRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateColor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RackRole) validateColor(formats strfmt.Registry) error {
+
+ if err := validate.Required("color", "body", m.Color); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("color", "body", string(*m.Color), 6); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("color", "body", string(*m.Color), `^[0-9a-f]{6}$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RackRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RackRole) UnmarshalBinary(b []byte) error {
+ var res RackRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_type.go
new file mode 100644
index 0000000..68259b5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_type.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RackType Type
+// swagger:model rackType
+type RackType struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this rack type
+func (m *RackType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RackType) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackType) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RackType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RackType) UnmarshalBinary(b []byte) error {
+ var res RackType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_width.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_width.go
new file mode 100644
index 0000000..9ccf06e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rack_width.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RackWidth Width
+// swagger:model rackWidth
+type RackWidth struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this rack width
+func (m *RackWidth) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RackWidth) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RackWidth) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RackWidth) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RackWidth) UnmarshalBinary(b []byte) error {
+ var res RackWidth
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/region.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/region.go
new file mode 100644
index 0000000..08d951d
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/region.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Region region
+// swagger:model Region
+type Region struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // parent
+ // Required: true
+ Parent *NestedRegion `json:"parent"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this region
+func (m *Region) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateParent(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Region) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Region) validateParent(formats strfmt.Registry) error {
+
+ if err := validate.Required("parent", "body", m.Parent); err != nil {
+ return err
+ }
+
+ if m.Parent != nil {
+
+ if err := m.Parent.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("parent")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Region) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Region) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Region) UnmarshalBinary(b []byte) error {
+ var res Region
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rir.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rir.go
new file mode 100644
index 0000000..16ddcc5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/rir.go
@@ -0,0 +1,121 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// RIR r i r
+// swagger:model RIR
+type RIR struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Private
+ //
+ // IP space managed by this RIR is considered private
+ IsPrivate bool `json:"is_private,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this r i r
+func (m *RIR) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *RIR) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *RIR) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *RIR) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *RIR) UnmarshalBinary(b []byte) error {
+ var res RIR
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/role.go
new file mode 100644
index 0000000..dfc3fe8
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/role.go
@@ -0,0 +1,143 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Role role
+// swagger:model Role
+type Role struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Weight
+ // Maximum: 32767
+ // Minimum: 0
+ Weight *int64 `json:"weight,omitempty"`
+}
+
+// Validate validates this role
+func (m *Role) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateWeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Role) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Role) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Role) validateWeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Weight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Role) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Role) UnmarshalBinary(b []byte) error {
+ var res Role
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret.go
new file mode 100644
index 0000000..28320bf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret.go
@@ -0,0 +1,160 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Secret secret
+// swagger:model Secret
+type Secret struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // Hash
+ // Read Only: true
+ Hash string `json:"hash,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Plaintext
+ // Read Only: true
+ Plaintext string `json:"plaintext,omitempty"`
+
+ // role
+ // Required: true
+ Role *NestedSecretRole `json:"role"`
+}
+
+// Validate validates this secret
+func (m *Secret) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Secret) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Secret) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Secret) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Secret) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Secret) UnmarshalBinary(b []byte) error {
+ var res Secret
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret_role.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret_role.go
new file mode 100644
index 0000000..cf06bd3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secret_role.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SecretRole secret role
+// swagger:model SecretRole
+type SecretRole struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this secret role
+func (m *SecretRole) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SecretRole) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SecretRole) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SecretRole) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SecretRole) UnmarshalBinary(b []byte) error {
+ var res SecretRole
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody.go
new file mode 100644
index 0000000..5ffee8b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SecretsSecretRolesListOKBody secrets secret roles list o k body
+// swagger:model secretsSecretRolesListOKBody
+type SecretsSecretRolesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results SecretsSecretRolesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this secrets secret roles list o k body
+func (m *SecretsSecretRolesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SecretsSecretRolesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SecretsSecretRolesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SecretsSecretRolesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SecretsSecretRolesListOKBody) UnmarshalBinary(b []byte) error {
+ var res SecretsSecretRolesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody_results.go
new file mode 100644
index 0000000..fcab8a5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secret_roles_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// SecretsSecretRolesListOKBodyResults secrets secret roles list o k body results
+// swagger:model secretsSecretRolesListOKBodyResults
+type SecretsSecretRolesListOKBodyResults []*SecretRole
+
+// Validate validates this secrets secret roles list o k body results
+func (m SecretsSecretRolesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody.go
new file mode 100644
index 0000000..582eae5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SecretsSecretsListOKBody secrets secrets list o k body
+// swagger:model secretsSecretsListOKBody
+type SecretsSecretsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results SecretsSecretsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this secrets secrets list o k body
+func (m *SecretsSecretsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SecretsSecretsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SecretsSecretsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SecretsSecretsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SecretsSecretsListOKBody) UnmarshalBinary(b []byte) error {
+ var res SecretsSecretsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody_results.go
new file mode 100644
index 0000000..5e61fe9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/secrets_secrets_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// SecretsSecretsListOKBodyResults secrets secrets list o k body results
+// swagger:model secretsSecretsListOKBodyResults
+type SecretsSecretsListOKBodyResults []*Secret
+
+// Validate validates this secrets secrets list o k body results
+func (m SecretsSecretsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service.go
new file mode 100644
index 0000000..2a3ef99
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service.go
@@ -0,0 +1,255 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Service service
+// swagger:model Service
+type Service struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // device
+ // Required: true
+ Device *NestedDevice `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // ipaddresses
+ // Required: true
+ Ipaddresses ServiceIpaddresses `json:"ipaddresses"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 30
+ Name *string `json:"name"`
+
+ // Port number
+ // Required: true
+ // Maximum: 65535
+ // Minimum: 1
+ Port *int64 `json:"port"`
+
+ // protocol
+ // Required: true
+ Protocol *ServiceProtocol `json:"protocol"`
+
+ // virtual machine
+ // Required: true
+ VirtualMachine *NestedVirtualMachine `json:"virtual_machine"`
+}
+
+// Validate validates this service
+func (m *Service) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateIpaddresses(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePort(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateProtocol(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVirtualMachine(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Service) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Service) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ if m.Device != nil {
+
+ if err := m.Device.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("device")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Service) validateIpaddresses(formats strfmt.Registry) error {
+
+ if err := validate.Required("ipaddresses", "body", m.Ipaddresses); err != nil {
+ return err
+ }
+
+ if err := m.Ipaddresses.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ipaddresses")
+ }
+ return err
+ }
+
+ return nil
+}
+
+func (m *Service) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Service) validatePort(formats strfmt.Registry) error {
+
+ if err := validate.Required("port", "body", m.Port); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("port", "body", int64(*m.Port), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("port", "body", int64(*m.Port), 65535, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Service) validateProtocol(formats strfmt.Registry) error {
+
+ if err := validate.Required("protocol", "body", m.Protocol); err != nil {
+ return err
+ }
+
+ if m.Protocol != nil {
+
+ if err := m.Protocol.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("protocol")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Service) validateVirtualMachine(formats strfmt.Registry) error {
+
+ if err := validate.Required("virtual_machine", "body", m.VirtualMachine); err != nil {
+ return err
+ }
+
+ if m.VirtualMachine != nil {
+
+ if err := m.VirtualMachine.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("virtual_machine")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Service) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Service) UnmarshalBinary(b []byte) error {
+ var res Service
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_ipaddresses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_ipaddresses.go
new file mode 100644
index 0000000..8cf99e7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_ipaddresses.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// ServiceIpaddresses service ipaddresses
+// swagger:model serviceIpaddresses
+type ServiceIpaddresses []*NestedIPAddress
+
+// Validate validates this service ipaddresses
+func (m ServiceIpaddresses) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_protocol.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_protocol.go
new file mode 100644
index 0000000..6701ce6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/service_protocol.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// ServiceProtocol Protocol
+// swagger:model serviceProtocol
+type ServiceProtocol struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this service protocol
+func (m *ServiceProtocol) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *ServiceProtocol) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *ServiceProtocol) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *ServiceProtocol) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *ServiceProtocol) UnmarshalBinary(b []byte) error {
+ var res ServiceProtocol
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site.go
new file mode 100644
index 0000000..6d4c0ce
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site.go
@@ -0,0 +1,422 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Site site
+// swagger:model Site
+type Site struct {
+
+ // ASN
+ // Maximum: 4.294967295e+09
+ // Minimum: 1
+ Asn int64 `json:"asn,omitempty"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Contact E-mail
+ // Max Length: 254
+ ContactEmail strfmt.Email `json:"contact_email,omitempty"`
+
+ // Contact name
+ // Max Length: 50
+ ContactName string `json:"contact_name,omitempty"`
+
+ // Contact phone
+ // Max Length: 20
+ ContactPhone string `json:"contact_phone,omitempty"`
+
+ // Count circuits
+ // Read Only: true
+ CountCircuits string `json:"count_circuits,omitempty"`
+
+ // Count devices
+ // Read Only: true
+ CountDevices string `json:"count_devices,omitempty"`
+
+ // Count prefixes
+ // Read Only: true
+ CountPrefixes string `json:"count_prefixes,omitempty"`
+
+ // Count racks
+ // Read Only: true
+ CountRacks string `json:"count_racks,omitempty"`
+
+ // Count vlans
+ // Read Only: true
+ CountVlans string `json:"count_vlans,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Facility
+ // Max Length: 50
+ Facility string `json:"facility,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Physical address
+ // Max Length: 200
+ PhysicalAddress string `json:"physical_address,omitempty"`
+
+ // region
+ // Required: true
+ Region *NestedRegion `json:"region"`
+
+ // Shipping address
+ // Max Length: 200
+ ShippingAddress string `json:"shipping_address,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // status
+ // Required: true
+ Status *SiteStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // Time zone
+ TimeZone string `json:"time_zone,omitempty"`
+}
+
+// Validate validates this site
+func (m *Site) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAsn(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactEmail(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactPhone(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFacility(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePhysicalAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRegion(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateShippingAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Site) validateAsn(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Asn) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("asn", "body", int64(m.Asn), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("asn", "body", int64(m.Asn), 4.294967295e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateContactEmail(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactEmail) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_email", "body", string(m.ContactEmail), 254); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("contact_email", "body", "email", m.ContactEmail.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateContactName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactName) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_name", "body", string(m.ContactName), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateContactPhone(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactPhone) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_phone", "body", string(m.ContactPhone), 20); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateFacility(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Facility) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("facility", "body", string(m.Facility), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validatePhysicalAddress(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PhysicalAddress) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("physical_address", "body", string(m.PhysicalAddress), 200); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateRegion(formats strfmt.Registry) error {
+
+ if err := validate.Required("region", "body", m.Region); err != nil {
+ return err
+ }
+
+ if m.Region != nil {
+
+ if err := m.Region.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("region")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Site) validateShippingAddress(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ShippingAddress) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("shipping_address", "body", string(m.ShippingAddress), 200); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Site) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Site) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Site) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Site) UnmarshalBinary(b []byte) error {
+ var res Site
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site_status.go
new file mode 100644
index 0000000..1280836
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/site_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// SiteStatus Status
+// swagger:model siteStatus
+type SiteStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this site status
+func (m *SiteStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *SiteStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *SiteStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *SiteStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *SiteStatus) UnmarshalBinary(b []byte) error {
+ var res SiteStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody.go
new file mode 100644
index 0000000..7409990
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// TenancyTenantGroupsListOKBody tenancy tenant groups list o k body
+// swagger:model tenancyTenantGroupsListOKBody
+type TenancyTenantGroupsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results TenancyTenantGroupsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this tenancy tenant groups list o k body
+func (m *TenancyTenantGroupsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TenancyTenantGroupsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TenancyTenantGroupsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *TenancyTenantGroupsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *TenancyTenantGroupsListOKBody) UnmarshalBinary(b []byte) error {
+ var res TenancyTenantGroupsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody_results.go
new file mode 100644
index 0000000..02f25a7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenant_groups_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// TenancyTenantGroupsListOKBodyResults tenancy tenant groups list o k body results
+// swagger:model tenancyTenantGroupsListOKBodyResults
+type TenancyTenantGroupsListOKBodyResults []*TenantGroup
+
+// Validate validates this tenancy tenant groups list o k body results
+func (m TenancyTenantGroupsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody.go
new file mode 100644
index 0000000..664ae51
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// TenancyTenantsListOKBody tenancy tenants list o k body
+// swagger:model tenancyTenantsListOKBody
+type TenancyTenantsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results TenancyTenantsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this tenancy tenants list o k body
+func (m *TenancyTenantsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TenancyTenantsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TenancyTenantsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *TenancyTenantsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *TenancyTenantsListOKBody) UnmarshalBinary(b []byte) error {
+ var res TenancyTenantsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody_results.go
new file mode 100644
index 0000000..6573450
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenancy_tenants_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// TenancyTenantsListOKBodyResults tenancy tenants list o k body results
+// swagger:model tenancyTenantsListOKBodyResults
+type TenancyTenantsListOKBodyResults []*Tenant
+
+// Validate validates this tenancy tenants list o k body results
+func (m TenancyTenantsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant.go
new file mode 100644
index 0000000..e3a4446
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant.go
@@ -0,0 +1,182 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// Tenant tenant
+// swagger:model Tenant
+type Tenant struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ //
+ // Long-form name (optional)
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // group
+ // Required: true
+ Group *NestedTenantGroup `json:"group"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 30
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this tenant
+func (m *Tenant) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateGroup(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *Tenant) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Tenant) validateGroup(formats strfmt.Registry) error {
+
+ if err := validate.Required("group", "body", m.Group); err != nil {
+ return err
+ }
+
+ if m.Group != nil {
+
+ if err := m.Group.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("group")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *Tenant) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *Tenant) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *Tenant) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *Tenant) UnmarshalBinary(b []byte) error {
+ var res Tenant
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant_group.go
new file mode 100644
index 0000000..4ca8b30
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/tenant_group.go
@@ -0,0 +1,116 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// TenantGroup tenant group
+// swagger:model TenantGroup
+type TenantGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this tenant group
+func (m *TenantGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TenantGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TenantGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *TenantGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *TenantGroup) UnmarshalBinary(b []byte) error {
+ var res TenantGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/topology_map.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/topology_map.go
new file mode 100644
index 0000000..e338136
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/topology_map.go
@@ -0,0 +1,186 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// TopologyMap topology map
+// swagger:model TopologyMap
+type TopologyMap struct {
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Device patterns
+ //
+ // Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined.
+ // Required: true
+ DevicePatterns *string `json:"device_patterns"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this topology map
+func (m *TopologyMap) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevicePatterns(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *TopologyMap) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TopologyMap) validateDevicePatterns(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_patterns", "body", m.DevicePatterns); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TopologyMap) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *TopologyMap) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *TopologyMap) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *TopologyMap) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *TopologyMap) UnmarshalBinary(b []byte) error {
+ var res TopologyMap
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action.go
new file mode 100644
index 0000000..882b012
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action.go
@@ -0,0 +1,128 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// UserAction user action
+// swagger:model UserAction
+type UserAction struct {
+
+ // action
+ // Required: true
+ Action *UserActionAction `json:"action"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Message
+ Message string `json:"message,omitempty"`
+
+ // Time
+ // Read Only: true
+ Time strfmt.DateTime `json:"time,omitempty"`
+
+ // user
+ // Required: true
+ User *NestedUser `json:"user"`
+}
+
+// Validate validates this user action
+func (m *UserAction) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAction(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUser(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *UserAction) validateAction(formats strfmt.Registry) error {
+
+ if err := validate.Required("action", "body", m.Action); err != nil {
+ return err
+ }
+
+ if m.Action != nil {
+
+ if err := m.Action.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("action")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *UserAction) validateUser(formats strfmt.Registry) error {
+
+ if err := validate.Required("user", "body", m.User); err != nil {
+ return err
+ }
+
+ if m.User != nil {
+
+ if err := m.User.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("user")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *UserAction) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *UserAction) UnmarshalBinary(b []byte) error {
+ var res UserAction
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action_action.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action_action.go
new file mode 100644
index 0000000..8679750
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/user_action_action.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// UserActionAction Action
+// swagger:model userActionAction
+type UserActionAction struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this user action action
+func (m *UserActionAction) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *UserActionAction) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *UserActionAction) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *UserActionAction) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *UserActionAction) UnmarshalBinary(b []byte) error {
+ var res UserActionAction
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_chassis.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_chassis.go
new file mode 100644
index 0000000..be46fe9
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_chassis.go
@@ -0,0 +1,115 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualChassis virtual chassis
+// swagger:model VirtualChassis
+type VirtualChassis struct {
+
+ // Domain
+ // Max Length: 30
+ Domain string `json:"domain,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // master
+ // Required: true
+ Master *NestedDevice `json:"master"`
+}
+
+// Validate validates this virtual chassis
+func (m *VirtualChassis) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDomain(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMaster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualChassis) validateDomain(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Domain) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("domain", "body", string(m.Domain), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualChassis) validateMaster(formats strfmt.Registry) error {
+
+ if err := validate.Required("master", "body", m.Master); err != nil {
+ return err
+ }
+
+ if m.Master != nil {
+
+ if err := m.Master.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("master")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualChassis) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualChassis) UnmarshalBinary(b []byte) error {
+ var res VirtualChassis
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine.go
new file mode 100644
index 0000000..b850193
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine.go
@@ -0,0 +1,407 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualMachine virtual machine
+// swagger:model VirtualMachine
+type VirtualMachine struct {
+
+ // cluster
+ // Required: true
+ Cluster *NestedCluster `json:"cluster"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Disk (GB)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ Disk *int64 `json:"disk,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Memory (MB)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ Memory *int64 `json:"memory,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // platform
+ // Required: true
+ Platform *NestedPlatform `json:"platform"`
+
+ // primary ip
+ // Required: true
+ PrimaryIP *VirtualMachineIPAddress `json:"primary_ip"`
+
+ // primary ip4
+ // Required: true
+ PrimaryIp4 *VirtualMachineIPAddress `json:"primary_ip4"`
+
+ // primary ip6
+ // Required: true
+ PrimaryIp6 *VirtualMachineIPAddress `json:"primary_ip6"`
+
+ // role
+ // Required: true
+ Role *NestedDeviceRole `json:"role"`
+
+ // status
+ // Required: true
+ Status *VirtualMachineStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // VCPUs
+ // Maximum: 32767
+ // Minimum: 0
+ Vcpus *int64 `json:"vcpus,omitempty"`
+}
+
+// Validate validates this virtual machine
+func (m *VirtualMachine) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCluster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDisk(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMemory(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePlatform(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIP(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIp4(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrimaryIp6(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcpus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualMachine) validateCluster(formats strfmt.Registry) error {
+
+ if err := validate.Required("cluster", "body", m.Cluster); err != nil {
+ return err
+ }
+
+ if m.Cluster != nil {
+
+ if err := m.Cluster.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("cluster")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateDisk(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Disk) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("disk", "body", int64(*m.Disk), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("disk", "body", int64(*m.Disk), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateMemory(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Memory) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("memory", "body", int64(*m.Memory), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("memory", "body", int64(*m.Memory), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validatePlatform(formats strfmt.Registry) error {
+
+ if err := validate.Required("platform", "body", m.Platform); err != nil {
+ return err
+ }
+
+ if m.Platform != nil {
+
+ if err := m.Platform.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("platform")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validatePrimaryIP(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip", "body", m.PrimaryIP); err != nil {
+ return err
+ }
+
+ if m.PrimaryIP != nil {
+
+ if err := m.PrimaryIP.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validatePrimaryIp4(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip4", "body", m.PrimaryIp4); err != nil {
+ return err
+ }
+
+ if m.PrimaryIp4 != nil {
+
+ if err := m.PrimaryIp4.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip4")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validatePrimaryIp6(formats strfmt.Registry) error {
+
+ if err := validate.Required("primary_ip6", "body", m.PrimaryIp6); err != nil {
+ return err
+ }
+
+ if m.PrimaryIp6 != nil {
+
+ if err := m.PrimaryIp6.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("primary_ip6")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VirtualMachine) validateVcpus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Vcpus) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("vcpus", "body", int64(*m.Vcpus), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vcpus", "body", int64(*m.Vcpus), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualMachine) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualMachine) UnmarshalBinary(b []byte) error {
+ var res VirtualMachine
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_ip_address.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_ip_address.go
new file mode 100644
index 0000000..240a8e2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_ip_address.go
@@ -0,0 +1,93 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualMachineIPAddress Primary ip
+// swagger:model VirtualMachineIPAddress
+type VirtualMachineIPAddress struct {
+
+ // Address
+ //
+ // IPv4 or IPv6 address (with mask)
+ // Required: true
+ Address *string `json:"address"`
+
+ // Family
+ // Read Only: true
+ Family int64 `json:"family,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Url
+ // Read Only: true
+ URL strfmt.URI `json:"url,omitempty"`
+}
+
+// Validate validates this virtual machine IP address
+func (m *VirtualMachineIPAddress) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualMachineIPAddress) validateAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("address", "body", m.Address); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualMachineIPAddress) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualMachineIPAddress) UnmarshalBinary(b []byte) error {
+ var res VirtualMachineIPAddress
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_status.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_status.go
new file mode 100644
index 0000000..462fd4f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtual_machine_status.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualMachineStatus Status
+// swagger:model virtualMachineStatus
+type VirtualMachineStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this virtual machine status
+func (m *VirtualMachineStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualMachineStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualMachineStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualMachineStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualMachineStatus) UnmarshalBinary(b []byte) error {
+ var res VirtualMachineStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody.go
new file mode 100644
index 0000000..3cb5e60
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualizationClusterGroupsListOKBody virtualization cluster groups list o k body
+// swagger:model virtualizationClusterGroupsListOKBody
+type VirtualizationClusterGroupsListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results VirtualizationClusterGroupsListOKBodyResults `json:"results"`
+}
+
+// Validate validates this virtualization cluster groups list o k body
+func (m *VirtualizationClusterGroupsListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualizationClusterGroupsListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualizationClusterGroupsListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualizationClusterGroupsListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualizationClusterGroupsListOKBody) UnmarshalBinary(b []byte) error {
+ var res VirtualizationClusterGroupsListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody_results.go
new file mode 100644
index 0000000..8dd968e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_groups_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// VirtualizationClusterGroupsListOKBodyResults virtualization cluster groups list o k body results
+// swagger:model virtualizationClusterGroupsListOKBodyResults
+type VirtualizationClusterGroupsListOKBodyResults []*ClusterGroup
+
+// Validate validates this virtualization cluster groups list o k body results
+func (m VirtualizationClusterGroupsListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody.go
new file mode 100644
index 0000000..96f6528
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualizationClusterTypesListOKBody virtualization cluster types list o k body
+// swagger:model virtualizationClusterTypesListOKBody
+type VirtualizationClusterTypesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results VirtualizationClusterTypesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this virtualization cluster types list o k body
+func (m *VirtualizationClusterTypesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualizationClusterTypesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualizationClusterTypesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualizationClusterTypesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualizationClusterTypesListOKBody) UnmarshalBinary(b []byte) error {
+ var res VirtualizationClusterTypesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody_results.go
new file mode 100644
index 0000000..aac33c7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_cluster_types_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// VirtualizationClusterTypesListOKBodyResults virtualization cluster types list o k body results
+// swagger:model virtualizationClusterTypesListOKBodyResults
+type VirtualizationClusterTypesListOKBodyResults []*ClusterType
+
+// Validate validates this virtualization cluster types list o k body results
+func (m VirtualizationClusterTypesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody.go
new file mode 100644
index 0000000..f36c19f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualizationClustersListOKBody virtualization clusters list o k body
+// swagger:model virtualizationClustersListOKBody
+type VirtualizationClustersListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results VirtualizationClustersListOKBodyResults `json:"results"`
+}
+
+// Validate validates this virtualization clusters list o k body
+func (m *VirtualizationClustersListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualizationClustersListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualizationClustersListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualizationClustersListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualizationClustersListOKBody) UnmarshalBinary(b []byte) error {
+ var res VirtualizationClustersListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody_results.go
new file mode 100644
index 0000000..f562a93
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_clusters_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// VirtualizationClustersListOKBodyResults virtualization clusters list o k body results
+// swagger:model virtualizationClustersListOKBodyResults
+type VirtualizationClustersListOKBodyResults []*Cluster
+
+// Validate validates this virtualization clusters list o k body results
+func (m VirtualizationClustersListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody.go
new file mode 100644
index 0000000..58ed446
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualizationInterfacesListOKBody virtualization interfaces list o k body
+// swagger:model virtualizationInterfacesListOKBody
+type VirtualizationInterfacesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results VirtualizationInterfacesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this virtualization interfaces list o k body
+func (m *VirtualizationInterfacesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualizationInterfacesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualizationInterfacesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualizationInterfacesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualizationInterfacesListOKBody) UnmarshalBinary(b []byte) error {
+ var res VirtualizationInterfacesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody_results.go
new file mode 100644
index 0000000..7974f6a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_interfaces_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// VirtualizationInterfacesListOKBodyResults virtualization interfaces list o k body results
+// swagger:model virtualizationInterfacesListOKBodyResults
+type VirtualizationInterfacesListOKBodyResults []*Interface
+
+// Validate validates this virtualization interfaces list o k body results
+func (m VirtualizationInterfacesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody.go
new file mode 100644
index 0000000..18fa88b
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody.go
@@ -0,0 +1,110 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VirtualizationVirtualMachinesListOKBody virtualization virtual machines list o k body
+// swagger:model virtualizationVirtualMachinesListOKBody
+type VirtualizationVirtualMachinesListOKBody struct {
+
+ // count
+ // Required: true
+ Count *int64 `json:"count"`
+
+ // next
+ Next *strfmt.URI `json:"next,omitempty"`
+
+ // previous
+ Previous *strfmt.URI `json:"previous,omitempty"`
+
+ // results
+ // Required: true
+ Results VirtualizationVirtualMachinesListOKBodyResults `json:"results"`
+}
+
+// Validate validates this virtualization virtual machines list o k body
+func (m *VirtualizationVirtualMachinesListOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateResults(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VirtualizationVirtualMachinesListOKBody) validateCount(formats strfmt.Registry) error {
+
+ if err := validate.Required("count", "body", m.Count); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VirtualizationVirtualMachinesListOKBody) validateResults(formats strfmt.Registry) error {
+
+ if err := validate.Required("results", "body", m.Results); err != nil {
+ return err
+ }
+
+ if err := m.Results.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("results")
+ }
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VirtualizationVirtualMachinesListOKBody) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VirtualizationVirtualMachinesListOKBody) UnmarshalBinary(b []byte) error {
+ var res VirtualizationVirtualMachinesListOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody_results.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody_results.go
new file mode 100644
index 0000000..874c63a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/virtualization_virtual_machines_list_okbody_results.go
@@ -0,0 +1,61 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// VirtualizationVirtualMachinesListOKBodyResults virtualization virtual machines list o k body results
+// swagger:model virtualizationVirtualMachinesListOKBodyResults
+type VirtualizationVirtualMachinesListOKBodyResults []*VirtualMachine
+
+// Validate validates this virtualization virtual machines list o k body results
+func (m VirtualizationVirtualMachinesListOKBodyResults) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ for i := 0; i < len(m); i++ {
+
+ if swag.IsZero(m[i]) { // not required
+ continue
+ }
+
+ if m[i] != nil {
+
+ if err := m[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName(strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlan.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlan.go
new file mode 100644
index 0000000..b12091a
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlan.go
@@ -0,0 +1,293 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VLAN v l a n
+// swagger:model VLAN
+type VLAN struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // group
+ // Required: true
+ Group *NestedVLANGroup `json:"group"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // role
+ // Required: true
+ Role *NestedRole `json:"role"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // status
+ // Required: true
+ Status *VLANStatus `json:"status"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+
+ // ID
+ // Required: true
+ // Maximum: 4094
+ // Minimum: 1
+ Vid *int64 `json:"vid"`
+}
+
+// Validate validates this v l a n
+func (m *VLAN) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateGroup(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VLAN) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateGroup(formats strfmt.Registry) error {
+
+ if err := validate.Required("group", "body", m.Group); err != nil {
+ return err
+ }
+
+ if m.Group != nil {
+
+ if err := m.Group.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("group")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ if m.Role != nil {
+
+ if err := m.Role.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("role")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateStatus(formats strfmt.Registry) error {
+
+ if err := validate.Required("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ if m.Status != nil {
+
+ if err := m.Status.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("status")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLAN) validateVid(formats strfmt.Registry) error {
+
+ if err := validate.Required("vid", "body", m.Vid); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("vid", "body", int64(*m.Vid), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vid", "body", int64(*m.Vid), 4094, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VLAN) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VLAN) UnmarshalBinary(b []byte) error {
+ var res VLAN
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlangroup.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlangroup.go
new file mode 100644
index 0000000..8014aaf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlangroup.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VLANGroup v l a n group
+// swagger:model VLANGroup
+type VLANGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // site
+ // Required: true
+ Site *NestedSite `json:"site"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this v l a n group
+func (m *VLANGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VLANGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VLANGroup) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ if m.Site != nil {
+
+ if err := m.Site.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("site")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (m *VLANGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VLANGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VLANGroup) UnmarshalBinary(b []byte) error {
+ var res VLANGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlanstatus.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlanstatus.go
new file mode 100644
index 0000000..46466c2
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vlanstatus.go
@@ -0,0 +1,97 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VLANStatus Status
+// swagger:model vLANStatus
+type VLANStatus struct {
+
+ // label
+ // Required: true
+ Label *string `json:"label"`
+
+ // value
+ // Required: true
+ Value *int64 `json:"value"`
+}
+
+// Validate validates this v l a n status
+func (m *VLANStatus) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLabel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateValue(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VLANStatus) validateLabel(formats strfmt.Registry) error {
+
+ if err := validate.Required("label", "body", m.Label); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VLANStatus) validateValue(formats strfmt.Registry) error {
+
+ if err := validate.Required("value", "body", m.Value); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VLANStatus) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VLANStatus) UnmarshalBinary(b []byte) error {
+ var res VLANStatus
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vrf.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vrf.go
new file mode 100644
index 0000000..d172ea0
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/vrf.go
@@ -0,0 +1,181 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// VRF v r f
+// swagger:model VRF
+type VRF struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Display name
+ // Read Only: true
+ DisplayName string `json:"display_name,omitempty"`
+
+ // Enforce unique space
+ //
+ // Prevent duplicate prefixes/IP addresses within this VRF
+ EnforceUnique bool `json:"enforce_unique,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Route distinguisher
+ // Required: true
+ // Max Length: 21
+ Rd *string `json:"rd"`
+
+ // tenant
+ // Required: true
+ Tenant *NestedTenant `json:"tenant"`
+}
+
+// Validate validates this v r f
+func (m *VRF) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRd(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTenant(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *VRF) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VRF) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VRF) validateRd(formats strfmt.Registry) error {
+
+ if err := validate.Required("rd", "body", m.Rd); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("rd", "body", string(*m.Rd), 21); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *VRF) validateTenant(formats strfmt.Registry) error {
+
+ if err := validate.Required("tenant", "body", m.Tenant); err != nil {
+ return err
+ }
+
+ if m.Tenant != nil {
+
+ if err := m.Tenant.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("tenant")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *VRF) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *VRF) UnmarshalBinary(b []byte) error {
+ var res VRF
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_aggregate.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_aggregate.go
new file mode 100644
index 0000000..7f2de13
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_aggregate.go
@@ -0,0 +1,137 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableAggregate writable aggregate
+// swagger:model WritableAggregate
+type WritableAggregate struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Date added
+ DateAdded strfmt.Date `json:"date_added,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Prefix
+ // Required: true
+ Prefix *string `json:"prefix"`
+
+ // RIR
+ // Required: true
+ Rir *int64 `json:"rir"`
+}
+
+// Validate validates this writable aggregate
+func (m *WritableAggregate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrefix(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRir(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableAggregate) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableAggregate) validatePrefix(formats strfmt.Registry) error {
+
+ if err := validate.Required("prefix", "body", m.Prefix); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableAggregate) validateRir(formats strfmt.Registry) error {
+
+ if err := validate.Required("rir", "body", m.Rir); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableAggregate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableAggregate) UnmarshalBinary(b []byte) error {
+ var res WritableAggregate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit.go
new file mode 100644
index 0000000..d0a92cc
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit.go
@@ -0,0 +1,237 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableCircuit writable circuit
+// swagger:model WritableCircuit
+type WritableCircuit struct {
+
+ // Circuit ID
+ // Required: true
+ // Max Length: 50
+ Cid *string `json:"cid"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Commit rate (Kbps)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ CommitRate *int64 `json:"commit_rate,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Date installed
+ InstallDate strfmt.Date `json:"install_date,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Provider
+ // Required: true
+ Provider *int64 `json:"provider"`
+
+ // Status
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // Type
+ // Required: true
+ Type *int64 `json:"type"`
+}
+
+// Validate validates this writable circuit
+func (m *WritableCircuit) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateCommitRate(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateProvider(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableCircuit) validateCid(formats strfmt.Registry) error {
+
+ if err := validate.Required("cid", "body", m.Cid); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("cid", "body", string(*m.Cid), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuit) validateCommitRate(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.CommitRate) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("commit_rate", "body", int64(*m.CommitRate), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("commit_rate", "body", int64(*m.CommitRate), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuit) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuit) validateProvider(formats strfmt.Registry) error {
+
+ if err := validate.Required("provider", "body", m.Provider); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableCircuitTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[2,3,1,4,0,5]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableCircuitTypeStatusPropEnum = append(writableCircuitTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableCircuit) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableCircuitTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableCircuit) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuit) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableCircuit) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableCircuit) UnmarshalBinary(b []byte) error {
+ var res WritableCircuit
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit_termination.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit_termination.go
new file mode 100644
index 0000000..cb837e4
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_circuit_termination.go
@@ -0,0 +1,257 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableCircuitTermination writable circuit termination
+// swagger:model WritableCircuitTermination
+type WritableCircuitTermination struct {
+
+ // Circuit
+ // Required: true
+ Circuit *int64 `json:"circuit"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Interface
+ Interface int64 `json:"interface,omitempty"`
+
+ // Port speed (Kbps)
+ // Required: true
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ PortSpeed *int64 `json:"port_speed"`
+
+ // Patch panel/port(s)
+ // Max Length: 100
+ PpInfo string `json:"pp_info,omitempty"`
+
+ // Site
+ // Required: true
+ Site *int64 `json:"site"`
+
+ // Termination
+ // Required: true
+ TermSide *string `json:"term_side"`
+
+ // Upstream speed (Kbps)
+ //
+ // Upstream speed, if different from port speed
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ UpstreamSpeed *int64 `json:"upstream_speed,omitempty"`
+
+ // Cross-connect ID
+ // Max Length: 50
+ XconnectID string `json:"xconnect_id,omitempty"`
+}
+
+// Validate validates this writable circuit termination
+func (m *WritableCircuitTermination) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCircuit(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePortSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePpInfo(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTermSide(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUpstreamSpeed(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateXconnectID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableCircuitTermination) validateCircuit(formats strfmt.Registry) error {
+
+ if err := validate.Required("circuit", "body", m.Circuit); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuitTermination) validatePortSpeed(formats strfmt.Registry) error {
+
+ if err := validate.Required("port_speed", "body", m.PortSpeed); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("port_speed", "body", int64(*m.PortSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("port_speed", "body", int64(*m.PortSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuitTermination) validatePpInfo(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PpInfo) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("pp_info", "body", string(m.PpInfo), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuitTermination) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableCircuitTerminationTypeTermSidePropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["A","Z"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableCircuitTerminationTypeTermSidePropEnum = append(writableCircuitTerminationTypeTermSidePropEnum, v)
+ }
+}
+
+const (
+ // WritableCircuitTerminationTermSideA captures enum value "A"
+ WritableCircuitTerminationTermSideA string = "A"
+ // WritableCircuitTerminationTermSideZ captures enum value "Z"
+ WritableCircuitTerminationTermSideZ string = "Z"
+)
+
+// prop value enum
+func (m *WritableCircuitTermination) validateTermSideEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, writableCircuitTerminationTypeTermSidePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableCircuitTermination) validateTermSide(formats strfmt.Registry) error {
+
+ if err := validate.Required("term_side", "body", m.TermSide); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateTermSideEnum("term_side", "body", *m.TermSide); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuitTermination) validateUpstreamSpeed(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UpstreamSpeed) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("upstream_speed", "body", int64(*m.UpstreamSpeed), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCircuitTermination) validateXconnectID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.XconnectID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("xconnect_id", "body", string(m.XconnectID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableCircuitTermination) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableCircuitTermination) UnmarshalBinary(b []byte) error {
+ var res WritableCircuitTermination
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_cluster.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_cluster.go
new file mode 100644
index 0000000..03f05b6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_cluster.go
@@ -0,0 +1,126 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableCluster writable cluster
+// swagger:model WritableCluster
+type WritableCluster struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Group
+ Group int64 `json:"group,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Site
+ Site int64 `json:"site,omitempty"`
+
+ // Type
+ // Required: true
+ Type *int64 `json:"type"`
+}
+
+// Validate validates this writable cluster
+func (m *WritableCluster) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableCluster) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableCluster) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableCluster) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableCluster) UnmarshalBinary(b []byte) error {
+ var res WritableCluster
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port.go
new file mode 100644
index 0000000..4c27c85
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port.go
@@ -0,0 +1,153 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableConsolePort writable console port
+// swagger:model WritableConsolePort
+type WritableConsolePort struct {
+
+ // Connection status
+ ConnectionStatus bool `json:"connection_status,omitempty"`
+
+ // Console server port
+ CsPort int64 `json:"cs_port,omitempty"`
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable console port
+func (m *WritableConsolePort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var writableConsolePortTypeConnectionStatusPropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableConsolePortTypeConnectionStatusPropEnum = append(writableConsolePortTypeConnectionStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableConsolePort) validateConnectionStatusEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, writableConsolePortTypeConnectionStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableConsolePort) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ConnectionStatus) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateConnectionStatusEnum("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableConsolePort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableConsolePort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableConsolePort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableConsolePort) UnmarshalBinary(b []byte) error {
+ var res WritableConsolePort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port_template.go
new file mode 100644
index 0000000..ec34e44
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_port_template.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableConsolePortTemplate writable console port template
+// swagger:model WritableConsolePortTemplate
+type WritableConsolePortTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable console port template
+func (m *WritableConsolePortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableConsolePortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableConsolePortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableConsolePortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableConsolePortTemplate) UnmarshalBinary(b []byte) error {
+ var res WritableConsolePortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port.go
new file mode 100644
index 0000000..d060976
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableConsoleServerPort writable console server port
+// swagger:model WritableConsoleServerPort
+type WritableConsoleServerPort struct {
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable console server port
+func (m *WritableConsoleServerPort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableConsoleServerPort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableConsoleServerPort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableConsoleServerPort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableConsoleServerPort) UnmarshalBinary(b []byte) error {
+ var res WritableConsoleServerPort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port_template.go
new file mode 100644
index 0000000..35e16a1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_console_server_port_template.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableConsoleServerPortTemplate writable console server port template
+// swagger:model WritableConsoleServerPortTemplate
+type WritableConsoleServerPortTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable console server port template
+func (m *WritableConsoleServerPortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableConsoleServerPortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableConsoleServerPortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableConsoleServerPortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableConsoleServerPortTemplate) UnmarshalBinary(b []byte) error {
+ var res WritableConsoleServerPortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device.go
new file mode 100644
index 0000000..a047d77
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device.go
@@ -0,0 +1,391 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableDevice writable device
+// swagger:model WritableDevice
+type WritableDevice struct {
+
+ // Asset tag
+ //
+ // A unique tag used to identify this device
+ // Max Length: 50
+ AssetTag string `json:"asset_tag,omitempty"`
+
+ // Cluster
+ Cluster int64 `json:"cluster,omitempty"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Device role
+ // Required: true
+ DeviceRole *int64 `json:"device_role"`
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // Rack face
+ Face int64 `json:"face,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Max Length: 64
+ Name string `json:"name,omitempty"`
+
+ // Platform
+ Platform int64 `json:"platform,omitempty"`
+
+ // Position (U)
+ //
+ // The lowest-numbered unit occupied by the device
+ // Maximum: 32767
+ // Minimum: 1
+ Position int64 `json:"position,omitempty"`
+
+ // Primary IPv4
+ PrimaryIp4 int64 `json:"primary_ip4,omitempty"`
+
+ // Primary IPv6
+ PrimaryIp6 int64 `json:"primary_ip6,omitempty"`
+
+ // Rack
+ Rack int64 `json:"rack,omitempty"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+
+ // Site
+ // Required: true
+ Site *int64 `json:"site"`
+
+ // Status
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // Vc position
+ // Maximum: 255
+ // Minimum: 0
+ VcPosition *int64 `json:"vc_position,omitempty"`
+
+ // Vc priority
+ // Maximum: 255
+ // Minimum: 0
+ VcPriority *int64 `json:"vc_priority,omitempty"`
+
+ // Virtual chassis
+ VirtualChassis int64 `json:"virtual_chassis,omitempty"`
+}
+
+// Validate validates this writable device
+func (m *WritableDevice) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAssetTag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDeviceRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFace(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePosition(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcPosition(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcPriority(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableDevice) validateAssetTag(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.AssetTag) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("asset_tag", "body", string(m.AssetTag), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateDeviceRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_role", "body", m.DeviceRole); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableDeviceTypeFacePropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[0,1]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableDeviceTypeFacePropEnum = append(writableDeviceTypeFacePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableDevice) validateFaceEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableDeviceTypeFacePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableDevice) validateFace(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Face) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateFaceEnum("face", "body", m.Face); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validatePosition(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Position) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("position", "body", int64(m.Position), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("position", "body", int64(m.Position), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableDeviceTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,0,2,3,4,5]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableDeviceTypeStatusPropEnum = append(writableDeviceTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableDevice) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableDeviceTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableDevice) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateVcPosition(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.VcPosition) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("vc_position", "body", int64(*m.VcPosition), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vc_position", "body", int64(*m.VcPosition), 255, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDevice) validateVcPriority(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.VcPriority) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("vc_priority", "body", int64(*m.VcPriority), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vc_priority", "body", int64(*m.VcPriority), 255, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableDevice) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableDevice) UnmarshalBinary(b []byte) error {
+ var res WritableDevice
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay.go
new file mode 100644
index 0000000..e1caaee
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay.go
@@ -0,0 +1,109 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableDeviceBay writable device bay
+// swagger:model WritableDeviceBay
+type WritableDeviceBay struct {
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Installed device
+ InstalledDevice int64 `json:"installed_device,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable device bay
+func (m *WritableDeviceBay) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableDeviceBay) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceBay) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableDeviceBay) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableDeviceBay) UnmarshalBinary(b []byte) error {
+ var res WritableDeviceBay
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay_template.go
new file mode 100644
index 0000000..65148be
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_bay_template.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableDeviceBayTemplate writable device bay template
+// swagger:model WritableDeviceBayTemplate
+type WritableDeviceBayTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable device bay template
+func (m *WritableDeviceBayTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableDeviceBayTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceBayTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableDeviceBayTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableDeviceBayTemplate) UnmarshalBinary(b []byte) error {
+ var res WritableDeviceBayTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_type.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_type.go
new file mode 100644
index 0000000..68d1c69
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_device_type.go
@@ -0,0 +1,299 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableDeviceType writable device type
+// swagger:model WritableDeviceType
+type WritableDeviceType struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Interface ordering
+ InterfaceOrdering int64 `json:"interface_ordering,omitempty"`
+
+ // Is a console server
+ //
+ // This type of device has console server ports
+ IsConsoleServer bool `json:"is_console_server,omitempty"`
+
+ // Is full depth
+ //
+ // Device consumes both front and rear rack faces
+ IsFullDepth bool `json:"is_full_depth,omitempty"`
+
+ // Is a network device
+ //
+ // This type of device has network interfaces
+ IsNetworkDevice bool `json:"is_network_device,omitempty"`
+
+ // Is a PDU
+ //
+ // This type of device has power outlets
+ IsPdu bool `json:"is_pdu,omitempty"`
+
+ // Manufacturer
+ // Required: true
+ Manufacturer *int64 `json:"manufacturer"`
+
+ // Model
+ // Required: true
+ // Max Length: 50
+ Model *string `json:"model"`
+
+ // Part number
+ //
+ // Discrete part number (optional)
+ // Max Length: 50
+ PartNumber string `json:"part_number,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Parent/child status
+ //
+ // Parent devices house child devices in device bays. Select "None" if this device type is neither a parent nor a child.
+ SubdeviceRole *bool `json:"subdevice_role,omitempty"`
+
+ // Height (U)
+ // Maximum: 32767
+ // Minimum: 0
+ UHeight *int64 `json:"u_height,omitempty"`
+}
+
+// Validate validates this writable device type
+func (m *WritableDeviceType) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateInterfaceOrdering(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateManufacturer(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateModel(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePartNumber(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSubdeviceRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUHeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var writableDeviceTypeTypeInterfaceOrderingPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,2]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableDeviceTypeTypeInterfaceOrderingPropEnum = append(writableDeviceTypeTypeInterfaceOrderingPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableDeviceType) validateInterfaceOrderingEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableDeviceTypeTypeInterfaceOrderingPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableDeviceType) validateInterfaceOrdering(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.InterfaceOrdering) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateInterfaceOrderingEnum("interface_ordering", "body", m.InterfaceOrdering); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceType) validateManufacturer(formats strfmt.Registry) error {
+
+ if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceType) validateModel(formats strfmt.Registry) error {
+
+ if err := validate.Required("model", "body", m.Model); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("model", "body", string(*m.Model), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceType) validatePartNumber(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PartNumber) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("part_number", "body", string(m.PartNumber), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceType) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableDeviceTypeTypeSubdeviceRolePropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[null,true,false]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableDeviceTypeTypeSubdeviceRolePropEnum = append(writableDeviceTypeTypeSubdeviceRolePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableDeviceType) validateSubdeviceRoleEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, writableDeviceTypeTypeSubdeviceRolePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableDeviceType) validateSubdeviceRole(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.SubdeviceRole) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateSubdeviceRoleEnum("subdevice_role", "body", *m.SubdeviceRole); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableDeviceType) validateUHeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UHeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("u_height", "body", int64(*m.UHeight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("u_height", "body", int64(*m.UHeight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableDeviceType) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableDeviceType) UnmarshalBinary(b []byte) error {
+ var res WritableDeviceType
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_graph.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_graph.go
new file mode 100644
index 0000000..a986362
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_graph.go
@@ -0,0 +1,209 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableGraph writable graph
+// swagger:model WritableGraph
+type WritableGraph struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Link URL
+ // Max Length: 200
+ Link strfmt.URI `json:"link,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 100
+ Name *string `json:"name"`
+
+ // Source URL
+ // Required: true
+ // Max Length: 500
+ Source *string `json:"source"`
+
+ // Type
+ // Required: true
+ Type *int64 `json:"type"`
+
+ // Weight
+ // Maximum: 32767
+ // Minimum: 0
+ Weight *int64 `json:"weight,omitempty"`
+}
+
+// Validate validates this writable graph
+func (m *WritableGraph) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateLink(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSource(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateWeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableGraph) validateLink(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Link) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("link", "body", string(m.Link), 200); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("link", "body", "uri", m.Link.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableGraph) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableGraph) validateSource(formats strfmt.Registry) error {
+
+ if err := validate.Required("source", "body", m.Source); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("source", "body", string(*m.Source), 500); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableGraphTypeTypePropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[100,200,300]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableGraphTypeTypePropEnum = append(writableGraphTypeTypePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableGraph) validateTypeEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableGraphTypeTypePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableGraph) validateType(formats strfmt.Registry) error {
+
+ if err := validate.Required("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateTypeEnum("type", "body", *m.Type); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableGraph) validateWeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Weight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("weight", "body", int64(*m.Weight), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("weight", "body", int64(*m.Weight), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableGraph) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableGraph) UnmarshalBinary(b []byte) error {
+ var res WritableGraph
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_image_attachment.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_image_attachment.go
new file mode 100644
index 0000000..a2b0778
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_image_attachment.go
@@ -0,0 +1,156 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableImageAttachment writable image attachment
+// swagger:model WritableImageAttachment
+type WritableImageAttachment struct {
+
+ // Content type
+ // Required: true
+ ContentType *string `json:"content_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Image
+ // Required: true
+ // Read Only: true
+ Image strfmt.URI `json:"image"`
+
+ // Name
+ // Max Length: 50
+ Name string `json:"name,omitempty"`
+
+ // Object id
+ // Required: true
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ ObjectID *int64 `json:"object_id"`
+}
+
+// Validate validates this writable image attachment
+func (m *WritableImageAttachment) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateContentType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateImage(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateObjectID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableImageAttachment) validateContentType(formats strfmt.Registry) error {
+
+ if err := validate.Required("content_type", "body", m.ContentType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableImageAttachment) validateImage(formats strfmt.Registry) error {
+
+ if err := validate.Required("image", "body", strfmt.URI(m.Image)); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("image", "body", "uri", m.Image.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableImageAttachment) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableImageAttachment) validateObjectID(formats strfmt.Registry) error {
+
+ if err := validate.Required("object_id", "body", m.ObjectID); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("object_id", "body", int64(*m.ObjectID), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("object_id", "body", int64(*m.ObjectID), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableImageAttachment) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableImageAttachment) UnmarshalBinary(b []byte) error {
+ var res WritableImageAttachment
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface.go
new file mode 100644
index 0000000..caa972f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface.go
@@ -0,0 +1,280 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableInterface writable interface
+// swagger:model WritableInterface
+type WritableInterface struct {
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // Enabled
+ Enabled bool `json:"enabled,omitempty"`
+
+ // Form factor
+ FormFactor int64 `json:"form_factor,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Parent LAG
+ Lag int64 `json:"lag,omitempty"`
+
+ // MAC Address
+ MacAddress string `json:"mac_address,omitempty"`
+
+ // OOB Management
+ //
+ // This interface is used only for out-of-band management
+ MgmtOnly bool `json:"mgmt_only,omitempty"`
+
+ // Mode
+ Mode int64 `json:"mode,omitempty"`
+
+ // MTU
+ // Maximum: 32767
+ // Minimum: 0
+ Mtu *int64 `json:"mtu,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // tagged vlans
+ // Unique: true
+ TaggedVlans []int64 `json:"tagged_vlans"`
+
+ // Untagged VLAN
+ UntaggedVlan int64 `json:"untagged_vlan,omitempty"`
+}
+
+// Validate validates this writable interface
+func (m *WritableInterface) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFormFactor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMode(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMtu(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateTaggedVlans(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableInterface) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterface) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableInterfaceTypeFormFactorPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[0,200,800,1000,1150,1170,1050,1100,1200,1300,1310,1320,1350,1400,1500,1510,1520,1550,1600,2600,2610,2620,2630,2640,3010,3020,3040,3080,3160,4000,4010,4040,4050,5000,5050,5100,5150,5200,32767]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableInterfaceTypeFormFactorPropEnum = append(writableInterfaceTypeFormFactorPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableInterface) validateFormFactorEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableInterfaceTypeFormFactorPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableInterface) validateFormFactor(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.FormFactor) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateFormFactorEnum("form_factor", "body", m.FormFactor); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableInterfaceTypeModePropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[100,200,300]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableInterfaceTypeModePropEnum = append(writableInterfaceTypeModePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableInterface) validateModeEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableInterfaceTypeModePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableInterface) validateMode(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Mode) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateModeEnum("mode", "body", m.Mode); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterface) validateMtu(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Mtu) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("mtu", "body", int64(*m.Mtu), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("mtu", "body", int64(*m.Mtu), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterface) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterface) validateTaggedVlans(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.TaggedVlans) { // not required
+ return nil
+ }
+
+ if err := validate.UniqueItems("tagged_vlans", "body", m.TaggedVlans); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableInterface) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableInterface) UnmarshalBinary(b []byte) error {
+ var res WritableInterface
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_connection.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_connection.go
new file mode 100644
index 0000000..c650520
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_connection.go
@@ -0,0 +1,145 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableInterfaceConnection writable interface connection
+// swagger:model WritableInterfaceConnection
+type WritableInterfaceConnection struct {
+
+ // Status
+ ConnectionStatus bool `json:"connection_status,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Interface a
+ // Required: true
+ InterfaceA *int64 `json:"interface_a"`
+
+ // Interface b
+ // Required: true
+ InterfaceB *int64 `json:"interface_b"`
+}
+
+// Validate validates this writable interface connection
+func (m *WritableInterfaceConnection) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterfaceA(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateInterfaceB(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var writableInterfaceConnectionTypeConnectionStatusPropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableInterfaceConnectionTypeConnectionStatusPropEnum = append(writableInterfaceConnectionTypeConnectionStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableInterfaceConnection) validateConnectionStatusEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, writableInterfaceConnectionTypeConnectionStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableInterfaceConnection) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ConnectionStatus) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateConnectionStatusEnum("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterfaceConnection) validateInterfaceA(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface_a", "body", m.InterfaceA); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterfaceConnection) validateInterfaceB(formats strfmt.Registry) error {
+
+ if err := validate.Required("interface_b", "body", m.InterfaceB); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableInterfaceConnection) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableInterfaceConnection) UnmarshalBinary(b []byte) error {
+ var res WritableInterfaceConnection
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_template.go
new file mode 100644
index 0000000..2471de6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_interface_template.go
@@ -0,0 +1,153 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableInterfaceTemplate writable interface template
+// swagger:model WritableInterfaceTemplate
+type WritableInterfaceTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // Form factor
+ FormFactor int64 `json:"form_factor,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Management only
+ MgmtOnly bool `json:"mgmt_only,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable interface template
+func (m *WritableInterfaceTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFormFactor(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableInterfaceTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableInterfaceTemplateTypeFormFactorPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[0,200,800,1000,1150,1170,1050,1100,1200,1300,1310,1320,1350,1400,1500,1510,1520,1550,1600,2600,2610,2620,2630,2640,3010,3020,3040,3080,3160,4000,4010,4040,4050,5000,5050,5100,5150,5200,32767]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableInterfaceTemplateTypeFormFactorPropEnum = append(writableInterfaceTemplateTypeFormFactorPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableInterfaceTemplate) validateFormFactorEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableInterfaceTemplateTypeFormFactorPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableInterfaceTemplate) validateFormFactor(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.FormFactor) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateFormFactorEnum("form_factor", "body", m.FormFactor); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInterfaceTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableInterfaceTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableInterfaceTemplate) UnmarshalBinary(b []byte) error {
+ var res WritableInterfaceTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_inventory_item.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_inventory_item.go
new file mode 100644
index 0000000..bf646d6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_inventory_item.go
@@ -0,0 +1,205 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableInventoryItem writable inventory item
+// swagger:model WritableInventoryItem
+type WritableInventoryItem struct {
+
+ // Asset tag
+ //
+ // A unique tag used to identify this item
+ // Max Length: 50
+ AssetTag string `json:"asset_tag,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // Discovered
+ Discovered bool `json:"discovered,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Manufacturer
+ Manufacturer int64 `json:"manufacturer,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Parent
+ Parent int64 `json:"parent,omitempty"`
+
+ // Part ID
+ // Max Length: 50
+ PartID string `json:"part_id,omitempty"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+}
+
+// Validate validates this writable inventory item
+func (m *WritableInventoryItem) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAssetTag(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePartID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableInventoryItem) validateAssetTag(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.AssetTag) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("asset_tag", "body", string(m.AssetTag), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInventoryItem) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInventoryItem) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInventoryItem) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInventoryItem) validatePartID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PartID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("part_id", "body", string(m.PartID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableInventoryItem) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableInventoryItem) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableInventoryItem) UnmarshalBinary(b []byte) error {
+ var res WritableInventoryItem
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_ip_address.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_ip_address.go
new file mode 100644
index 0000000..c03f795
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_ip_address.go
@@ -0,0 +1,222 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableIPAddress writable IP address
+// swagger:model WritableIPAddress
+type WritableIPAddress struct {
+
+ // Address
+ //
+ // IPv4 or IPv6 address (with mask)
+ // Required: true
+ Address *string `json:"address"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Interface
+ Interface int64 `json:"interface,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // NAT (Inside)
+ //
+ // The IP for which this address is the "outside" IP
+ NatInside int64 `json:"nat_inside,omitempty"`
+
+ // Role
+ //
+ // The functional role of this IP
+ Role int64 `json:"role,omitempty"`
+
+ // Status
+ //
+ // The operational status of this IP
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // VRF
+ Vrf int64 `json:"vrf,omitempty"`
+}
+
+// Validate validates this writable IP address
+func (m *WritableIPAddress) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableIPAddress) validateAddress(formats strfmt.Registry) error {
+
+ if err := validate.Required("address", "body", m.Address); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableIPAddress) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableIpAddressTypeRolePropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[10,20,30,40,41,42,43,44]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableIpAddressTypeRolePropEnum = append(writableIpAddressTypeRolePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableIPAddress) validateRoleEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableIpAddressTypeRolePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableIPAddress) validateRole(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Role) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateRoleEnum("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableIpAddressTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,2,3,5]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableIpAddressTypeStatusPropEnum = append(writableIpAddressTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableIPAddress) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableIpAddressTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableIPAddress) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableIPAddress) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableIPAddress) UnmarshalBinary(b []byte) error {
+ var res WritableIPAddress
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_platform.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_platform.go
new file mode 100644
index 0000000..1b17784
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_platform.go
@@ -0,0 +1,198 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePlatform writable platform
+// swagger:model WritablePlatform
+type WritablePlatform struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Manufacturer
+ //
+ // Optionally limit this platform to devices of a certain manufacturer
+ Manufacturer int64 `json:"manufacturer,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // NAPALM driver
+ //
+ // The name of the NAPALM driver to use when interacting with devices
+ // Max Length: 50
+ NapalmDriver string `json:"napalm_driver,omitempty"`
+
+ // Legacy RPC client
+ RPCClient string `json:"rpc_client,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable platform
+func (m *WritablePlatform) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateNapalmDriver(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRPCClient(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritablePlatform) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePlatform) validateNapalmDriver(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.NapalmDriver) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("napalm_driver", "body", string(m.NapalmDriver), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writablePlatformTypeRPCClientPropEnum []interface{}
+
+func init() {
+ var res []string
+ if err := json.Unmarshal([]byte(`["juniper-junos","cisco-ios","opengear"]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writablePlatformTypeRPCClientPropEnum = append(writablePlatformTypeRPCClientPropEnum, v)
+ }
+}
+
+const (
+ // WritablePlatformRPCClientJuniperJunos captures enum value "juniper-junos"
+ WritablePlatformRPCClientJuniperJunos string = "juniper-junos"
+ // WritablePlatformRPCClientCiscoIos captures enum value "cisco-ios"
+ WritablePlatformRPCClientCiscoIos string = "cisco-ios"
+ // WritablePlatformRPCClientOpengear captures enum value "opengear"
+ WritablePlatformRPCClientOpengear string = "opengear"
+)
+
+// prop value enum
+func (m *WritablePlatform) validateRPCClientEnum(path, location string, value string) error {
+ if err := validate.Enum(path, location, value, writablePlatformTypeRPCClientPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritablePlatform) validateRPCClient(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.RPCClient) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateRPCClientEnum("rpc_client", "body", m.RPCClient); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePlatform) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePlatform) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePlatform) UnmarshalBinary(b []byte) error {
+ var res WritablePlatform
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet.go
new file mode 100644
index 0000000..81896b1
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePowerOutlet writable power outlet
+// swagger:model WritablePowerOutlet
+type WritablePowerOutlet struct {
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable power outlet
+func (m *WritablePowerOutlet) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritablePowerOutlet) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePowerOutlet) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePowerOutlet) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePowerOutlet) UnmarshalBinary(b []byte) error {
+ var res WritablePowerOutlet
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet_template.go
new file mode 100644
index 0000000..7ac79b7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_outlet_template.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePowerOutletTemplate writable power outlet template
+// swagger:model WritablePowerOutletTemplate
+type WritablePowerOutletTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable power outlet template
+func (m *WritablePowerOutletTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritablePowerOutletTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePowerOutletTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePowerOutletTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePowerOutletTemplate) UnmarshalBinary(b []byte) error {
+ var res WritablePowerOutletTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port.go
new file mode 100644
index 0000000..1e1ae59
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port.go
@@ -0,0 +1,153 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePowerPort writable power port
+// swagger:model WritablePowerPort
+type WritablePowerPort struct {
+
+ // Connection status
+ ConnectionStatus bool `json:"connection_status,omitempty"`
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Power outlet
+ PowerOutlet int64 `json:"power_outlet,omitempty"`
+}
+
+// Validate validates this writable power port
+func (m *WritablePowerPort) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateConnectionStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+var writablePowerPortTypeConnectionStatusPropEnum []interface{}
+
+func init() {
+ var res []bool
+ if err := json.Unmarshal([]byte(`[false,true]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writablePowerPortTypeConnectionStatusPropEnum = append(writablePowerPortTypeConnectionStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritablePowerPort) validateConnectionStatusEnum(path, location string, value bool) error {
+ if err := validate.Enum(path, location, value, writablePowerPortTypeConnectionStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritablePowerPort) validateConnectionStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ConnectionStatus) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateConnectionStatusEnum("connection_status", "body", m.ConnectionStatus); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePowerPort) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePowerPort) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePowerPort) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePowerPort) UnmarshalBinary(b []byte) error {
+ var res WritablePowerPort
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port_template.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port_template.go
new file mode 100644
index 0000000..511a277
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_power_port_template.go
@@ -0,0 +1,106 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePowerPortTemplate writable power port template
+// swagger:model WritablePowerPortTemplate
+type WritablePowerPortTemplate struct {
+
+ // Device type
+ // Required: true
+ DeviceType *int64 `json:"device_type"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+}
+
+// Validate validates this writable power port template
+func (m *WritablePowerPortTemplate) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDeviceType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritablePowerPortTemplate) validateDeviceType(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_type", "body", m.DeviceType); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePowerPortTemplate) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePowerPortTemplate) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePowerPortTemplate) UnmarshalBinary(b []byte) error {
+ var res WritablePowerPortTemplate
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_prefix.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_prefix.go
new file mode 100644
index 0000000..a777ca6
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_prefix.go
@@ -0,0 +1,186 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritablePrefix writable prefix
+// swagger:model WritablePrefix
+type WritablePrefix struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Is a pool
+ //
+ // All IP addresses within this prefix are considered usable
+ IsPool bool `json:"is_pool,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Prefix
+ //
+ // IPv4 or IPv6 network with mask
+ // Required: true
+ Prefix *string `json:"prefix"`
+
+ // Role
+ //
+ // The primary function of this prefix
+ Role int64 `json:"role,omitempty"`
+
+ // Site
+ Site int64 `json:"site,omitempty"`
+
+ // Status
+ //
+ // Operational status of this prefix
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // VLAN
+ Vlan int64 `json:"vlan,omitempty"`
+
+ // VRF
+ Vrf int64 `json:"vrf,omitempty"`
+}
+
+// Validate validates this writable prefix
+func (m *WritablePrefix) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePrefix(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritablePrefix) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritablePrefix) validatePrefix(formats strfmt.Registry) error {
+
+ if err := validate.Required("prefix", "body", m.Prefix); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writablePrefixTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[0,1,2,3]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writablePrefixTypeStatusPropEnum = append(writablePrefixTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritablePrefix) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writablePrefixTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritablePrefix) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritablePrefix) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritablePrefix) UnmarshalBinary(b []byte) error {
+ var res WritablePrefix
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_provider.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_provider.go
new file mode 100644
index 0000000..65af6ed
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_provider.go
@@ -0,0 +1,211 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableProvider writable provider
+// swagger:model WritableProvider
+type WritableProvider struct {
+
+ // Account number
+ // Max Length: 30
+ Account string `json:"account,omitempty"`
+
+ // Admin contact
+ AdminContact string `json:"admin_contact,omitempty"`
+
+ // ASN
+ // Maximum: 4.294967295e+09
+ // Minimum: 1
+ Asn int64 `json:"asn,omitempty"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // NOC contact
+ NocContact string `json:"noc_contact,omitempty"`
+
+ // Portal
+ // Max Length: 200
+ PortalURL strfmt.URI `json:"portal_url,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable provider
+func (m *WritableProvider) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAccount(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateAsn(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePortalURL(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableProvider) validateAccount(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Account) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("account", "body", string(m.Account), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableProvider) validateAsn(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Asn) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("asn", "body", int64(m.Asn), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("asn", "body", int64(m.Asn), 4.294967295e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableProvider) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableProvider) validatePortalURL(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PortalURL) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("portal_url", "body", string(m.PortalURL), 200); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("portal_url", "body", "uri", m.PortalURL.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableProvider) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableProvider) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableProvider) UnmarshalBinary(b []byte) error {
+ var res WritableProvider
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack.go
new file mode 100644
index 0000000..b3a8d28
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack.go
@@ -0,0 +1,293 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableRack writable rack
+// swagger:model WritableRack
+type WritableRack struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Descending units
+ //
+ // Units are numbered top-to-bottom
+ DescUnits bool `json:"desc_units,omitempty"`
+
+ // Facility ID
+ // Max Length: 50
+ FacilityID string `json:"facility_id,omitempty"`
+
+ // Group
+ Group int64 `json:"group,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Role
+ Role int64 `json:"role,omitempty"`
+
+ // Serial number
+ // Max Length: 50
+ Serial string `json:"serial,omitempty"`
+
+ // Site
+ // Required: true
+ Site *int64 `json:"site"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // Type
+ Type int64 `json:"type,omitempty"`
+
+ // Height (U)
+ // Maximum: 100
+ // Minimum: 1
+ UHeight int64 `json:"u_height,omitempty"`
+
+ // Width
+ //
+ // Rail-to-rail width
+ Width int64 `json:"width,omitempty"`
+}
+
+// Validate validates this writable rack
+func (m *WritableRack) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateFacilityID(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSerial(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateType(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUHeight(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateWidth(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableRack) validateFacilityID(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.FacilityID) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("facility_id", "body", string(m.FacilityID), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRack) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRack) validateSerial(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Serial) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("serial", "body", string(m.Serial), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRack) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableRackTypeTypePropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[100,200,300,1000,1100]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableRackTypeTypePropEnum = append(writableRackTypeTypePropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableRack) validateTypeEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableRackTypeTypePropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableRack) validateType(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Type) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateTypeEnum("type", "body", m.Type); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRack) validateUHeight(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.UHeight) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("u_height", "body", int64(m.UHeight), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("u_height", "body", int64(m.UHeight), 100, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableRackTypeWidthPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[19,23]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableRackTypeWidthPropEnum = append(writableRackTypeWidthPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableRack) validateWidthEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableRackTypeWidthPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableRack) validateWidth(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Width) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateWidthEnum("width", "body", m.Width); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableRack) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableRack) UnmarshalBinary(b []byte) error {
+ var res WritableRack
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_group.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_group.go
new file mode 100644
index 0000000..e409f49
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_group.go
@@ -0,0 +1,134 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableRackGroup writable rack group
+// swagger:model WritableRackGroup
+type WritableRackGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Site
+ // Required: true
+ Site *int64 `json:"site"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable rack group
+func (m *WritableRackGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSite(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableRackGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRackGroup) validateSite(formats strfmt.Registry) error {
+
+ if err := validate.Required("site", "body", m.Site); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRackGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableRackGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableRackGroup) UnmarshalBinary(b []byte) error {
+ var res WritableRackGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_reservation.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_reservation.go
new file mode 100644
index 0000000..e66d7c3
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_rack_reservation.go
@@ -0,0 +1,160 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "strconv"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableRackReservation writable rack reservation
+// swagger:model WritableRackReservation
+type WritableRackReservation struct {
+
+ // Description
+ // Required: true
+ // Max Length: 100
+ Description *string `json:"description"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Rack
+ // Required: true
+ Rack *int64 `json:"rack"`
+
+ // units
+ // Required: true
+ Units []*int64 `json:"units"`
+
+ // User
+ // Required: true
+ User *int64 `json:"user"`
+}
+
+// Validate validates this writable rack reservation
+func (m *WritableRackReservation) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRack(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUnits(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateUser(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableRackReservation) validateDescription(formats strfmt.Registry) error {
+
+ if err := validate.Required("description", "body", m.Description); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("description", "body", string(*m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRackReservation) validateRack(formats strfmt.Registry) error {
+
+ if err := validate.Required("rack", "body", m.Rack); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRackReservation) validateUnits(formats strfmt.Registry) error {
+
+ if err := validate.Required("units", "body", m.Units); err != nil {
+ return err
+ }
+
+ for i := 0; i < len(m.Units); i++ {
+
+ if swag.IsZero(m.Units[i]) { // not required
+ continue
+ }
+
+ if err := validate.MinimumInt("units"+"."+strconv.Itoa(i), "body", int64(*m.Units[i]), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("units"+"."+strconv.Itoa(i), "body", int64(*m.Units[i]), 32767, false); err != nil {
+ return err
+ }
+
+ }
+
+ return nil
+}
+
+func (m *WritableRackReservation) validateUser(formats strfmt.Registry) error {
+
+ if err := validate.Required("user", "body", m.User); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableRackReservation) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableRackReservation) UnmarshalBinary(b []byte) error {
+ var res WritableRackReservation
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_region.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_region.go
new file mode 100644
index 0000000..9581986
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_region.go
@@ -0,0 +1,119 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableRegion writable region
+// swagger:model WritableRegion
+type WritableRegion struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Parent
+ Parent int64 `json:"parent,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable region
+func (m *WritableRegion) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableRegion) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableRegion) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableRegion) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableRegion) UnmarshalBinary(b []byte) error {
+ var res WritableRegion
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_secret.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_secret.go
new file mode 100644
index 0000000..e068649
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_secret.go
@@ -0,0 +1,153 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableSecret writable secret
+// swagger:model WritableSecret
+type WritableSecret struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Device
+ // Required: true
+ Device *int64 `json:"device"`
+
+ // Hash
+ // Read Only: true
+ Hash string `json:"hash,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Max Length: 100
+ Name string `json:"name,omitempty"`
+
+ // Plaintext
+ // Required: true
+ Plaintext *string `json:"plaintext"`
+
+ // Role
+ // Required: true
+ Role *int64 `json:"role"`
+}
+
+// Validate validates this writable secret
+func (m *WritableSecret) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDevice(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePlaintext(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRole(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableSecret) validateDevice(formats strfmt.Registry) error {
+
+ if err := validate.Required("device", "body", m.Device); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSecret) validateName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Name) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("name", "body", string(m.Name), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSecret) validatePlaintext(formats strfmt.Registry) error {
+
+ if err := validate.Required("plaintext", "body", m.Plaintext); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSecret) validateRole(formats strfmt.Registry) error {
+
+ if err := validate.Required("role", "body", m.Role); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableSecret) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableSecret) UnmarshalBinary(b []byte) error {
+ var res WritableSecret
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_service.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_service.go
new file mode 100644
index 0000000..fc4ea39
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_service.go
@@ -0,0 +1,219 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableService writable service
+// swagger:model WritableService
+type WritableService struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Device
+ Device int64 `json:"device,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // ipaddresses
+ // Unique: true
+ Ipaddresses []int64 `json:"ipaddresses"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 30
+ Name *string `json:"name"`
+
+ // Port number
+ // Required: true
+ // Maximum: 65535
+ // Minimum: 1
+ Port *int64 `json:"port"`
+
+ // Protocol
+ // Required: true
+ Protocol *int64 `json:"protocol"`
+
+ // Virtual machine
+ VirtualMachine int64 `json:"virtual_machine,omitempty"`
+}
+
+// Validate validates this writable service
+func (m *WritableService) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateIpaddresses(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePort(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateProtocol(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableService) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableService) validateIpaddresses(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Ipaddresses) { // not required
+ return nil
+ }
+
+ if err := validate.UniqueItems("ipaddresses", "body", m.Ipaddresses); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableService) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableService) validatePort(formats strfmt.Registry) error {
+
+ if err := validate.Required("port", "body", m.Port); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("port", "body", int64(*m.Port), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("port", "body", int64(*m.Port), 65535, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableServiceTypeProtocolPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[6,17]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableServiceTypeProtocolPropEnum = append(writableServiceTypeProtocolPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableService) validateProtocolEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableServiceTypeProtocolPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableService) validateProtocol(formats strfmt.Registry) error {
+
+ if err := validate.Required("protocol", "body", m.Protocol); err != nil {
+ return err
+ }
+
+ // value enum
+ if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableService) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableService) UnmarshalBinary(b []byte) error {
+ var res WritableService
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_site.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_site.go
new file mode 100644
index 0000000..85e1c5f
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_site.go
@@ -0,0 +1,368 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableSite writable site
+// swagger:model WritableSite
+type WritableSite struct {
+
+ // ASN
+ // Maximum: 4.294967295e+09
+ // Minimum: 1
+ Asn int64 `json:"asn,omitempty"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Contact E-mail
+ // Max Length: 254
+ ContactEmail strfmt.Email `json:"contact_email,omitempty"`
+
+ // Contact name
+ // Max Length: 50
+ ContactName string `json:"contact_name,omitempty"`
+
+ // Contact phone
+ // Max Length: 20
+ ContactPhone string `json:"contact_phone,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Facility
+ // Max Length: 50
+ Facility string `json:"facility,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Physical address
+ // Max Length: 200
+ PhysicalAddress string `json:"physical_address,omitempty"`
+
+ // Region
+ Region int64 `json:"region,omitempty"`
+
+ // Shipping address
+ // Max Length: 200
+ ShippingAddress string `json:"shipping_address,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+
+ // Status
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // Time zone
+ TimeZone string `json:"time_zone,omitempty"`
+}
+
+// Validate validates this writable site
+func (m *WritableSite) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateAsn(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactEmail(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateContactPhone(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateFacility(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validatePhysicalAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateShippingAddress(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableSite) validateAsn(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Asn) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("asn", "body", int64(m.Asn), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("asn", "body", int64(m.Asn), 4.294967295e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateContactEmail(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactEmail) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_email", "body", string(m.ContactEmail), 254); err != nil {
+ return err
+ }
+
+ if err := validate.FormatOf("contact_email", "body", "email", m.ContactEmail.String(), formats); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateContactName(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactName) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_name", "body", string(m.ContactName), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateContactPhone(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ContactPhone) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("contact_phone", "body", string(m.ContactPhone), 20); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateFacility(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Facility) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("facility", "body", string(m.Facility), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validatePhysicalAddress(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.PhysicalAddress) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("physical_address", "body", string(m.PhysicalAddress), 200); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateShippingAddress(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ShippingAddress) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("shipping_address", "body", string(m.ShippingAddress), 200); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableSite) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableSiteTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,2,4]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableSiteTypeStatusPropEnum = append(writableSiteTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableSite) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableSiteTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableSite) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableSite) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableSite) UnmarshalBinary(b []byte) error {
+ var res WritableSite
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_tenant.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_tenant.go
new file mode 100644
index 0000000..f430ea5
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_tenant.go
@@ -0,0 +1,157 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableTenant writable tenant
+// swagger:model WritableTenant
+type WritableTenant struct {
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ //
+ // Long-form name (optional)
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Group
+ Group int64 `json:"group,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 30
+ Name *string `json:"name"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable tenant
+func (m *WritableTenant) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableTenant) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableTenant) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableTenant) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableTenant) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableTenant) UnmarshalBinary(b []byte) error {
+ var res WritableTenant
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_topology_map.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_topology_map.go
new file mode 100644
index 0000000..c78e654
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_topology_map.go
@@ -0,0 +1,161 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableTopologyMap writable topology map
+// swagger:model WritableTopologyMap
+type WritableTopologyMap struct {
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Device patterns
+ //
+ // Identify devices to include in the diagram using regular expressions, one per line. Each line will result in a new tier of the drawing. Separate multiple regexes within a line using semicolons. Devices will be rendered in the order they are defined.
+ // Required: true
+ DevicePatterns *string `json:"device_patterns"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Site
+ Site int64 `json:"site,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable topology map
+func (m *WritableTopologyMap) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDevicePatterns(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableTopologyMap) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableTopologyMap) validateDevicePatterns(formats strfmt.Registry) error {
+
+ if err := validate.Required("device_patterns", "body", m.DevicePatterns); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableTopologyMap) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableTopologyMap) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableTopologyMap) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableTopologyMap) UnmarshalBinary(b []byte) error {
+ var res WritableTopologyMap
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_chassis.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_chassis.go
new file mode 100644
index 0000000..e204361
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_chassis.go
@@ -0,0 +1,105 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableVirtualChassis writable virtual chassis
+// swagger:model WritableVirtualChassis
+type WritableVirtualChassis struct {
+
+ // Domain
+ // Max Length: 30
+ Domain string `json:"domain,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Master
+ // Required: true
+ Master *int64 `json:"master"`
+}
+
+// Validate validates this writable virtual chassis
+func (m *WritableVirtualChassis) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDomain(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMaster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableVirtualChassis) validateDomain(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Domain) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("domain", "body", string(m.Domain), 30); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVirtualChassis) validateMaster(formats strfmt.Registry) error {
+
+ if err := validate.Required("master", "body", m.Master); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableVirtualChassis) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableVirtualChassis) UnmarshalBinary(b []byte) error {
+ var res WritableVirtualChassis
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_machine.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_machine.go
new file mode 100644
index 0000000..4ba7fe7
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_virtual_machine.go
@@ -0,0 +1,260 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableVirtualMachine writable virtual machine
+// swagger:model WritableVirtualMachine
+type WritableVirtualMachine struct {
+
+ // Cluster
+ // Required: true
+ Cluster *int64 `json:"cluster"`
+
+ // Comments
+ Comments string `json:"comments,omitempty"`
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Disk (GB)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ Disk *int64 `json:"disk,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Memory (MB)
+ // Maximum: 2.147483647e+09
+ // Minimum: 0
+ Memory *int64 `json:"memory,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Platform
+ Platform int64 `json:"platform,omitempty"`
+
+ // Primary IPv4
+ PrimaryIp4 int64 `json:"primary_ip4,omitempty"`
+
+ // Primary IPv6
+ PrimaryIp6 int64 `json:"primary_ip6,omitempty"`
+
+ // Role
+ Role int64 `json:"role,omitempty"`
+
+ // Status
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // VCPUs
+ // Maximum: 32767
+ // Minimum: 0
+ Vcpus *int64 `json:"vcpus,omitempty"`
+}
+
+// Validate validates this writable virtual machine
+func (m *WritableVirtualMachine) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateCluster(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateDisk(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateMemory(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVcpus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateCluster(formats strfmt.Registry) error {
+
+ if err := validate.Required("cluster", "body", m.Cluster); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateDisk(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Disk) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("disk", "body", int64(*m.Disk), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("disk", "body", int64(*m.Disk), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateMemory(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Memory) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("memory", "body", int64(*m.Memory), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("memory", "body", int64(*m.Memory), 2.147483647e+09, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableVirtualMachineTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,0,3]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableVirtualMachineTypeStatusPropEnum = append(writableVirtualMachineTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableVirtualMachine) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableVirtualMachineTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVirtualMachine) validateVcpus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Vcpus) { // not required
+ return nil
+ }
+
+ if err := validate.MinimumInt("vcpus", "body", int64(*m.Vcpus), 0, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vcpus", "body", int64(*m.Vcpus), 32767, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableVirtualMachine) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableVirtualMachine) UnmarshalBinary(b []byte) error {
+ var res WritableVirtualMachine
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlan.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlan.go
new file mode 100644
index 0000000..9a0feab
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlan.go
@@ -0,0 +1,205 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "encoding/json"
+
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableVLAN writable v l a n
+// swagger:model WritableVLAN
+type WritableVLAN struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Group
+ Group int64 `json:"group,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 64
+ Name *string `json:"name"`
+
+ // Role
+ Role int64 `json:"role,omitempty"`
+
+ // Site
+ Site int64 `json:"site,omitempty"`
+
+ // Status
+ Status int64 `json:"status,omitempty"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+
+ // ID
+ // Required: true
+ // Maximum: 4094
+ // Minimum: 1
+ Vid *int64 `json:"vid"`
+}
+
+// Validate validates this writable v l a n
+func (m *WritableVLAN) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateStatus(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateVid(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableVLAN) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVLAN) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 64); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+var writableVLANTypeStatusPropEnum []interface{}
+
+func init() {
+ var res []int64
+ if err := json.Unmarshal([]byte(`[1,2,3]`), &res); err != nil {
+ panic(err)
+ }
+ for _, v := range res {
+ writableVLANTypeStatusPropEnum = append(writableVLANTypeStatusPropEnum, v)
+ }
+}
+
+// prop value enum
+func (m *WritableVLAN) validateStatusEnum(path, location string, value int64) error {
+ if err := validate.Enum(path, location, value, writableVLANTypeStatusPropEnum); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (m *WritableVLAN) validateStatus(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Status) { // not required
+ return nil
+ }
+
+ // value enum
+ if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVLAN) validateVid(formats strfmt.Registry) error {
+
+ if err := validate.Required("vid", "body", m.Vid); err != nil {
+ return err
+ }
+
+ if err := validate.MinimumInt("vid", "body", int64(*m.Vid), 1, false); err != nil {
+ return err
+ }
+
+ if err := validate.MaximumInt("vid", "body", int64(*m.Vid), 4094, false); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableVLAN) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableVLAN) UnmarshalBinary(b []byte) error {
+ var res WritableVLAN
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlangroup.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlangroup.go
new file mode 100644
index 0000000..1e55728
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vlangroup.go
@@ -0,0 +1,119 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableVLANGroup writable v l a n group
+// swagger:model WritableVLANGroup
+type WritableVLANGroup struct {
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Site
+ Site int64 `json:"site,omitempty"`
+
+ // Slug
+ // Required: true
+ // Max Length: 50
+ // Pattern: ^[-a-zA-Z0-9_]+$
+ Slug *string `json:"slug"`
+}
+
+// Validate validates this writable v l a n group
+func (m *WritableVLANGroup) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateSlug(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableVLANGroup) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVLANGroup) validateSlug(formats strfmt.Registry) error {
+
+ if err := validate.Required("slug", "body", m.Slug); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("slug", "body", string(*m.Slug), 50); err != nil {
+ return err
+ }
+
+ if err := validate.Pattern("slug", "body", string(*m.Slug), `^[-a-zA-Z0-9_]+$`); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableVLANGroup) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableVLANGroup) UnmarshalBinary(b []byte) error {
+ var res WritableVLANGroup
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vrf.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vrf.go
new file mode 100644
index 0000000..546f47e
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/models/writable_vrf.go
@@ -0,0 +1,152 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package models
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+ "github.com/go-openapi/validate"
+)
+
+// WritableVRF writable v r f
+// swagger:model WritableVRF
+type WritableVRF struct {
+
+ // Created
+ // Read Only: true
+ Created strfmt.Date `json:"created,omitempty"`
+
+ // Custom fields
+ CustomFields interface{} `json:"custom_fields,omitempty"`
+
+ // Description
+ // Max Length: 100
+ Description string `json:"description,omitempty"`
+
+ // Enforce unique space
+ //
+ // Prevent duplicate prefixes/IP addresses within this VRF
+ EnforceUnique bool `json:"enforce_unique,omitempty"`
+
+ // ID
+ // Read Only: true
+ ID int64 `json:"id,omitempty"`
+
+ // Last updated
+ // Read Only: true
+ LastUpdated strfmt.DateTime `json:"last_updated,omitempty"`
+
+ // Name
+ // Required: true
+ // Max Length: 50
+ Name *string `json:"name"`
+
+ // Route distinguisher
+ // Required: true
+ // Max Length: 21
+ Rd *string `json:"rd"`
+
+ // Tenant
+ Tenant int64 `json:"tenant,omitempty"`
+}
+
+// Validate validates this writable v r f
+func (m *WritableVRF) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateDescription(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateName(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if err := m.validateRd(formats); err != nil {
+ // prop
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *WritableVRF) validateDescription(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.Description) { // not required
+ return nil
+ }
+
+ if err := validate.MaxLength("description", "body", string(m.Description), 100); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVRF) validateName(formats strfmt.Registry) error {
+
+ if err := validate.Required("name", "body", m.Name); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("name", "body", string(*m.Name), 50); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m *WritableVRF) validateRd(formats strfmt.Registry) error {
+
+ if err := validate.Required("rd", "body", m.Rd); err != nil {
+ return err
+ }
+
+ if err := validate.MaxLength("rd", "body", string(*m.Rd), 21); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *WritableVRF) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *WritableVRF) UnmarshalBinary(b []byte) error {
+ var res WritableVRF
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}
diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/netbox.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/netbox.go
new file mode 100644
index 0000000..2784872
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/netbox.go
@@ -0,0 +1,43 @@
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package netbox
+
+import (
+ "fmt"
+
+ "github.com/go-openapi/strfmt"
+ runtimeclient "github.com/go-openapi/runtime/client"
+
+ "github.com/digitalocean/go-netbox/netbox/client"
+)
+
+// NewNetboxAt returns a client which will connect to the given
+// hostname, which can optionally include a port, e.g. localhost:8000
+func NewNetboxAt(host string) *client.NetBox {
+ t := client.DefaultTransportConfig().WithHost(host)
+ return client.NewHTTPClientWithConfig(strfmt.Default, t)
+}
+
+const authHeaderName = "Authorization"
+const authHeaderFormat = "Token %v"
+
+// NewNetboxWithAPIKey returna client which will connect to the given
+// hostname (and optionally port), and will set the expected Authorization
+// header on each request
+func NewNetboxWithAPIKey(host string, apiToken string) *client.NetBox {
+ t := runtimeclient.New(host, client.DefaultBasePath, client.DefaultSchemes)
+ t.DefaultAuthentication = runtimeclient.APIKeyAuth(authHeaderName, "header", fmt.Sprintf(authHeaderFormat, apiToken))
+ return client.New(t, strfmt.Default)
+}