vendorify
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
+}