diff --git a/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go
new file mode 100644
index 0000000..11a3ebf
--- /dev/null
+++ b/go/vendor/github.com/digitalocean/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go
@@ -0,0 +1,81 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+// Copyright 2018 The go-netbox Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package circuits
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+	"fmt"
+	"io"
+
+	"github.com/go-openapi/runtime"
+
+	strfmt "github.com/go-openapi/strfmt"
+
+	"github.com/digitalocean/go-netbox/netbox/models"
+)
+
+// CircuitsCircuitsUpdateReader is a Reader for the CircuitsCircuitsUpdate structure.
+type CircuitsCircuitsUpdateReader struct {
+	formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *CircuitsCircuitsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+	switch response.Code() {
+
+	case 200:
+		result := NewCircuitsCircuitsUpdateOK()
+		if err := result.readResponse(response, consumer, o.formats); err != nil {
+			return nil, err
+		}
+		return result, nil
+
+	default:
+		return nil, runtime.NewAPIError("unknown error", response, response.Code())
+	}
+}
+
+// NewCircuitsCircuitsUpdateOK creates a CircuitsCircuitsUpdateOK with default headers values
+func NewCircuitsCircuitsUpdateOK() *CircuitsCircuitsUpdateOK {
+	return &CircuitsCircuitsUpdateOK{}
+}
+
+/*CircuitsCircuitsUpdateOK handles this case with default header values.
+
+CircuitsCircuitsUpdateOK circuits circuits update o k
+*/
+type CircuitsCircuitsUpdateOK struct {
+	Payload *models.WritableCircuit
+}
+
+func (o *CircuitsCircuitsUpdateOK) Error() string {
+	return fmt.Sprintf("[PUT /circuits/circuits/{id}/][%d] circuitsCircuitsUpdateOK  %+v", 200, o.Payload)
+}
+
+func (o *CircuitsCircuitsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+
+	o.Payload = new(models.WritableCircuit)
+
+	// response payload
+	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+		return err
+	}
+
+	return nil
+}
