Skip to content
Snippets Groups Projects
Unverified Commit 29433ec5 authored by Dave Cameron's avatar Dave Cameron Committed by GitHub
Browse files

Merge pull request #29 from digitalocean/connected-devices

Update to netbox@master with connected-devices added
parents 22893890 eb9def37
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ import (
// NewDcimConnectedDeviceListParams creates a new DcimConnectedDeviceListParams object
// with the default values initialized.
func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams {
var ()
return &DcimConnectedDeviceListParams{
timeout: cr.DefaultTimeout,
......@@ -45,7 +45,7 @@ func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams {
// NewDcimConnectedDeviceListParamsWithTimeout creates a new DcimConnectedDeviceListParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams {
var ()
return &DcimConnectedDeviceListParams{
timeout: timeout,
......@@ -55,7 +55,7 @@ func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimCon
// NewDcimConnectedDeviceListParamsWithContext creates a new DcimConnectedDeviceListParams object
// with the default values initialized, and the ability to set a context for a request
func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConnectedDeviceListParams {
var ()
return &DcimConnectedDeviceListParams{
Context: ctx,
......@@ -65,7 +65,7 @@ func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConne
// NewDcimConnectedDeviceListParamsWithHTTPClient creates a new DcimConnectedDeviceListParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams {
var ()
return &DcimConnectedDeviceListParams{
HTTPClient: client,
}
......@@ -75,6 +75,18 @@ func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimCo
for the dcim connected device list operation typically these are written to a http.Request
*/
type DcimConnectedDeviceListParams struct {
/*PeerDevice
The name of the peer device
*/
PeerDevice string
/*PeerInterface
The name of the peer interface
*/
PeerInterface string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
......@@ -113,6 +125,28 @@ func (o *DcimConnectedDeviceListParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithPeerDevice adds the peerDevice to the dcim connected device list params
func (o *DcimConnectedDeviceListParams) WithPeerDevice(peerDevice string) *DcimConnectedDeviceListParams {
o.SetPeerDevice(peerDevice)
return o
}
// SetPeerDevice adds the peerDevice to the dcim connected device list params
func (o *DcimConnectedDeviceListParams) SetPeerDevice(peerDevice string) {
o.PeerDevice = peerDevice
}
// WithPeerInterface adds the peerInterface to the dcim connected device list params
func (o *DcimConnectedDeviceListParams) WithPeerInterface(peerInterface string) *DcimConnectedDeviceListParams {
o.SetPeerInterface(peerInterface)
return o
}
// SetPeerInterface adds the peerInterface to the dcim connected device list params
func (o *DcimConnectedDeviceListParams) SetPeerInterface(peerInterface string) {
o.PeerInterface = peerInterface
}
// WriteToRequest writes these params to a swagger request
func (o *DcimConnectedDeviceListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
......@@ -121,6 +155,24 @@ func (o *DcimConnectedDeviceListParams) WriteToRequest(r runtime.ClientRequest,
}
var res []error
// query param peer-device
qrPeerDevice := o.PeerDevice
qPeerDevice := qrPeerDevice
if qPeerDevice != "" {
if err := r.SetQueryParam("peer-device", qPeerDevice); err != nil {
return err
}
}
// query param peer-interface
qrPeerInterface := o.PeerInterface
qPeerInterface := qrPeerInterface
if qPeerInterface != "" {
if err := r.SetQueryParam("peer-interface", qPeerInterface); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
......
......@@ -21,10 +21,13 @@ package dcim
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
"github.com/digitalocean/go-netbox/netbox/models"
)
// DcimConnectedDeviceListReader is a Reader for the DcimConnectedDeviceList structure.
......@@ -58,13 +61,21 @@ func NewDcimConnectedDeviceListOK() *DcimConnectedDeviceListOK {
DcimConnectedDeviceListOK dcim connected device list o k
*/
type DcimConnectedDeviceListOK struct {
Payload *models.Device
}
func (o *DcimConnectedDeviceListOK) Error() string {
return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK ", 200)
return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK %+v", 200, o.Payload)
}
func (o *DcimConnectedDeviceListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Device)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
......@@ -82,11 +82,15 @@ type VirtualizationClusterGroupsListParams struct {
*/
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
......@@ -137,6 +141,17 @@ func (o *VirtualizationClusterGroupsListParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithName adds the name to the virtualization cluster groups list params
func (o *VirtualizationClusterGroupsListParams) WithName(name *string) *VirtualizationClusterGroupsListParams {
o.SetName(name)
return o
}
// SetName adds the name to the virtualization cluster groups list params
func (o *VirtualizationClusterGroupsListParams) SetName(name *string) {
o.Name = name
}
// WithOffset adds the offset to the virtualization cluster groups list params
func (o *VirtualizationClusterGroupsListParams) WithOffset(offset *int64) *VirtualizationClusterGroupsListParams {
o.SetOffset(offset)
......@@ -148,6 +163,17 @@ func (o *VirtualizationClusterGroupsListParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WithSlug adds the slug to the virtualization cluster groups list params
func (o *VirtualizationClusterGroupsListParams) WithSlug(slug *string) *VirtualizationClusterGroupsListParams {
o.SetSlug(slug)
return o
}
// SetSlug adds the slug to the virtualization cluster groups list params
func (o *VirtualizationClusterGroupsListParams) SetSlug(slug *string) {
o.Slug = slug
}
// WriteToRequest writes these params to a swagger request
func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
......@@ -172,6 +198,22 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR
}
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
......@@ -188,6 +230,22 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR
}
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...)
}
......
......@@ -82,11 +82,15 @@ type VirtualizationClusterTypesListParams struct {
*/
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
......@@ -137,6 +141,17 @@ func (o *VirtualizationClusterTypesListParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithName adds the name to the virtualization cluster types list params
func (o *VirtualizationClusterTypesListParams) WithName(name *string) *VirtualizationClusterTypesListParams {
o.SetName(name)
return o
}
// SetName adds the name to the virtualization cluster types list params
func (o *VirtualizationClusterTypesListParams) SetName(name *string) {
o.Name = name
}
// WithOffset adds the offset to the virtualization cluster types list params
func (o *VirtualizationClusterTypesListParams) WithOffset(offset *int64) *VirtualizationClusterTypesListParams {
o.SetOffset(offset)
......@@ -148,6 +163,17 @@ func (o *VirtualizationClusterTypesListParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WithSlug adds the slug to the virtualization cluster types list params
func (o *VirtualizationClusterTypesListParams) WithSlug(slug *string) *VirtualizationClusterTypesListParams {
o.SetSlug(slug)
return o
}
// SetSlug adds the slug to the virtualization cluster types list params
func (o *VirtualizationClusterTypesListParams) SetSlug(slug *string) {
o.Slug = slug
}
// WriteToRequest writes these params to a swagger request
func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
......@@ -172,6 +198,22 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe
}
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
......@@ -188,6 +230,22 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe
}
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...)
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment